Merge pull request #1578 from stripe/latest-codegen-beta

Update generated code for beta
This commit is contained in:
stripe-openapi[bot] 2025-04-17 17:26:45 -04:00 committed by GitHub
commit 73f522b699
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
142 changed files with 6282 additions and 1720 deletions

View File

@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, '3.3', jruby-9.4.0.0, truffleruby-head]
ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3, 3.4, jruby-9.4.0.0, truffleruby-head]
steps:
- uses: extractions/setup-just@v2
- uses: actions/checkout@v3

View File

@ -325,3 +325,73 @@ Style/SwapValues: # new in 1.1
Enabled: true
Style/YAMLFileRead: # new in 1.53
Enabled: true
Gemspec/AddRuntimeDependency: # new in 1.65
Enabled: true
Lint/ArrayLiteralInRegexp: # new in 1.71
Enabled: true
Lint/ConstantReassignment: # new in 1.70
Enabled: true
Lint/CopDirectiveSyntax: # new in 1.72
Enabled: true
Lint/DuplicateSetElement: # new in 1.67
Enabled: true
Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
Enabled: true
Lint/ItWithoutArgumentsInBlock: # new in 1.59
Enabled: true
Lint/LiteralAssignmentInCondition: # new in 1.58
Enabled: true
Lint/NumericOperationWithConstantResult: # new in 1.69
Enabled: true
Lint/RedundantTypeConversion: # new in 1.72
Enabled: true
Lint/SharedMutableDefault: # new in 1.70
Enabled: true
Lint/SuppressedExceptionInNumberConversion: # new in 1.72
Enabled: true
Lint/UnescapedBracketInRegexp: # new in 1.68
Enabled: true
Lint/UselessConstantScoping: # new in 1.72
Enabled: true
Lint/UselessDefined: # new in 1.69
Enabled: true
Lint/UselessNumericOperation: # new in 1.66
Enabled: true
Style/AmbiguousEndlessMethodDefinition: # new in 1.68
Enabled: true
Style/BitwisePredicate: # new in 1.68
Enabled: true
Style/CombinableDefined: # new in 1.68
Enabled: true
Style/ComparableBetween: # new in 1.74
Enabled: true
Style/DigChain: # new in 1.69
Enabled: true
Style/FileNull: # new in 1.69
Enabled: true
Style/FileTouch: # new in 1.69
Enabled: true
Style/HashFetchChain: # new in 1.75
Enabled: true
Style/HashSlice: # new in 1.71
Enabled: true
Style/ItAssignment: # new in 1.70
Enabled: true
Style/ItBlockParameter: # new in 1.75
Enabled: true
Style/KeywordArgumentsMerging: # new in 1.68
Enabled: true
Style/MapIntoArray: # new in 1.63
Enabled: true
Style/RedundantFormat: # new in 1.72
Enabled: true
Style/RedundantInterpolationUnfreeze: # new in 1.66
Enabled: true
Style/SafeNavigationChainLength: # new in 1.68
Enabled: true
Style/SendWithLiteralMethodName: # new in 1.64
Enabled: true
Style/SuperArguments: # new in 1.64
Enabled: true
Style/SuperWithArgsParentheses: # new in 1.58
Enabled: true

View File

@ -24,7 +24,7 @@ group :development do
# up-to-date, but it's not the end of the world if it's not.
#
# The latest version of rubocop is only compatible with Ruby 2.7+
gem "rubocop", "1.57.2" if RUBY_VERSION >= "2.7"
gem "rubocop", "1.75.2" if RUBY_VERSION >= "2.7"
gem "sorbet"
gem "tapioca"

View File

@ -1 +1 @@
v1669
v1697

View File

@ -45,53 +45,53 @@ module Stripe
when :create
define_singleton_method(:"create_#{resource}") \
do |id, params = {}, opts = {}|
request_stripe_object(
method: :post,
path: send(resource_url_method, id),
params: params,
opts: opts
)
end
request_stripe_object(
method: :post,
path: send(resource_url_method, id),
params: params,
opts: opts
)
end
when :retrieve
define_singleton_method(:"retrieve_#{resource}") \
do |id, nested_id, params = {}, opts = {}|
request_stripe_object(
method: :get,
path: send(resource_url_method, id, nested_id),
params: params,
opts: opts
)
end
request_stripe_object(
method: :get,
path: send(resource_url_method, id, nested_id),
params: params,
opts: opts
)
end
when :update
define_singleton_method(:"update_#{resource}") \
do |id, nested_id, params = {}, opts = {}|
request_stripe_object(
method: :post,
path: send(resource_url_method, id, nested_id),
params: params,
opts: opts
)
end
request_stripe_object(
method: :post,
path: send(resource_url_method, id, nested_id),
params: params,
opts: opts
)
end
when :delete
define_singleton_method(:"delete_#{resource}") \
do |id, nested_id, params = {}, opts = {}|
request_stripe_object(
method: :delete,
path: send(resource_url_method, id, nested_id),
params: params,
opts: opts
)
end
request_stripe_object(
method: :delete,
path: send(resource_url_method, id, nested_id),
params: params,
opts: opts
)
end
when :list
define_singleton_method(:"list_#{resource_plural}") \
do |id, params = {}, opts = {}|
request_stripe_object(
method: :get,
path: send(resource_url_method, id),
params: params,
opts: opts
)
end
request_stripe_object(
method: :get,
path: send(resource_url_method, id),
params: params,
opts: opts
)
end
else
raise ArgumentError, "Unknown operation: #{operation.inspect}"
end

View File

@ -941,7 +941,7 @@ module Stripe
"with Stripe. Please let us know at support@stripe.com."
end
message = message % base_url
message %= base_url
message += " Request was retried #{num_retries} times." if num_retries > 0

View File

@ -36,9 +36,7 @@ module Stripe
# clears them from internal tracking.
def clear
@mutex.synchronize do
@active_connections.each do |_, connection|
connection.finish
end
@active_connections.each_value(&:finish)
@active_connections = {}
end
end

View File

@ -8,7 +8,7 @@ module Stripe
def self.execute_resource_request(method, url, base_address, params, opts)
opts = Util.normalize_opts(opts)
super(method, url, base_address, params, opts)
super
end
end

View File

@ -78,6 +78,7 @@ module Stripe
FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
Forwarding::Request.object_name => Forwarding::Request,
FundingInstructions.object_name => FundingInstructions,
FxQuote.object_name => FxQuote,
GiftCards::Card.object_name => GiftCards::Card,
GiftCards::Transaction.object_name => GiftCards::Transaction,
Identity::VerificationReport.object_name => Identity::VerificationReport,
@ -106,6 +107,7 @@ module Stripe
Order.object_name => Order,
PaymentAttemptRecord.object_name => PaymentAttemptRecord,
PaymentIntent.object_name => PaymentIntent,
PaymentIntentAmountDetailsLineItem.object_name => PaymentIntentAmountDetailsLineItem,
PaymentLink.object_name => PaymentLink,
PaymentMethod.object_name => PaymentMethod,
PaymentMethodConfiguration.object_name => PaymentMethodConfiguration,

View File

@ -66,6 +66,7 @@ require "stripe/resources/financial_connections/session"
require "stripe/resources/financial_connections/transaction"
require "stripe/resources/forwarding/request"
require "stripe/resources/funding_instructions"
require "stripe/resources/fx_quote"
require "stripe/resources/gift_cards/card"
require "stripe/resources/gift_cards/transaction"
require "stripe/resources/identity/verification_report"
@ -94,6 +95,7 @@ require "stripe/resources/margin"
require "stripe/resources/order"
require "stripe/resources/payment_attempt_record"
require "stripe/resources/payment_intent"
require "stripe/resources/payment_intent_amount_details_line_item"
require "stripe/resources/payment_link"
require "stripe/resources/payment_method"
require "stripe/resources/payment_method_configuration"

View File

@ -304,6 +304,15 @@ module Stripe
attr_reader :user_agent
end
class RegistrationDate < Stripe::StripeObject
# The day of registration, between 1 and 31.
attr_reader :day
# The month of registration, between 1 and 12.
attr_reader :month
# The four-digit year of registration.
attr_reader :year
end
class Verification < Stripe::StripeObject
class Document < Stripe::StripeObject
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.
@ -348,6 +357,8 @@ module Stripe
attr_reader :ownership_exemption_reason
# The company's phone number (used for verification).
attr_reader :phone
# Attribute for field registration_date
attr_reader :registration_date
# The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
attr_reader :structure
# Whether the company's business ID number was provided.
@ -1962,6 +1973,21 @@ module Stripe
end
end
class RegistrationDate < Stripe::RequestParams
# The day of registration, between 1 and 31.
attr_accessor :day
# The month of registration, between 1 and 12.
attr_accessor :month
# The four-digit year of registration.
attr_accessor :year
def initialize(day: nil, month: nil, year: nil)
@day = day
@month = month
@year = year
end
end
class Verification < Stripe::RequestParams
class Document < Stripe::RequestParams
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -2011,6 +2037,8 @@ module Stripe
attr_accessor :ownership_exemption_reason
# The company's phone number (used for verification).
attr_accessor :phone
# Attribute for param field registration_date
attr_accessor :registration_date
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
attr_accessor :registration_number
# The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
@ -2040,6 +2068,7 @@ module Stripe
ownership_declaration: nil,
ownership_exemption_reason: nil,
phone: nil,
registration_date: nil,
registration_number: nil,
structure: nil,
tax_id: nil,
@ -2062,6 +2091,7 @@ module Stripe
@ownership_declaration = ownership_declaration
@ownership_exemption_reason = ownership_exemption_reason
@phone = phone
@registration_date = registration_date
@registration_number = registration_number
@structure = structure
@tax_id = tax_id
@ -4204,6 +4234,21 @@ module Stripe
end
end
class RegistrationDate < Stripe::RequestParams
# The day of registration, between 1 and 31.
attr_accessor :day
# The month of registration, between 1 and 12.
attr_accessor :month
# The four-digit year of registration.
attr_accessor :year
def initialize(day: nil, month: nil, year: nil)
@day = day
@month = month
@year = year
end
end
class Verification < Stripe::RequestParams
class Document < Stripe::RequestParams
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -4253,6 +4298,8 @@ module Stripe
attr_accessor :ownership_exemption_reason
# The company's phone number (used for verification).
attr_accessor :phone
# Attribute for param field registration_date
attr_accessor :registration_date
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
attr_accessor :registration_number
# The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
@ -4282,6 +4329,7 @@ module Stripe
ownership_declaration: nil,
ownership_exemption_reason: nil,
phone: nil,
registration_date: nil,
registration_number: nil,
structure: nil,
tax_id: nil,
@ -4304,6 +4352,7 @@ module Stripe
@ownership_declaration = ownership_declaration
@ownership_exemption_reason = ownership_exemption_reason
@phone = phone
@registration_date = registration_date
@registration_number = registration_number
@structure = structure
@tax_id = tax_id
@ -5466,7 +5515,7 @@ module Stripe
opts = id
id = nil
end
super(id, opts)
super
end
# We are not adding a helper for capabilities here as the Account object
@ -5506,7 +5555,7 @@ module Stripe
entity_update[:additional_owners] =
serialize_additional_owners(entity, owners)
end
if (individual = @values[:individual]) && (individual.is_a?(Person) && !update_hash.key?(:individual))
if (individual = @values[:individual]) && individual.is_a?(Person) && !update_hash.key?(:individual)
update_hash[:individual] = individual.serialize_params(options)
end
update_hash

View File

@ -2,7 +2,11 @@
# frozen_string_literal: true
module Stripe
# Options for customizing account balances within Stripe.
# Options for customizing account balances and payout settings for a Stripe platform's connected accounts.
#
# This API is only available for users enrolled in the public preview for Accounts v2 on Stripe Connect.
# If you are not in this preview, please use the [Accounts v1 API](https://docs.stripe.com/api/accounts?api-version=2025-03-31.basil)
# to manage your connected accounts' balance settings instead.
class BalanceSettings < SingletonAPIResource
include Stripe::APIOperations::SingletonSave

View File

@ -14,11 +14,11 @@ module Stripe
end
class AcceptedTerms < Stripe::StripeObject
# Amount of financing offered, in minor units.
# Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000.
attr_reader :advance_amount
# Currency that the financing offer is transacted in. For example, `usd`.
attr_reader :currency
# Fixed fee amount, in minor units.
# Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000.
attr_reader :fee_amount
# Populated when the `product_type` of the `financingoffer` is `refill`.
# Represents the discount amount on remaining premium for the existing loan at payout time.
@ -28,13 +28,13 @@ module Stripe
end
class OfferedTerms < Stripe::StripeObject
# Amount of financing offered, in minor units.
# Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000.
attr_reader :advance_amount
# Describes the type of user the offer is being extended to.
attr_reader :campaign_type
# Currency that the financing offer is transacted in. For example, `usd`.
attr_reader :currency
# Fixed fee amount, in minor units.
# Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000.
attr_reader :fee_amount
# Populated when the `product_type` of the `financingoffer` is `refill`.
# Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer`

View File

@ -16,12 +16,12 @@ module Stripe
# The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited.
# Given in seconds since unix epoch.
attr_reader :due_at
# The amount that has already been paid in the current repayment interval.
# The amount that has already been paid in the current repayment interval, in minor units. For example, $100 USD will be represented as 10000.
attr_reader :paid_amount
# The amount that is yet to be paid in the current repayment interval.
# The amount that is yet to be paid in the current repayment interval, in minor units. For example, $100 USD will be represented as 10000.
attr_reader :remaining_amount
end
# Amount of financing offered, in minor units.
# Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000.
attr_reader :advance_amount
# The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch.
attr_reader :advance_paid_out_at
@ -29,11 +29,11 @@ module Stripe
attr_reader :currency
# The chronologically current repayment interval for the financing offer.
attr_reader :current_repayment_interval
# Fixed fee amount, in minor units.
# Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000.
attr_reader :fee_amount
# The amount the Connected account has paid toward the financing debt so far.
# The amount the Connected account has paid toward the financing debt so far, in minor units. For example, $1,000 USD will be represented as 100000.
attr_reader :paid_amount
# The balance remaining to be paid on the financing, in minor units.
# The balance remaining to be paid on the financing, in minor units. For example, $1,000 USD will be represented as 100000.
attr_reader :remaining_amount
# The time at which Capital will begin withholding from payments. Given in seconds since unix epoch.
attr_reader :repayments_begin_at

View File

@ -43,6 +43,8 @@ module Stripe
attr_reader :name
# Billing phone number (including extension).
attr_reader :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_reader :tax_id
end
class FraudDetails < Stripe::StripeObject
@ -2134,26 +2136,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -2908,26 +2918,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end

View File

@ -3292,7 +3292,7 @@ module Stripe
# prioritize the most relevant payment methods based on the customer's location and
# other characteristics.
attr_accessor :payment_method_types
# This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
# This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions.
#
# For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
attr_accessor :permissions
@ -3496,14 +3496,83 @@ module Stripe
@minimum = minimum
end
end
class PriceData < Stripe::RequestParams
class ProductData < Stripe::RequestParams
# The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
attr_accessor :description
# A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
attr_accessor :images
# 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
# The product's name, meant to be displayable to the customer.
attr_accessor :name
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
attr_accessor :tax_code
def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
@description = description
@images = images
@metadata = metadata
@name = name
@tax_code = tax_code
end
end
class Recurring < Stripe::RequestParams
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
attr_accessor :interval
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
attr_accessor :interval_count
def initialize(interval: nil, interval_count: nil)
@interval = interval
@interval_count = interval_count
end
end
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
attr_accessor :currency
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
attr_accessor :product
# Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
attr_accessor :product_data
# The recurring components of a price such as `interval` and `interval_count`.
attr_accessor :recurring
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
attr_accessor :tax_behavior
# A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
attr_accessor :unit_amount
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
attr_accessor :unit_amount_decimal
def initialize(
currency: nil,
product: nil,
product_data: nil,
recurring: nil,
tax_behavior: nil,
unit_amount: nil,
unit_amount_decimal: nil
)
@currency = currency
@product = product
@product_data = product_data
@recurring = recurring
@tax_behavior = tax_behavior
@unit_amount = unit_amount
@unit_amount_decimal = unit_amount_decimal
end
end
# When set, provides configuration for this items quantity to be adjusted by the customer during Checkout.
attr_accessor :adjustable_quantity
# ID of an existing line item.
attr_accessor :id
# 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
# The ID of the [Price](https://stripe.com/docs/api/prices).
# The ID of the [Price](https://stripe.com/docs/api/prices). One of `price` or `price_data` is required when creating a new line item.
attr_accessor :price
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item.
attr_accessor :price_data
# The quantity of the line item being purchased.
attr_accessor :quantity
# The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
@ -3514,6 +3583,7 @@ module Stripe
id: nil,
metadata: nil,
price: nil,
price_data: nil,
quantity: nil,
tax_rates: nil
)
@ -3521,6 +3591,7 @@ module Stripe
@id = id
@metadata = metadata
@price = price
@price_data = price_data
@quantity = quantity
@tax_rates = tax_rates
end
@ -3631,7 +3702,7 @@ module Stripe
@shipping_rate_data = shipping_rate_data
end
end
# Information about the customer collected within the Checkout Session.
# Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions.
attr_accessor :collected_information
# Specifies which fields in the response should be expanded.
attr_accessor :expand

View File

@ -120,6 +120,8 @@ module Stripe
attr_reader :name
# Billing phone number (including extension).
attr_reader :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_reader :tax_id
end
class Blik < Stripe::StripeObject; end
@ -978,12 +980,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end

View File

@ -26,6 +26,15 @@ module Stripe
attr_reader :amount_off
end
class Script < Stripe::StripeObject
# The configuration values of the script. The keys and values are specific to the script implementation.
attr_reader :configuration
# The name of the script used to calculate the discount.
attr_reader :display_name
# The script implementation ID for this coupon.
attr_reader :id
end
class DeleteParams < Stripe::RequestParams
end
@ -111,6 +120,18 @@ module Stripe
@amount_off = amount_off
end
end
class Script < Stripe::RequestParams
# The configuration values of the script. The keys and values are specific to the script implementation.
attr_accessor :configuration
# The script implementation ID for this coupon.
attr_accessor :id
def initialize(configuration: nil, id: nil)
@configuration = configuration
@id = id
end
end
# A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
attr_accessor :amount_off
# A hash containing directions for what this Coupon will apply discounts to.
@ -137,6 +158,8 @@ module Stripe
attr_accessor :percent_off
# Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
attr_accessor :redeem_by
# Configuration of the [script](https://docs.stripe.com/billing/subscriptions/script-coupons) used to calculate the discount.
attr_accessor :script
def initialize(
amount_off: nil,
@ -151,7 +174,8 @@ module Stripe
metadata: nil,
name: nil,
percent_off: nil,
redeem_by: nil
redeem_by: nil,
script: nil
)
@amount_off = amount_off
@applies_to = applies_to
@ -166,6 +190,7 @@ module Stripe
@name = name
@percent_off = percent_off
@redeem_by = redeem_by
@script = script
end
end
# Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
@ -198,8 +223,12 @@ module Stripe
attr_reader :percent_off
# Date after which the coupon can no longer be redeemed.
attr_reader :redeem_by
# Configuration of the [script](https://docs.stripe.com/billing/subscriptions/script-coupons) used to calculate the discount.
attr_reader :script
# Number of times this coupon has been applied to a customer.
attr_reader :times_redeemed
# One of `amount_off`, `percent_off`, or `script`. Describes the type of coupon logic used to calculate the discount.
attr_reader :type
# Taking account of the above properties, whether this coupon can still be applied to a customer.
attr_reader :valid
# Always true for a deleted object

View File

@ -326,7 +326,7 @@ module Stripe
raise NotImplementedError,
"FundingInstructions cannot be accessed without a customer ID."
end
"#{Customer.resource_url}/#{CGI.escape(customer)}/funding_instructions" "/#{CGI.escape(id)}"
"#{Customer.resource_url}/#{CGI.escape(customer)}/funding_instructions" + "/#{CGI.escape(id)}"
end
end
end

View File

@ -0,0 +1,184 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
# The FX Quotes API provides three key functions:
# - View current exchange rates: The object shows Stripe's current exchange rate for any given currency pair.
# - Extended quotes: The API provides rate quotes valid for a 1-hour period or a 24-hour period, eliminating uncertainty from FX fluctuations.
# - View FX fees: The API provides information on the FX fees Stripe will charge on your FX transaction, allowing you to anticipate specific settlement amounts before payment costs.
class FxQuote < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
OBJECT_NAME = "fx_quote"
def self.object_name
"fx_quote"
end
class Rates < Stripe::StripeObject
class RateDetails < Stripe::StripeObject
# The rate for the currency pair.
attr_reader :base_rate
# The fee for locking the conversion rates.
attr_reader :duration_premium
# The FX fee for the currency pair.
attr_reader :fx_fee_rate
# A reference rate for the currency pair provided by the reference rate provider.
attr_reader :reference_rate
# The reference rate provider.
attr_reader :reference_rate_provider
end
# The rate that includes the FX fee rate.
attr_reader :exchange_rate
# Attribute for field rate_details
attr_reader :rate_details
end
class Usage < Stripe::StripeObject
class Payment < Stripe::StripeObject
# The Stripe account ID that the funds will be transferred to.
#
# This field should match the account ID that would be used in the PaymentIntents transfer_data[destination] field.
attr_reader :destination
# The Stripe account ID that these funds are intended for.
#
# This field must match the account ID that would be used in the PaymentIntents on_behalf_of field.
attr_reader :on_behalf_of
end
class Transfer < Stripe::StripeObject
# The Stripe account ID that the funds will be transferred to.
#
# This field should match the account ID that would be used in the Transfers destination field.
attr_reader :destination
end
# The details required to use an FX Quote for a payment
attr_reader :payment
# The details required to use an FX Quote for a transfer
attr_reader :transfer
# The transaction type for which the FX Quote will be used.
#
# Can be 'payment' or 'transfer'.
attr_reader :type
end
class ListParams < Stripe::RequestParams
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
attr_accessor :ending_before
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
attr_accessor :limit
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
attr_accessor :starting_after
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
@ending_before = ending_before
@expand = expand
@limit = limit
@starting_after = starting_after
end
end
class CreateParams < Stripe::RequestParams
class Usage < Stripe::RequestParams
class Payment < Stripe::RequestParams
# The Stripe account ID that the funds will be transferred to.
#
# This field should match the account ID that would be used in the PaymentIntents transfer_data[destination] field.
attr_accessor :destination
# The Stripe account ID that these funds are intended for.
#
# This field should match the account ID that would be used in the PaymentIntents on_behalf_of field.
attr_accessor :on_behalf_of
def initialize(destination: nil, on_behalf_of: nil)
@destination = destination
@on_behalf_of = on_behalf_of
end
end
class Transfer < Stripe::RequestParams
# The Stripe account ID that the funds will be transferred to.
#
# This field should match the account ID that would be used in the Transfers destination field.
attr_accessor :destination
def initialize(destination: nil)
@destination = destination
end
end
# The payment transaction details that are intended for the FX Quote.
attr_accessor :payment
# The transfer transaction details that are intended for the FX Quote.
attr_accessor :transfer
# Which transaction the FX Quote will be used for
#
# Can be “payment” | “transfer”
attr_accessor :type
def initialize(payment: nil, transfer: nil, type: nil)
@payment = payment
@transfer = transfer
@type = type
end
end
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies).
attr_accessor :from_currencies
# The duration that you wish the quote to be locked for. The quote will be usable for the duration specified. The default is `none`. The maximum is 1 day.
attr_accessor :lock_duration
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
attr_accessor :to_currency
# The usage specific information for the quote.
attr_accessor :usage
def initialize(
expand: nil,
from_currencies: nil,
lock_duration: nil,
to_currency: nil,
usage: nil
)
@expand = expand
@from_currencies = from_currencies
@lock_duration = lock_duration
@to_currency = to_currency
@usage = usage
end
end
# Time at which the quote was created, measured in seconds since the Unix epoch.
attr_reader :created
# Unique identifier for the object.
attr_reader :id
# The duration the exchange rate quote remains valid from creation time. Allowed values are none, hour, and day. Note that for the test mode API available in alpha, you can request an extended quote, but it won't be usable for any transactions.
attr_reader :lock_duration
# Time at which the quote will expire, measured in seconds since the Unix epoch.
#
# If lock_duration is set to none this field will be set to null.
attr_reader :lock_expires_at
# Lock status of the quote. Transitions from active to expired once past the lock_expires_at timestamp.
#
# Can return value none, active, or expired.
attr_reader :lock_status
# String representing the object's type. Objects of the same type share the same value.
attr_reader :object
# Information about the rates.
attr_reader :rates
# The currency to convert into, typically this is the currency that you want to settle to your Stripe balance. Three-letter ISO currency code, in lowercase. Must be a supported currency.
attr_reader :to_currency
# Attribute for field usage
attr_reader :usage
# Creates an FX Quote object
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/fx_quotes", params: params, opts: opts)
end
# Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first.
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/fx_quotes", params: params, opts: opts)
end
end
end

View File

@ -48,7 +48,6 @@ module Stripe
end
nested_resource_class_methods :line, operations: %i[list]
nested_resource_class_methods :payment, operations: %i[retrieve list]
class AmountsDue < Stripe::StripeObject
# Incremental amount due for this payment in cents (or local equivalent).
@ -2191,21 +2190,6 @@ module Stripe
end
end
class AttachPaymentIntentParams < Stripe::RequestParams
# The portion of the PaymentIntents `amount` that should be applied to thisinvoice. Defaults to the entire amount.
attr_accessor :amount_requested
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The ID of the PaymentIntent to attach to the invoice.
attr_accessor :payment_intent
def initialize(amount_requested: nil, expand: nil, payment_intent: nil)
@amount_requested = amount_requested
@expand = expand
@payment_intent = payment_intent
end
end
class FinalizeInvoiceParams < Stripe::RequestParams
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
attr_accessor :auto_advance
@ -4397,42 +4381,6 @@ module Stripe
)
end
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
# When the PaymentIntent's status changes to succeeded, the payment is credited
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
# invoice's status becomes paid.
#
# If the PaymentIntent's status is already succeeded when it is attached, it is
# credited to the invoice immediately.
#
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
def attach_payment_intent(params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
# When the PaymentIntent's status changes to succeeded, the payment is credited
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
# invoice's status becomes paid.
#
# If the PaymentIntent's status is already succeeded when it is attached, it is
# credited to the invoice immediately.
#
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
def self.attach_payment_intent(invoice, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
params: params,
opts: opts
)
end
# This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)

View File

@ -16,6 +16,7 @@ module Stripe
class PaymentIntent < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
extend Stripe::APIOperations::NestedResource
extend Stripe::APIOperations::Search
include Stripe::APIOperations::Save
@ -24,11 +25,35 @@ module Stripe
"payment_intent"
end
nested_resource_class_methods :amount_details_line_item, operations: %i[list]
class AmountDetails < Stripe::StripeObject
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
end
class Tax < Stripe::StripeObject
# Total portion of the amount that is for tax.
attr_reader :total_tax_amount
end
class Tip < Stripe::StripeObject
# Portion of the amount that corresponds to a tip.
attr_reader :amount
end
# The amount an item 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
# Attribute for field shipping
attr_reader :shipping
# Attribute for field tax
attr_reader :tax
# Attribute for field tip
attr_reader :tip
end
@ -863,8 +888,12 @@ module Stripe
end
# Attribute for field car_rental
attr_reader :car_rental
# 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_reader :customer_reference
# Attribute for field event_details
attr_reader :event_details
# A unique value assigned by the business to identify the transaction.
attr_reader :order_reference
# Attribute for field subscription
attr_reader :subscription
end
@ -2691,26 +2720,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -2815,12 +2852,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -5348,6 +5388,8 @@ module Stripe
attr_accessor :error_on_requires_action
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
attr_accessor :fx_quote
# ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
attr_accessor :mandate
# This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
@ -5421,6 +5463,7 @@ module Stripe
description: nil,
error_on_requires_action: nil,
expand: nil,
fx_quote: nil,
mandate: nil,
mandate_data: nil,
metadata: nil,
@ -5458,6 +5501,7 @@ module Stripe
@description = description
@error_on_requires_action = error_on_requires_action
@expand = expand
@fx_quote = fx_quote
@mandate = mandate
@mandate_data = mandate_data
@metadata = metadata
@ -6179,26 +6223,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -6303,12 +6355,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -8803,6 +8858,8 @@ module Stripe
attr_accessor :description
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
attr_accessor :fx_quote
# This hash contains details about the Mandate to create.
attr_accessor :mandate_data
# 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`.
@ -8856,6 +8913,7 @@ module Stripe
customer_account: nil,
description: nil,
expand: nil,
fx_quote: nil,
mandate_data: nil,
metadata: nil,
payment_details: nil,
@ -8881,6 +8939,7 @@ module Stripe
@customer_account = customer_account
@description = description
@expand = expand
@fx_quote = fx_quote
@mandate_data = mandate_data
@metadata = metadata
@payment_details = payment_details
@ -9613,26 +9672,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -10399,26 +10466,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -10523,12 +10598,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -13011,6 +13089,8 @@ module Stripe
attr_accessor :error_on_requires_action
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
attr_accessor :fx_quote
# ID of the mandate that's used for this payment.
attr_accessor :mandate
# Attribute for param field mandate_data
@ -13059,6 +13139,7 @@ module Stripe
confirmation_token: nil,
error_on_requires_action: nil,
expand: nil,
fx_quote: nil,
mandate: nil,
mandate_data: nil,
off_session: nil,
@ -13080,6 +13161,7 @@ module Stripe
@confirmation_token = confirmation_token
@error_on_requires_action = error_on_requires_action
@expand = expand
@fx_quote = fx_quote
@mandate = mandate
@mandate_data = mandate_data
@off_session = off_session
@ -13345,6 +13427,8 @@ module Stripe
attr_reader :customer_account
# An arbitrary string attached to the object. Often useful for displaying to users.
attr_reader :description
# The FX Quote used for the PaymentIntent.
attr_reader :fx_quote
# Unique identifier for the object.
attr_reader :id
# The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.

View File

@ -0,0 +1,65 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
class PaymentIntentAmountDetailsLineItem < APIResource
OBJECT_NAME = "payment_intent_amount_details_line_item"
def self.object_name
"payment_intent_amount_details_line_item"
end
class PaymentMethodOptions < Stripe::StripeObject
class Card < Stripe::StripeObject
# Attribute for field commodity_code
attr_reader :commodity_code
end
class Klarna < Stripe::StripeObject
# Attribute for field image_url
attr_reader :image_url
# Attribute for field product_url
attr_reader :product_url
end
class Paypal < Stripe::StripeObject
# Type of the line item.
attr_reader :category
# Description of the line item.
attr_reader :description
# The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers).
attr_reader :sold_by
end
# Attribute for field card
attr_reader :card
# Attribute for field klarna
attr_reader :klarna
# Attribute for field paypal
attr_reader :paypal
end
class Tax < Stripe::StripeObject
# Total portion of the amount that is for tax.
attr_reader :total_tax_amount
end
# The amount an item was discounted for. Positive integer.
attr_reader :discount_amount
# Unique identifier for the object.
attr_reader :id
# String representing the object's type. Objects of the same type share the same value.
attr_reader :object
# Payment method-specific information for line items.
attr_reader :payment_method_options
# 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
# A unit of measure for the line item, such as gallons, feet, meters, etc.
attr_reader :unit_of_measure
end
end

View File

@ -80,6 +80,8 @@ module Stripe
attr_reader :name
# Billing phone number (including extension).
attr_reader :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_reader :tax_id
end
class Blik < Stripe::StripeObject; end
@ -825,12 +827,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -1488,12 +1493,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end

View File

@ -596,6 +596,21 @@ module Stripe
attr_reader :display_preference
end
class Pix < Stripe::StripeObject
class DisplayPreference < Stripe::StripeObject
# For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
attr_reader :overridable
# The account's display preference.
attr_reader :preference
# The effective display preference value.
attr_reader :value
end
# Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
attr_reader :available
# Attribute for field display_preference
attr_reader :display_preference
end
class Promptpay < Stripe::StripeObject
class DisplayPreference < Stripe::StripeObject
# For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
@ -1467,6 +1482,23 @@ module Stripe
end
end
class Pix < Stripe::RequestParams
class DisplayPreference < Stripe::RequestParams
# The account's preference for whether or not to display this payment method.
attr_accessor :preference
def initialize(preference: nil)
@preference = preference
end
end
# Whether or not the payment method should be displayed.
attr_accessor :display_preference
def initialize(display_preference: nil)
@display_preference = display_preference
end
end
class Promptpay < Stripe::RequestParams
class DisplayPreference < Stripe::RequestParams
# The account's preference for whether or not to display this payment method.
@ -1754,6 +1786,8 @@ module Stripe
attr_accessor :paypal
# PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details.
attr_accessor :payto
# Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details.
attr_accessor :pix
# PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
attr_accessor :promptpay
# QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app.
@ -1822,6 +1856,7 @@ module Stripe
paynow: nil,
paypal: nil,
payto: nil,
pix: nil,
promptpay: nil,
qris: nil,
revolut_pay: nil,
@ -1877,6 +1912,7 @@ module Stripe
@paynow = paynow
@paypal = paypal
@payto = payto
@pix = pix
@promptpay = promptpay
@qris = qris
@revolut_pay = revolut_pay
@ -2556,6 +2592,23 @@ module Stripe
end
end
class Pix < Stripe::RequestParams
class DisplayPreference < Stripe::RequestParams
# The account's preference for whether or not to display this payment method.
attr_accessor :preference
def initialize(preference: nil)
@preference = preference
end
end
# Whether or not the payment method should be displayed.
attr_accessor :display_preference
def initialize(display_preference: nil)
@display_preference = display_preference
end
end
class Promptpay < Stripe::RequestParams
class DisplayPreference < Stripe::RequestParams
# The account's preference for whether or not to display this payment method.
@ -2843,6 +2896,8 @@ module Stripe
attr_accessor :paypal
# PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details.
attr_accessor :payto
# Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details.
attr_accessor :pix
# PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
attr_accessor :promptpay
# QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app.
@ -2911,6 +2966,7 @@ module Stripe
paynow: nil,
paypal: nil,
payto: nil,
pix: nil,
promptpay: nil,
qris: nil,
revolut_pay: nil,
@ -2966,6 +3022,7 @@ module Stripe
@paynow = paynow
@paypal = paypal
@payto = payto
@pix = pix
@promptpay = promptpay
@qris = qris
@revolut_pay = revolut_pay
@ -3072,6 +3129,8 @@ module Stripe
attr_reader :paypal
# Attribute for field payto
attr_reader :payto
# Attribute for field pix
attr_reader :pix
# Attribute for field promptpay
attr_reader :promptpay
# Attribute for field qris

View File

@ -180,6 +180,28 @@ module Stripe
attr_reader :pending_verification
end
class UsCfpbData < Stripe::StripeObject
class EthnicityDetails < Stripe::StripeObject
# The persons ethnicity
attr_reader :ethnicity
# Please specify your origin, when other is selected.
attr_reader :ethnicity_other
end
class RaceDetails < Stripe::StripeObject
# The persons race.
attr_reader :race
# Please specify your race, when other is selected.
attr_reader :race_other
end
# The persons ethnicity details
attr_reader :ethnicity_details
# The persons race details
attr_reader :race_details
# The persons self-identified gender
attr_reader :self_identified_gender
end
class Verification < Stripe::StripeObject
class AdditionalDocument < Stripe::StripeObject
# The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
@ -210,7 +232,7 @@ module Stripe
attr_reader :details_code
# Attribute for field document
attr_reader :document
# The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.
# The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. Please refer [guide](https://stripe.com/docs/connect/handling-api-verification) to handle verification updates.
attr_reader :status
end
# The account the person is associated with.
@ -273,6 +295,8 @@ module Stripe
attr_reader :requirements
# Whether the last four digits of the person's Social Security number have been provided (U.S. only).
attr_reader :ssn_last_4_provided
# Demographic data related to the person.
attr_reader :us_cfpb_data
# Attribute for field verification
attr_reader :verification
# Always true for a deleted object

View File

@ -8,6 +8,7 @@ module Stripe
class RedactionJob < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
extend Stripe::APIOperations::NestedResource
include Stripe::APIOperations::Save
OBJECT_NAME = "privacy.redaction_job"
@ -15,6 +16,8 @@ module Stripe
"privacy.redaction_job"
end
nested_resource_class_methods :validation_error, operations: %i[retrieve list]
class ListParams < Stripe::RequestParams
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
attr_accessor :ending_before

View File

@ -5,30 +5,11 @@ module Stripe
module Privacy
# Validation errors
class RedactionJobValidationError < APIResource
extend Stripe::APIOperations::List
OBJECT_NAME = "privacy.redaction_job_validation_error"
def self.object_name
"privacy.redaction_job_validation_error"
end
class ListParams < Stripe::RequestParams
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
attr_accessor :ending_before
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
attr_accessor :limit
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
attr_accessor :starting_after
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
@ending_before = ending_before
@expand = expand
@limit = limit
@starting_after = starting_after
end
end
# Attribute for field code
attr_reader :code
# Attribute for field erroring_object
@ -39,16 +20,6 @@ module Stripe
attr_reader :message
# String representing the object's type. Objects of the same type share the same value.
attr_reader :object
# List validation errors method
def self.list(job, params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/privacy/redaction_jobs/%<job>s/validation_errors", { job: CGI.escape(job) }),
params: params,
opts: opts
)
end
end
end
end

View File

@ -405,6 +405,8 @@ module Stripe
attr_reader :object
# ID of the PaymentIntent that's refunded.
attr_reader :payment_intent
# Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`.
attr_reader :pending_reason
# Attribute for field presentment_details
attr_reader :presentment_details
# Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).

View File

@ -548,12 +548,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -1761,12 +1764,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -2974,12 +2980,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end

View File

@ -1299,7 +1299,7 @@ module Stripe
"/#{CGI.escape(id)}"
opts = Util.normalize_opts(opts)
APIRequestor.active_requestor.execute_request_initialize_from(:delete, url, :api, self,
params: params, opts: opts)
params: params, opts: RequestOptions.extract_opts_from_hash(opts))
end
def source_transactions(params = {}, opts = {})

View File

@ -55,6 +55,16 @@ module Stripe
attr_reader :type
end
class Aw < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
end
class Az < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
end
class Ba < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
@ -65,6 +75,11 @@ module Stripe
attr_reader :type
end
class Bd < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
end
class Be < Stripe::StripeObject
class Standard < Stripe::StripeObject
# Place of supply scheme used in an EU standard registration.
@ -92,6 +107,11 @@ module Stripe
attr_reader :type
end
class Bj < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
end
class Bs < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
@ -214,6 +234,11 @@ module Stripe
attr_reader :type
end
class Et < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
end
class Fi < Stripe::StripeObject
class Standard < Stripe::StripeObject
# Place of supply scheme used in an EU standard registration.
@ -331,6 +356,11 @@ module Stripe
attr_reader :type
end
class Kg < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
end
class Kh < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
@ -346,6 +376,11 @@ module Stripe
attr_reader :type
end
class La < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
end
class Lt < Stripe::StripeObject
class Standard < Stripe::StripeObject
# Place of supply scheme used in an EU standard registration.
@ -466,6 +501,11 @@ module Stripe
attr_reader :type
end
class Ph < Stripe::StripeObject
# Type of registration in `country`.
attr_reader :type
end
class Pl < Stripe::StripeObject
class Standard < Stripe::StripeObject
# Place of supply scheme used in an EU standard registration.
@ -661,16 +701,24 @@ module Stripe
attr_reader :at
# Attribute for field au
attr_reader :au
# Attribute for field aw
attr_reader :aw
# Attribute for field az
attr_reader :az
# Attribute for field ba
attr_reader :ba
# Attribute for field bb
attr_reader :bb
# Attribute for field bd
attr_reader :bd
# Attribute for field be
attr_reader :be
# Attribute for field bg
attr_reader :bg
# Attribute for field bh
attr_reader :bh
# Attribute for field bj
attr_reader :bj
# Attribute for field bs
attr_reader :bs
# Attribute for field by
@ -703,6 +751,8 @@ module Stripe
attr_reader :eg
# Attribute for field es
attr_reader :es
# Attribute for field et
attr_reader :et
# Attribute for field fi
attr_reader :fi
# Attribute for field fr
@ -733,12 +783,16 @@ module Stripe
attr_reader :jp
# Attribute for field ke
attr_reader :ke
# Attribute for field kg
attr_reader :kg
# Attribute for field kh
attr_reader :kh
# Attribute for field kr
attr_reader :kr
# Attribute for field kz
attr_reader :kz
# Attribute for field la
attr_reader :la
# Attribute for field lt
attr_reader :lt
# Attribute for field lu
@ -775,6 +829,8 @@ module Stripe
attr_reader :om
# Attribute for field pe
attr_reader :pe
# Attribute for field ph
attr_reader :ph
# Attribute for field pl
attr_reader :pl
# Attribute for field pt
@ -919,6 +975,24 @@ module Stripe
end
end
class Aw < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Az < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Ba < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
@ -937,6 +1011,15 @@ module Stripe
end
end
class Bd < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Be < Stripe::RequestParams
class Standard < Stripe::RequestParams
# Place of supply scheme used in an EU standard registration.
@ -986,6 +1069,15 @@ module Stripe
end
end
class Bj < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Bs < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
@ -1207,6 +1299,15 @@ module Stripe
end
end
class Et < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Fi < Stripe::RequestParams
class Standard < Stripe::RequestParams
# Place of supply scheme used in an EU standard registration.
@ -1419,6 +1520,15 @@ module Stripe
end
end
class Kg < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Kh < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
@ -1446,6 +1556,15 @@ module Stripe
end
end
class La < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Lt < Stripe::RequestParams
class Standard < Stripe::RequestParams
# Place of supply scheme used in an EU standard registration.
@ -1663,6 +1782,15 @@ module Stripe
end
end
class Ph < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Pl < Stripe::RequestParams
class Standard < Stripe::RequestParams
# Place of supply scheme used in an EU standard registration.
@ -2011,16 +2139,24 @@ module Stripe
attr_accessor :at
# Options for the registration in AU.
attr_accessor :au
# Options for the registration in AW.
attr_accessor :aw
# Options for the registration in AZ.
attr_accessor :az
# Options for the registration in BA.
attr_accessor :ba
# Options for the registration in BB.
attr_accessor :bb
# Options for the registration in BD.
attr_accessor :bd
# Options for the registration in BE.
attr_accessor :be
# Options for the registration in BG.
attr_accessor :bg
# Options for the registration in BH.
attr_accessor :bh
# Options for the registration in BJ.
attr_accessor :bj
# Options for the registration in BS.
attr_accessor :bs
# Options for the registration in BY.
@ -2053,6 +2189,8 @@ module Stripe
attr_accessor :eg
# Options for the registration in ES.
attr_accessor :es
# Options for the registration in ET.
attr_accessor :et
# Options for the registration in FI.
attr_accessor :fi
# Options for the registration in FR.
@ -2083,12 +2221,16 @@ module Stripe
attr_accessor :jp
# Options for the registration in KE.
attr_accessor :ke
# Options for the registration in KG.
attr_accessor :kg
# Options for the registration in KH.
attr_accessor :kh
# Options for the registration in KR.
attr_accessor :kr
# Options for the registration in KZ.
attr_accessor :kz
# Options for the registration in LA.
attr_accessor :la
# Options for the registration in LT.
attr_accessor :lt
# Options for the registration in LU.
@ -2125,6 +2267,8 @@ module Stripe
attr_accessor :om
# Options for the registration in PE.
attr_accessor :pe
# Options for the registration in PH.
attr_accessor :ph
# Options for the registration in PL.
attr_accessor :pl
# Options for the registration in PT.
@ -2181,11 +2325,15 @@ module Stripe
ao: nil,
at: nil,
au: nil,
aw: nil,
az: nil,
ba: nil,
bb: nil,
bd: nil,
be: nil,
bg: nil,
bh: nil,
bj: nil,
bs: nil,
by: nil,
ca: nil,
@ -2202,6 +2350,7 @@ module Stripe
ee: nil,
eg: nil,
es: nil,
et: nil,
fi: nil,
fr: nil,
gb: nil,
@ -2217,9 +2366,11 @@ module Stripe
it: nil,
jp: nil,
ke: nil,
kg: nil,
kh: nil,
kr: nil,
kz: nil,
la: nil,
lt: nil,
lu: nil,
lv: nil,
@ -2238,6 +2389,7 @@ module Stripe
nz: nil,
om: nil,
pe: nil,
ph: nil,
pl: nil,
pt: nil,
ro: nil,
@ -2269,11 +2421,15 @@ module Stripe
@ao = ao
@at = at
@au = au
@aw = aw
@az = az
@ba = ba
@bb = bb
@bd = bd
@be = be
@bg = bg
@bh = bh
@bj = bj
@bs = bs
@by = by
@ca = ca
@ -2290,6 +2446,7 @@ module Stripe
@ee = ee
@eg = eg
@es = es
@et = et
@fi = fi
@fr = fr
@gb = gb
@ -2305,9 +2462,11 @@ module Stripe
@it = it
@jp = jp
@ke = ke
@kg = kg
@kh = kh
@kr = kr
@kz = kz
@la = la
@lt = lt
@lu = lu
@lv = lv
@ -2326,6 +2485,7 @@ module Stripe
@nz = nz
@om = om
@pe = pe
@ph = ph
@pl = pl
@pt = pt
@ro = ro

View File

@ -164,6 +164,21 @@ module Stripe
end
end
class RegistrationDate < Stripe::RequestParams
# The day of registration, between 1 and 31.
attr_accessor :day
# The month of registration, between 1 and 12.
attr_accessor :month
# The four-digit year of registration.
attr_accessor :year
def initialize(day: nil, month: nil, year: nil)
@day = day
@month = month
@year = year
end
end
class Verification < Stripe::RequestParams
class Document < Stripe::RequestParams
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -215,6 +230,8 @@ module Stripe
attr_accessor :ownership_exemption_reason
# The company's phone number (used for verification).
attr_accessor :phone
# Attribute for param field registration_date
attr_accessor :registration_date
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
attr_accessor :registration_number
# The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
@ -245,6 +262,7 @@ module Stripe
ownership_declaration_shown_and_signed: nil,
ownership_exemption_reason: nil,
phone: nil,
registration_date: nil,
registration_number: nil,
structure: nil,
tax_id: nil,
@ -268,6 +286,7 @@ module Stripe
@ownership_declaration_shown_and_signed = ownership_declaration_shown_and_signed
@ownership_exemption_reason = ownership_exemption_reason
@phone = phone
@registration_date = registration_date
@registration_number = registration_number
@structure = structure
@tax_id = tax_id
@ -971,6 +990,44 @@ module Stripe
end
end
class UsCfpbData < Stripe::RequestParams
class EthnicityDetails < Stripe::RequestParams
# The persons ethnicity
attr_accessor :ethnicity
# Please specify your origin, when other is selected.
attr_accessor :ethnicity_other
def initialize(ethnicity: nil, ethnicity_other: nil)
@ethnicity = ethnicity
@ethnicity_other = ethnicity_other
end
end
class RaceDetails < Stripe::RequestParams
# The persons race.
attr_accessor :race
# Please specify your race, when other is selected.
attr_accessor :race_other
def initialize(race: nil, race_other: nil)
@race = race
@race_other = race_other
end
end
# The persons ethnicity details
attr_accessor :ethnicity_details
# The persons race details
attr_accessor :race_details
# The persons self-identified gender
attr_accessor :self_identified_gender
def initialize(ethnicity_details: nil, race_details: nil, self_identified_gender: nil)
@ethnicity_details = ethnicity_details
@race_details = race_details
@self_identified_gender = self_identified_gender
end
end
class Verification < Stripe::RequestParams
class AdditionalDocument < Stripe::RequestParams
# The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -1055,6 +1112,8 @@ module Stripe
attr_accessor :relationship
# The last four digits of the person's Social Security number (U.S. only).
attr_accessor :ssn_last_4
# Demographic data related to the person.
attr_accessor :us_cfpb_data
# The person's verification status.
attr_accessor :verification
@ -1084,6 +1143,7 @@ module Stripe
registered_address: nil,
relationship: nil,
ssn_last_4: nil,
us_cfpb_data: nil,
verification: nil
)
@additional_tos_acceptances = additional_tos_acceptances
@ -1111,6 +1171,7 @@ module Stripe
@registered_address = registered_address
@relationship = relationship
@ssn_last_4 = ssn_last_4
@us_cfpb_data = us_cfpb_data
@verification = verification
end
end

View File

@ -88,6 +88,8 @@ module Stripe
attr_accessor :destination
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The FX rate in the quote is validated and used to convert the transfer amount to the destination currency.
attr_accessor :fx_quote
# 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
# You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.
@ -103,6 +105,7 @@ module Stripe
description: nil,
destination: nil,
expand: nil,
fx_quote: nil,
metadata: nil,
source_transaction: nil,
source_type: nil,
@ -113,6 +116,7 @@ module Stripe
@description = description
@destination = destination
@expand = expand
@fx_quote = fx_quote
@metadata = metadata
@source_transaction = source_transaction
@source_type = source_type
@ -150,6 +154,8 @@ module Stripe
attr_reader :destination
# If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
attr_reader :destination_payment
# The FX Quote used for the transfer.
attr_reader :fx_quote
# Unique identifier for the object.
attr_reader :id
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

View File

@ -220,12 +220,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end

View File

@ -75,6 +75,7 @@ require "stripe/services/financial_connections/transaction_service"
require "stripe/services/financial_connections_service"
require "stripe/services/forwarding/request_service"
require "stripe/services/forwarding_service"
require "stripe/services/fx_quote_service"
require "stripe/services/gift_cards/card_service"
require "stripe/services/gift_cards/transaction_service"
require "stripe/services/gift_cards_service"
@ -83,7 +84,6 @@ require "stripe/services/identity/verification_session_service"
require "stripe/services/identity_service"
require "stripe/services/invoice_item_service"
require "stripe/services/invoice_line_item_service"
require "stripe/services/invoice_payment_service"
require "stripe/services/invoice_rendering_template_service"
require "stripe/services/invoice_service"
require "stripe/services/issuing/authorization_service"
@ -103,6 +103,7 @@ require "stripe/services/margin_service"
require "stripe/services/order_line_item_service"
require "stripe/services/order_service"
require "stripe/services/payment_attempt_record_service"
require "stripe/services/payment_intent_amount_details_line_item_service"
require "stripe/services/payment_intent_service"
require "stripe/services/payment_link_line_item_service"
require "stripe/services/payment_link_service"

View File

@ -266,6 +266,44 @@ module Stripe
end
end
class UsCfpbData < Stripe::RequestParams
class EthnicityDetails < Stripe::RequestParams
# The persons ethnicity
attr_accessor :ethnicity
# Please specify your origin, when other is selected.
attr_accessor :ethnicity_other
def initialize(ethnicity: nil, ethnicity_other: nil)
@ethnicity = ethnicity
@ethnicity_other = ethnicity_other
end
end
class RaceDetails < Stripe::RequestParams
# The persons race.
attr_accessor :race
# Please specify your race, when other is selected.
attr_accessor :race_other
def initialize(race: nil, race_other: nil)
@race = race
@race_other = race_other
end
end
# The persons ethnicity details
attr_accessor :ethnicity_details
# The persons race details
attr_accessor :race_details
# The persons self-identified gender
attr_accessor :self_identified_gender
def initialize(ethnicity_details: nil, race_details: nil, self_identified_gender: nil)
@ethnicity_details = ethnicity_details
@race_details = race_details
@self_identified_gender = self_identified_gender
end
end
class Verification < Stripe::RequestParams
class AdditionalDocument < Stripe::RequestParams
# The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -354,6 +392,8 @@ module Stripe
attr_accessor :relationship
# The last four digits of the person's Social Security number (U.S. only).
attr_accessor :ssn_last_4
# Demographic data related to the person.
attr_accessor :us_cfpb_data
# The person's verification status.
attr_accessor :verification
@ -385,6 +425,7 @@ module Stripe
registered_address: nil,
relationship: nil,
ssn_last_4: nil,
us_cfpb_data: nil,
verification: nil
)
@additional_tos_acceptances = additional_tos_acceptances
@ -414,6 +455,7 @@ module Stripe
@registered_address = registered_address
@relationship = relationship
@ssn_last_4 = ssn_last_4
@us_cfpb_data = us_cfpb_data
@verification = verification
end
end
@ -726,6 +768,44 @@ module Stripe
end
end
class UsCfpbData < Stripe::RequestParams
class EthnicityDetails < Stripe::RequestParams
# The persons ethnicity
attr_accessor :ethnicity
# Please specify your origin, when other is selected.
attr_accessor :ethnicity_other
def initialize(ethnicity: nil, ethnicity_other: nil)
@ethnicity = ethnicity
@ethnicity_other = ethnicity_other
end
end
class RaceDetails < Stripe::RequestParams
# The persons race.
attr_accessor :race
# Please specify your race, when other is selected.
attr_accessor :race_other
def initialize(race: nil, race_other: nil)
@race = race
@race_other = race_other
end
end
# The persons ethnicity details
attr_accessor :ethnicity_details
# The persons race details
attr_accessor :race_details
# The persons self-identified gender
attr_accessor :self_identified_gender
def initialize(ethnicity_details: nil, race_details: nil, self_identified_gender: nil)
@ethnicity_details = ethnicity_details
@race_details = race_details
@self_identified_gender = self_identified_gender
end
end
class Verification < Stripe::RequestParams
class AdditionalDocument < Stripe::RequestParams
# The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -814,6 +894,8 @@ module Stripe
attr_accessor :relationship
# The last four digits of the person's Social Security number (U.S. only).
attr_accessor :ssn_last_4
# Demographic data related to the person.
attr_accessor :us_cfpb_data
# The person's verification status.
attr_accessor :verification
@ -845,6 +927,7 @@ module Stripe
registered_address: nil,
relationship: nil,
ssn_last_4: nil,
us_cfpb_data: nil,
verification: nil
)
@additional_tos_acceptances = additional_tos_acceptances
@ -874,6 +957,7 @@ module Stripe
@registered_address = registered_address
@relationship = relationship
@ssn_last_4 = ssn_last_4
@us_cfpb_data = us_cfpb_data
@verification = verification
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :capabilities, :external_accounts, :login_links, :persons
def initialize(requestor)
super(requestor)
super
@capabilities = Stripe::AccountCapabilityService.new(@requestor)
@external_accounts = Stripe::AccountExternalAccountService.new(@requestor)
@login_links = Stripe::AccountLoginLinkService.new(@requestor)
@ -1316,6 +1316,21 @@ module Stripe
end
end
class RegistrationDate < Stripe::RequestParams
# The day of registration, between 1 and 31.
attr_accessor :day
# The month of registration, between 1 and 12.
attr_accessor :month
# The four-digit year of registration.
attr_accessor :year
def initialize(day: nil, month: nil, year: nil)
@day = day
@month = month
@year = year
end
end
class Verification < Stripe::RequestParams
class Document < Stripe::RequestParams
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -1365,6 +1380,8 @@ module Stripe
attr_accessor :ownership_exemption_reason
# The company's phone number (used for verification).
attr_accessor :phone
# Attribute for param field registration_date
attr_accessor :registration_date
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
attr_accessor :registration_number
# The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
@ -1394,6 +1411,7 @@ module Stripe
ownership_declaration: nil,
ownership_exemption_reason: nil,
phone: nil,
registration_date: nil,
registration_number: nil,
structure: nil,
tax_id: nil,
@ -1416,6 +1434,7 @@ module Stripe
@ownership_declaration = ownership_declaration
@ownership_exemption_reason = ownership_exemption_reason
@phone = phone
@registration_date = registration_date
@registration_number = registration_number
@structure = structure
@tax_id = tax_id
@ -3567,6 +3586,21 @@ module Stripe
end
end
class RegistrationDate < Stripe::RequestParams
# The day of registration, between 1 and 31.
attr_accessor :day
# The month of registration, between 1 and 12.
attr_accessor :month
# The four-digit year of registration.
attr_accessor :year
def initialize(day: nil, month: nil, year: nil)
@day = day
@month = month
@year = year
end
end
class Verification < Stripe::RequestParams
class Document < Stripe::RequestParams
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -3616,6 +3650,8 @@ module Stripe
attr_accessor :ownership_exemption_reason
# The company's phone number (used for verification).
attr_accessor :phone
# Attribute for param field registration_date
attr_accessor :registration_date
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
attr_accessor :registration_number
# The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
@ -3645,6 +3681,7 @@ module Stripe
ownership_declaration: nil,
ownership_exemption_reason: nil,
phone: nil,
registration_date: nil,
registration_number: nil,
structure: nil,
tax_id: nil,
@ -3667,6 +3704,7 @@ module Stripe
@ownership_declaration = ownership_declaration
@ownership_exemption_reason = ownership_exemption_reason
@phone = phone
@registration_date = registration_date
@registration_number = registration_number
@structure = structure
@tax_id = tax_id

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :refunds
def initialize(requestor)
super(requestor)
super
@refunds = Stripe::ApplicationFeeRefundService.new(@requestor)
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :secrets
def initialize(requestor)
super(requestor)
super
@secrets = Stripe::Apps::SecretService.new(@requestor)
end
end

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :event_summaries
def initialize(requestor)
super(requestor)
super
@event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor)
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :configurations, :sessions
def initialize(requestor)
super(requestor)
super
@configurations = Stripe::BillingPortal::ConfigurationService.new(@requestor)
@sessions = Stripe::BillingPortal::SessionService.new(@requestor)
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :alerts, :credit_balance_summary, :credit_balance_transactions, :credit_grants, :meters, :meter_events, :meter_event_adjustments
def initialize(requestor)
super(requestor)
super
@alerts = Stripe::Billing::AlertService.new(@requestor)
@credit_balance_summary = Stripe::Billing::CreditBalanceSummaryService.new(@requestor)
@credit_balance_transactions = Stripe::Billing::CreditBalanceTransactionService

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :financing_offers, :financing_summary, :financing_transactions
def initialize(requestor)
super(requestor)
super
@financing_offers = Stripe::Capital::FinancingOfferService.new(@requestor)
@financing_summary = Stripe::Capital::FinancingSummaryService.new(@requestor)
@financing_transactions = Stripe::Capital::FinancingTransactionService.new(@requestor)

View File

@ -885,26 +885,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -1659,26 +1667,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :line_items
def initialize(requestor)
super(requestor)
super
@line_items = Stripe::Checkout::SessionLineItemService.new(@requestor)
end
@ -2201,7 +2201,7 @@ module Stripe
# prioritize the most relevant payment methods based on the customer's location and
# other characteristics.
attr_accessor :payment_method_types
# This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
# This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions.
#
# For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
attr_accessor :permissions
@ -2414,14 +2414,83 @@ module Stripe
@minimum = minimum
end
end
class PriceData < Stripe::RequestParams
class ProductData < Stripe::RequestParams
# The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
attr_accessor :description
# A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
attr_accessor :images
# 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
# The product's name, meant to be displayable to the customer.
attr_accessor :name
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
attr_accessor :tax_code
def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
@description = description
@images = images
@metadata = metadata
@name = name
@tax_code = tax_code
end
end
class Recurring < Stripe::RequestParams
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
attr_accessor :interval
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
attr_accessor :interval_count
def initialize(interval: nil, interval_count: nil)
@interval = interval
@interval_count = interval_count
end
end
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
attr_accessor :currency
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
attr_accessor :product
# Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
attr_accessor :product_data
# The recurring components of a price such as `interval` and `interval_count`.
attr_accessor :recurring
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
attr_accessor :tax_behavior
# A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
attr_accessor :unit_amount
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
attr_accessor :unit_amount_decimal
def initialize(
currency: nil,
product: nil,
product_data: nil,
recurring: nil,
tax_behavior: nil,
unit_amount: nil,
unit_amount_decimal: nil
)
@currency = currency
@product = product
@product_data = product_data
@recurring = recurring
@tax_behavior = tax_behavior
@unit_amount = unit_amount
@unit_amount_decimal = unit_amount_decimal
end
end
# When set, provides configuration for this items quantity to be adjusted by the customer during Checkout.
attr_accessor :adjustable_quantity
# ID of an existing line item.
attr_accessor :id
# 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
# The ID of the [Price](https://stripe.com/docs/api/prices).
# The ID of the [Price](https://stripe.com/docs/api/prices). One of `price` or `price_data` is required when creating a new line item.
attr_accessor :price
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item.
attr_accessor :price_data
# The quantity of the line item being purchased.
attr_accessor :quantity
# The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
@ -2432,6 +2501,7 @@ module Stripe
id: nil,
metadata: nil,
price: nil,
price_data: nil,
quantity: nil,
tax_rates: nil
)
@ -2439,6 +2509,7 @@ module Stripe
@id = id
@metadata = metadata
@price = price
@price_data = price_data
@quantity = quantity
@tax_rates = tax_rates
end
@ -2549,7 +2620,7 @@ module Stripe
@shipping_rate_data = shipping_rate_data
end
end
# Information about the customer collected within the Checkout Session.
# Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions.
attr_accessor :collected_information
# Specifies which fields in the response should be expanded.
attr_accessor :expand

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :sessions
def initialize(requestor)
super(requestor)
super
@sessions = Stripe::Checkout::SessionService.new(@requestor)
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :orders, :products, :suppliers
def initialize(requestor)
super(requestor)
super
@orders = Stripe::Climate::OrderService.new(@requestor)
@products = Stripe::Climate::ProductService.new(@requestor)
@suppliers = Stripe::Climate::SupplierService.new(@requestor)

View File

@ -97,6 +97,18 @@ module Stripe
@amount_off = amount_off
end
end
class Script < Stripe::RequestParams
# The configuration values of the script. The keys and values are specific to the script implementation.
attr_accessor :configuration
# The script implementation ID for this coupon.
attr_accessor :id
def initialize(configuration: nil, id: nil)
@configuration = configuration
@id = id
end
end
# A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
attr_accessor :amount_off
# A hash containing directions for what this Coupon will apply discounts to.
@ -123,6 +135,8 @@ module Stripe
attr_accessor :percent_off
# Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
attr_accessor :redeem_by
# Configuration of the [script](https://docs.stripe.com/billing/subscriptions/script-coupons) used to calculate the discount.
attr_accessor :script
def initialize(
amount_off: nil,
@ -137,7 +151,8 @@ module Stripe
metadata: nil,
name: nil,
percent_off: nil,
redeem_by: nil
redeem_by: nil,
script: nil
)
@amount_off = amount_off
@applies_to = applies_to
@ -152,6 +167,7 @@ module Stripe
@name = name
@percent_off = percent_off
@redeem_by = redeem_by
@script = script
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :line_items, :preview_lines
def initialize(requestor)
super(requestor)
super
@line_items = Stripe::CreditNoteLineItemService.new(@requestor)
@preview_lines = Stripe::CreditNotePreviewLinesService.new(@requestor)
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :cash_balance, :balance_transactions, :cash_balance_transactions, :payment_sources, :tax_ids, :payment_methods, :funding_instructions
def initialize(requestor)
super(requestor)
super
@cash_balance = Stripe::CustomerCashBalanceService.new(@requestor)
@balance_transactions = Stripe::CustomerBalanceTransactionService.new(@requestor)
@cash_balance_transactions = Stripe::CustomerCashBalanceTransactionService.new(@requestor)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :active_entitlements, :features
def initialize(requestor)
super(requestor)
super
@active_entitlements = Stripe::Entitlements::ActiveEntitlementService.new(@requestor)
@features = Stripe::Entitlements::FeatureService.new(@requestor)
end

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :inferred_balances, :owners
def initialize(requestor)
super(requestor)
super
@inferred_balances = Stripe::FinancialConnections::AccountInferredBalanceService
.new(@requestor)
@owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :accounts, :institutions, :sessions, :transactions
def initialize(requestor)
super(requestor)
super
@accounts = Stripe::FinancialConnections::AccountService.new(@requestor)
@institutions = Stripe::FinancialConnections::InstitutionService.new(@requestor)
@sessions = Stripe::FinancialConnections::SessionService.new(@requestor)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :requests
def initialize(requestor)
super(requestor)
super
@requests = Stripe::Forwarding::RequestService.new(@requestor)
end
end

View File

@ -0,0 +1,123 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
class FxQuoteService < StripeService
class ListParams < Stripe::RequestParams
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
attr_accessor :ending_before
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
attr_accessor :limit
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
attr_accessor :starting_after
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
@ending_before = ending_before
@expand = expand
@limit = limit
@starting_after = starting_after
end
end
class CreateParams < Stripe::RequestParams
class Usage < Stripe::RequestParams
class Payment < Stripe::RequestParams
# The Stripe account ID that the funds will be transferred to.
#
# This field should match the account ID that would be used in the PaymentIntents transfer_data[destination] field.
attr_accessor :destination
# The Stripe account ID that these funds are intended for.
#
# This field should match the account ID that would be used in the PaymentIntents on_behalf_of field.
attr_accessor :on_behalf_of
def initialize(destination: nil, on_behalf_of: nil)
@destination = destination
@on_behalf_of = on_behalf_of
end
end
class Transfer < Stripe::RequestParams
# The Stripe account ID that the funds will be transferred to.
#
# This field should match the account ID that would be used in the Transfers destination field.
attr_accessor :destination
def initialize(destination: nil)
@destination = destination
end
end
# The payment transaction details that are intended for the FX Quote.
attr_accessor :payment
# The transfer transaction details that are intended for the FX Quote.
attr_accessor :transfer
# Which transaction the FX Quote will be used for
#
# Can be “payment” | “transfer”
attr_accessor :type
def initialize(payment: nil, transfer: nil, type: nil)
@payment = payment
@transfer = transfer
@type = type
end
end
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies).
attr_accessor :from_currencies
# The duration that you wish the quote to be locked for. The quote will be usable for the duration specified. The default is `none`. The maximum is 1 day.
attr_accessor :lock_duration
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
attr_accessor :to_currency
# The usage specific information for the quote.
attr_accessor :usage
def initialize(
expand: nil,
from_currencies: nil,
lock_duration: nil,
to_currency: nil,
usage: nil
)
@expand = expand
@from_currencies = from_currencies
@lock_duration = lock_duration
@to_currency = to_currency
@usage = usage
end
end
class RetrieveParams < Stripe::RequestParams
# Specifies which fields in the response should be expanded.
attr_accessor :expand
def initialize(expand: nil)
@expand = expand
end
end
# Creates an FX Quote object
def create(params = {}, opts = {})
request(method: :post, path: "/v1/fx_quotes", params: params, opts: opts, base_address: :api)
end
# Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first.
def list(params = {}, opts = {})
request(method: :get, path: "/v1/fx_quotes", params: params, opts: opts, base_address: :api)
end
# Retrieve an FX Quote object
def retrieve(id, params = {}, opts = {})
request(
method: :get,
path: format("/v1/fx_quotes/%<id>s", { id: CGI.escape(id) }),
params: params,
opts: opts,
base_address: :api
)
end
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :cards, :transactions
def initialize(requestor)
super(requestor)
super
@cards = Stripe::GiftCards::CardService.new(@requestor)
@transactions = Stripe::GiftCards::TransactionService.new(@requestor)
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :verification_reports, :verification_sessions
def initialize(requestor)
super(requestor)
super
@verification_reports = Stripe::Identity::VerificationReportService.new(@requestor)
@verification_sessions = Stripe::Identity::VerificationSessionService.new(@requestor)
end

View File

@ -3,11 +3,10 @@
module Stripe
class InvoiceService < StripeService
attr_reader :payments, :line_items
attr_reader :line_items
def initialize(requestor)
super(requestor)
@payments = Stripe::InvoicePaymentService.new(@requestor)
super
@line_items = Stripe::InvoiceLineItemService.new(@requestor)
end
@ -1714,21 +1713,6 @@ module Stripe
end
end
class AttachPaymentIntentParams < Stripe::RequestParams
# The portion of the PaymentIntents `amount` that should be applied to thisinvoice. Defaults to the entire amount.
attr_accessor :amount_requested
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The ID of the PaymentIntent to attach to the invoice.
attr_accessor :payment_intent
def initialize(amount_requested: nil, expand: nil, payment_intent: nil)
@amount_requested = amount_requested
@expand = expand
@payment_intent = payment_intent
end
end
class FinalizeInvoiceParams < Stripe::RequestParams
# Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
attr_accessor :auto_advance
@ -3720,25 +3704,6 @@ module Stripe
)
end
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
# When the PaymentIntent's status changes to succeeded, the payment is credited
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
# invoice's status becomes paid.
#
# If the PaymentIntent's status is already succeeded when it is attached, it is
# credited to the invoice immediately.
#
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
def attach_payment_intent(invoice, params = {}, opts = {})
request(
method: :post,
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
params: params,
opts: opts,
base_address: :api
)
end
# This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
def create(params = {}, opts = {})
request(method: :post, path: "/v1/invoices", params: params, opts: opts, base_address: :api)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :authorizations, :cards, :cardholders, :credit_underwriting_records, :disputes, :dispute_settlement_details, :fraud_liability_debits, :personalization_designs, :physical_bundles, :tokens, :transactions
def initialize(requestor)
super(requestor)
super
@authorizations = Stripe::Issuing::AuthorizationService.new(@requestor)
@cards = Stripe::Issuing::CardService.new(@requestor)
@cardholders = Stripe::Issuing::CardholderService.new(@requestor)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :line_items
def initialize(requestor)
super(requestor)
super
@line_items = Stripe::OrderLineItemService.new(@requestor)
end

View File

@ -2,7 +2,7 @@
# frozen_string_literal: true
module Stripe
class InvoicePaymentService < StripeService
class PaymentIntentAmountDetailsLineItemService < StripeService
class ListParams < Stripe::RequestParams
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
attr_accessor :ending_before
@ -21,31 +21,11 @@ module Stripe
end
end
class RetrieveParams < Stripe::RequestParams
# Specifies which fields in the response should be expanded.
attr_accessor :expand
def initialize(expand: nil)
@expand = expand
end
end
# When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.
def list(invoice, params = {}, opts = {})
# Lists all LineItems of a given PaymentIntent.
def list(intent, params = {}, opts = {})
request(
method: :get,
path: format("/v1/invoices/%<invoice>s/payments", { invoice: CGI.escape(invoice) }),
params: params,
opts: opts,
base_address: :api
)
end
# Retrieves the invoice payment with the given ID.
def retrieve(invoice, invoice_payment, params = {}, opts = {})
request(
method: :get,
path: format("/v1/invoices/%<invoice>s/payments/%<invoice_payment>s", { invoice: CGI.escape(invoice), invoice_payment: CGI.escape(invoice_payment) }),
path: format("/v1/payment_intents/%<intent>s/amount_details_line_items", { intent: CGI.escape(intent) }),
params: params,
opts: opts,
base_address: :api

View File

@ -3,6 +3,13 @@
module Stripe
class PaymentIntentService < StripeService
attr_reader :amount_details_line_items
def initialize(requestor)
super
@amount_details_line_items = Stripe::PaymentIntentAmountDetailsLineItemService.new(@requestor)
end
class ListParams < Stripe::RequestParams
class Created < Stripe::RequestParams
# Minimum value to filter by (exclusive)
@ -774,26 +781,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -898,12 +913,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -3431,6 +3449,8 @@ module Stripe
attr_accessor :error_on_requires_action
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
attr_accessor :fx_quote
# ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
attr_accessor :mandate
# This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
@ -3504,6 +3524,7 @@ module Stripe
description: nil,
error_on_requires_action: nil,
expand: nil,
fx_quote: nil,
mandate: nil,
mandate_data: nil,
metadata: nil,
@ -3541,6 +3562,7 @@ module Stripe
@description = description
@error_on_requires_action = error_on_requires_action
@expand = expand
@fx_quote = fx_quote
@mandate = mandate
@mandate_data = mandate_data
@metadata = metadata
@ -4274,26 +4296,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -4398,12 +4428,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -6898,6 +6931,8 @@ module Stripe
attr_accessor :description
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
attr_accessor :fx_quote
# This hash contains details about the Mandate to create.
attr_accessor :mandate_data
# 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`.
@ -6951,6 +6986,7 @@ module Stripe
customer_account: nil,
description: nil,
expand: nil,
fx_quote: nil,
mandate_data: nil,
metadata: nil,
payment_details: nil,
@ -6976,6 +7012,7 @@ module Stripe
@customer_account = customer_account
@description = description
@expand = expand
@fx_quote = fx_quote
@mandate_data = mandate_data
@metadata = metadata
@payment_details = payment_details
@ -7708,26 +7745,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -8494,26 +8539,34 @@ module Stripe
end
# Car rental details for this PaymentIntent.
attr_accessor :car_rental
# 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
# Event details for this PaymentIntent
attr_accessor :event_details
# Flight reservation details for this PaymentIntent
attr_accessor :flight
# Lodging reservation details for this PaymentIntent
attr_accessor :lodging
# A unique value assigned by the business to identify the transaction.
attr_accessor :order_reference
# Subscription details for this PaymentIntent
attr_accessor :subscription
def initialize(
car_rental: nil,
customer_reference: nil,
event_details: nil,
flight: nil,
lodging: nil,
order_reference: nil,
subscription: nil
)
@car_rental = car_rental
@customer_reference = customer_reference
@event_details = event_details
@flight = flight
@lodging = lodging
@order_reference = order_reference
@subscription = subscription
end
end
@ -8618,12 +8671,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -11106,6 +11162,8 @@ module Stripe
attr_accessor :error_on_requires_action
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
attr_accessor :fx_quote
# ID of the mandate that's used for this payment.
attr_accessor :mandate
# Attribute for param field mandate_data
@ -11154,6 +11212,7 @@ module Stripe
confirmation_token: nil,
error_on_requires_action: nil,
expand: nil,
fx_quote: nil,
mandate: nil,
mandate_data: nil,
off_session: nil,
@ -11175,6 +11234,7 @@ module Stripe
@confirmation_token = confirmation_token
@error_on_requires_action = error_on_requires_action
@expand = expand
@fx_quote = fx_quote
@mandate = mandate
@mandate_data = mandate_data
@off_session = off_session

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :line_items
def initialize(requestor)
super(requestor)
super
@line_items = Stripe::PaymentLinkLineItemService.new(@requestor)
end

View File

@ -694,6 +694,23 @@ module Stripe
end
end
class Pix < Stripe::RequestParams
class DisplayPreference < Stripe::RequestParams
# The account's preference for whether or not to display this payment method.
attr_accessor :preference
def initialize(preference: nil)
@preference = preference
end
end
# Whether or not the payment method should be displayed.
attr_accessor :display_preference
def initialize(display_preference: nil)
@display_preference = display_preference
end
end
class Promptpay < Stripe::RequestParams
class DisplayPreference < Stripe::RequestParams
# The account's preference for whether or not to display this payment method.
@ -981,6 +998,8 @@ module Stripe
attr_accessor :paypal
# PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details.
attr_accessor :payto
# Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details.
attr_accessor :pix
# PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
attr_accessor :promptpay
# QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app.
@ -1049,6 +1068,7 @@ module Stripe
paynow: nil,
paypal: nil,
payto: nil,
pix: nil,
promptpay: nil,
qris: nil,
revolut_pay: nil,
@ -1104,6 +1124,7 @@ module Stripe
@paynow = paynow
@paypal = paypal
@payto = payto
@pix = pix
@promptpay = promptpay
@qris = qris
@revolut_pay = revolut_pay
@ -1792,6 +1813,23 @@ module Stripe
end
end
class Pix < Stripe::RequestParams
class DisplayPreference < Stripe::RequestParams
# The account's preference for whether or not to display this payment method.
attr_accessor :preference
def initialize(preference: nil)
@preference = preference
end
end
# Whether or not the payment method should be displayed.
attr_accessor :display_preference
def initialize(display_preference: nil)
@display_preference = display_preference
end
end
class Promptpay < Stripe::RequestParams
class DisplayPreference < Stripe::RequestParams
# The account's preference for whether or not to display this payment method.
@ -2079,6 +2117,8 @@ module Stripe
attr_accessor :paypal
# PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details.
attr_accessor :payto
# Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details.
attr_accessor :pix
# PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
attr_accessor :promptpay
# QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app.
@ -2147,6 +2187,7 @@ module Stripe
paynow: nil,
paypal: nil,
payto: nil,
pix: nil,
promptpay: nil,
qris: nil,
revolut_pay: nil,
@ -2202,6 +2243,7 @@ module Stripe
@paynow = paynow
@paypal = paypal
@payto = payto
@pix = pix
@promptpay = promptpay
@qris = qris
@revolut_pay = revolut_pay

View File

@ -134,12 +134,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -806,12 +809,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :validation_errors
def initialize(requestor)
super(requestor)
super
@validation_errors = Stripe::Privacy::RedactionJobValidationErrorService.new(@requestor)
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :redaction_jobs
def initialize(requestor)
super(requestor)
super
@redaction_jobs = Stripe::Privacy::RedactionJobService.new(@requestor)
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :features
def initialize(requestor)
super(requestor)
super
@features = Stripe::ProductFeatureService.new(@requestor)
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :preview_invoices, :preview_subscription_schedules, :lines, :line_items, :computed_upfront_line_items
def initialize(requestor)
super(requestor)
super
@preview_invoices = Stripe::QuotePreviewInvoiceService.new(@requestor)
@preview_subscription_schedules = Stripe::QuotePreviewSubscriptionScheduleService
.new(@requestor)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :early_fraud_warnings, :value_lists, :value_list_items
def initialize(requestor)
super(requestor)
super
@early_fraud_warnings = Stripe::Radar::EarlyFraudWarningService.new(@requestor)
@value_lists = Stripe::Radar::ValueListService.new(@requestor)
@value_list_items = Stripe::Radar::ValueListItemService.new(@requestor)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :report_runs, :report_types
def initialize(requestor)
super(requestor)
super
@report_runs = Stripe::Reporting::ReportRunService.new(@requestor)
@report_types = Stripe::Reporting::ReportTypeService.new(@requestor)
end

View File

@ -220,12 +220,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -1445,12 +1448,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end
@ -2658,12 +2664,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :scheduled_query_runs
def initialize(requestor)
super(requestor)
super
@scheduled_query_runs = Stripe::Sigma::ScheduledQueryRunService.new(@requestor)
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :transactions
def initialize(requestor)
super(requestor)
super
@transactions = Stripe::SourceTransactionService.new(@requestor)
end

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :line_items
def initialize(requestor)
super(requestor)
super
@line_items = Stripe::Tax::CalculationLineItemService.new(@requestor)
end

View File

@ -98,6 +98,24 @@ module Stripe
end
end
class Aw < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Az < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Ba < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
@ -116,6 +134,15 @@ module Stripe
end
end
class Bd < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Be < Stripe::RequestParams
class Standard < Stripe::RequestParams
# Place of supply scheme used in an EU standard registration.
@ -165,6 +192,15 @@ module Stripe
end
end
class Bj < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Bs < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
@ -386,6 +422,15 @@ module Stripe
end
end
class Et < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Fi < Stripe::RequestParams
class Standard < Stripe::RequestParams
# Place of supply scheme used in an EU standard registration.
@ -598,6 +643,15 @@ module Stripe
end
end
class Kg < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Kh < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
@ -625,6 +679,15 @@ module Stripe
end
end
class La < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Lt < Stripe::RequestParams
class Standard < Stripe::RequestParams
# Place of supply scheme used in an EU standard registration.
@ -842,6 +905,15 @@ module Stripe
end
end
class Ph < Stripe::RequestParams
# Type of registration to be created in `country`.
attr_accessor :type
def initialize(type: nil)
@type = type
end
end
class Pl < Stripe::RequestParams
class Standard < Stripe::RequestParams
# Place of supply scheme used in an EU standard registration.
@ -1190,16 +1262,24 @@ module Stripe
attr_accessor :at
# Options for the registration in AU.
attr_accessor :au
# Options for the registration in AW.
attr_accessor :aw
# Options for the registration in AZ.
attr_accessor :az
# Options for the registration in BA.
attr_accessor :ba
# Options for the registration in BB.
attr_accessor :bb
# Options for the registration in BD.
attr_accessor :bd
# Options for the registration in BE.
attr_accessor :be
# Options for the registration in BG.
attr_accessor :bg
# Options for the registration in BH.
attr_accessor :bh
# Options for the registration in BJ.
attr_accessor :bj
# Options for the registration in BS.
attr_accessor :bs
# Options for the registration in BY.
@ -1232,6 +1312,8 @@ module Stripe
attr_accessor :eg
# Options for the registration in ES.
attr_accessor :es
# Options for the registration in ET.
attr_accessor :et
# Options for the registration in FI.
attr_accessor :fi
# Options for the registration in FR.
@ -1262,12 +1344,16 @@ module Stripe
attr_accessor :jp
# Options for the registration in KE.
attr_accessor :ke
# Options for the registration in KG.
attr_accessor :kg
# Options for the registration in KH.
attr_accessor :kh
# Options for the registration in KR.
attr_accessor :kr
# Options for the registration in KZ.
attr_accessor :kz
# Options for the registration in LA.
attr_accessor :la
# Options for the registration in LT.
attr_accessor :lt
# Options for the registration in LU.
@ -1304,6 +1390,8 @@ module Stripe
attr_accessor :om
# Options for the registration in PE.
attr_accessor :pe
# Options for the registration in PH.
attr_accessor :ph
# Options for the registration in PL.
attr_accessor :pl
# Options for the registration in PT.
@ -1360,11 +1448,15 @@ module Stripe
ao: nil,
at: nil,
au: nil,
aw: nil,
az: nil,
ba: nil,
bb: nil,
bd: nil,
be: nil,
bg: nil,
bh: nil,
bj: nil,
bs: nil,
by: nil,
ca: nil,
@ -1381,6 +1473,7 @@ module Stripe
ee: nil,
eg: nil,
es: nil,
et: nil,
fi: nil,
fr: nil,
gb: nil,
@ -1396,9 +1489,11 @@ module Stripe
it: nil,
jp: nil,
ke: nil,
kg: nil,
kh: nil,
kr: nil,
kz: nil,
la: nil,
lt: nil,
lu: nil,
lv: nil,
@ -1417,6 +1512,7 @@ module Stripe
nz: nil,
om: nil,
pe: nil,
ph: nil,
pl: nil,
pt: nil,
ro: nil,
@ -1448,11 +1544,15 @@ module Stripe
@ao = ao
@at = at
@au = au
@aw = aw
@az = az
@ba = ba
@bb = bb
@bd = bd
@be = be
@bg = bg
@bh = bh
@bj = bj
@bs = bs
@by = by
@ca = ca
@ -1469,6 +1569,7 @@ module Stripe
@ee = ee
@eg = eg
@es = es
@et = et
@fi = fi
@fr = fr
@gb = gb
@ -1484,9 +1585,11 @@ module Stripe
@it = it
@jp = jp
@ke = ke
@kg = kg
@kh = kh
@kr = kr
@kz = kz
@la = la
@lt = lt
@lu = lu
@lv = lv
@ -1505,6 +1608,7 @@ module Stripe
@nz = nz
@om = om
@pe = pe
@ph = ph
@pl = pl
@pt = pt
@ro = ro

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :line_items
def initialize(requestor)
super(requestor)
super
@line_items = Stripe::Tax::TransactionLineItemService.new(@requestor)
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :associations, :calculations, :forms, :registrations, :settings, :transactions
def initialize(requestor)
super(requestor)
super
@associations = Stripe::Tax::AssociationService.new(@requestor)
@calculations = Stripe::Tax::CalculationService.new(@requestor)
@forms = Stripe::Tax::FormService.new(@requestor)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :configurations, :connection_tokens, :locations, :readers, :reader_collected_data
def initialize(requestor)
super(requestor)
super
@configurations = Stripe::Terminal::ConfigurationService.new(@requestor)
@connection_tokens = Stripe::Terminal::ConnectionTokenService.new(@requestor)
@locations = Stripe::Terminal::LocationService.new(@requestor)

View File

@ -105,12 +105,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :authorizations, :cards, :personalization_designs, :transactions
def initialize(requestor)
super(requestor)
super
@authorizations = Stripe::TestHelpers::Issuing::AuthorizationService.new(@requestor)
@cards = Stripe::TestHelpers::Issuing::CardService.new(@requestor)
@personalization_designs = Stripe::TestHelpers::Issuing::PersonalizationDesignService

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :readers
def initialize(requestor)
super(requestor)
super
@readers = Stripe::TestHelpers::Terminal::ReaderService.new(@requestor)
end
end

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :inbound_transfers, :outbound_payments, :outbound_transfers, :received_credits, :received_debits
def initialize(requestor)
super(requestor)
super
@inbound_transfers = Stripe::TestHelpers::Treasury::InboundTransferService.new(@requestor)
@outbound_payments = Stripe::TestHelpers::Treasury::OutboundPaymentService.new(@requestor)
@outbound_transfers = Stripe::TestHelpers::Treasury::OutboundTransferService.new(@requestor)

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :confirmation_tokens, :customers, :issuing, :refunds, :terminal, :test_clocks, :treasury
def initialize(requestor)
super(requestor)
super
@confirmation_tokens = Stripe::TestHelpers::ConfirmationTokenService.new(@requestor)
@customers = Stripe::TestHelpers::CustomerService.new(@requestor)
@issuing = Stripe::TestHelpers::IssuingService.new(@requestor)

View File

@ -146,6 +146,21 @@ module Stripe
end
end
class RegistrationDate < Stripe::RequestParams
# The day of registration, between 1 and 31.
attr_accessor :day
# The month of registration, between 1 and 12.
attr_accessor :month
# The four-digit year of registration.
attr_accessor :year
def initialize(day: nil, month: nil, year: nil)
@day = day
@month = month
@year = year
end
end
class Verification < Stripe::RequestParams
class Document < Stripe::RequestParams
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -197,6 +212,8 @@ module Stripe
attr_accessor :ownership_exemption_reason
# The company's phone number (used for verification).
attr_accessor :phone
# Attribute for param field registration_date
attr_accessor :registration_date
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
attr_accessor :registration_number
# The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
@ -227,6 +244,7 @@ module Stripe
ownership_declaration_shown_and_signed: nil,
ownership_exemption_reason: nil,
phone: nil,
registration_date: nil,
registration_number: nil,
structure: nil,
tax_id: nil,
@ -250,6 +268,7 @@ module Stripe
@ownership_declaration_shown_and_signed = ownership_declaration_shown_and_signed
@ownership_exemption_reason = ownership_exemption_reason
@phone = phone
@registration_date = registration_date
@registration_number = registration_number
@structure = structure
@tax_id = tax_id
@ -953,6 +972,44 @@ module Stripe
end
end
class UsCfpbData < Stripe::RequestParams
class EthnicityDetails < Stripe::RequestParams
# The persons ethnicity
attr_accessor :ethnicity
# Please specify your origin, when other is selected.
attr_accessor :ethnicity_other
def initialize(ethnicity: nil, ethnicity_other: nil)
@ethnicity = ethnicity
@ethnicity_other = ethnicity_other
end
end
class RaceDetails < Stripe::RequestParams
# The persons race.
attr_accessor :race
# Please specify your race, when other is selected.
attr_accessor :race_other
def initialize(race: nil, race_other: nil)
@race = race
@race_other = race_other
end
end
# The persons ethnicity details
attr_accessor :ethnicity_details
# The persons race details
attr_accessor :race_details
# The persons self-identified gender
attr_accessor :self_identified_gender
def initialize(ethnicity_details: nil, race_details: nil, self_identified_gender: nil)
@ethnicity_details = ethnicity_details
@race_details = race_details
@self_identified_gender = self_identified_gender
end
end
class Verification < Stripe::RequestParams
class AdditionalDocument < Stripe::RequestParams
# The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -1037,6 +1094,8 @@ module Stripe
attr_accessor :relationship
# The last four digits of the person's Social Security number (U.S. only).
attr_accessor :ssn_last_4
# Demographic data related to the person.
attr_accessor :us_cfpb_data
# The person's verification status.
attr_accessor :verification
@ -1066,6 +1125,7 @@ module Stripe
registered_address: nil,
relationship: nil,
ssn_last_4: nil,
us_cfpb_data: nil,
verification: nil
)
@additional_tos_acceptances = additional_tos_acceptances
@ -1093,6 +1153,7 @@ module Stripe
@registered_address = registered_address
@relationship = relationship
@ssn_last_4 = ssn_last_4
@us_cfpb_data = us_cfpb_data
@verification = verification
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :reversals
def initialize(requestor)
super(requestor)
super
@reversals = Stripe::TransferReversalService.new(@requestor)
end
@ -73,6 +73,8 @@ module Stripe
attr_accessor :destination
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The FX rate in the quote is validated and used to convert the transfer amount to the destination currency.
attr_accessor :fx_quote
# 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
# You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.
@ -88,6 +90,7 @@ module Stripe
description: nil,
destination: nil,
expand: nil,
fx_quote: nil,
metadata: nil,
source_transaction: nil,
source_type: nil,
@ -98,6 +101,7 @@ module Stripe
@description = description
@destination = destination
@expand = expand
@fx_quote = fx_quote
@metadata = metadata
@source_transaction = source_transaction
@source_type = source_type

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :features
def initialize(requestor)
super(requestor)
super
@features = Stripe::Treasury::FinancialAccountFeaturesService.new(@requestor)
end

View File

@ -101,12 +101,15 @@ module Stripe
attr_accessor :name
# Billing phone number (including extension).
attr_accessor :phone
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
attr_accessor :tax_id
def initialize(address: nil, email: nil, name: nil, phone: nil)
def initialize(address: nil, email: nil, name: nil, phone: nil, tax_id: nil)
@address = address
@email = email
@name = name
@phone = phone
@tax_id = tax_id
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :credit_reversals, :debit_reversals, :financial_accounts, :inbound_transfers, :outbound_payments, :outbound_transfers, :received_credits, :received_debits, :transactions, :transaction_entries
def initialize(requestor)
super(requestor)
super
@credit_reversals = Stripe::Treasury::CreditReversalService.new(@requestor)
@debit_reversals = Stripe::Treasury::DebitReversalService.new(@requestor)
@financial_accounts = Stripe::Treasury::FinancialAccountService.new(@requestor)

View File

@ -4,14 +4,14 @@ module Stripe
class V1Services < StripeService
# v1 accessors: The beginning of the section generated from our OpenAPI spec
attr_reader :accounts
attr_reader :account_links, :account_notices, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_settings, :balance_transactions, :billing, :billing_portal, :capital, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :gift_cards, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :margins, :orders, :payment_attempt_records, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payment_records, :payouts, :plans, :prices, :privacy, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints, :external_accounts
attr_reader :account_links, :account_notices, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_settings, :balance_transactions, :billing, :billing_portal, :capital, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :fx_quotes, :gift_cards, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :margins, :orders, :payment_attempt_records, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payment_records, :payouts, :plans, :prices, :privacy, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints, :external_accounts
# v1 accessors: The end of the section generated from our OpenAPI spec
# OAuthService is manually maintained, as it has special behaviors
attr_reader :oauth
def initialize(requestor)
super(requestor)
super
# v1 services: The beginning of the section generated from our OpenAPI spec
@accounts = Stripe::AccountService.new(@requestor)
@account_links = Stripe::AccountLinkService.new(@requestor)
@ -45,6 +45,7 @@ module Stripe
@file_links = Stripe::FileLinkService.new(@requestor)
@financial_connections = Stripe::FinancialConnectionsService.new(@requestor)
@forwarding = Stripe::ForwardingService.new(@requestor)
@fx_quotes = Stripe::FxQuoteService.new(@requestor)
@gift_cards = Stripe::GiftCardsService.new(@requestor)
@identity = Stripe::IdentityService.new(@requestor)
@invoices = Stripe::InvoiceService.new(@requestor)

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :meter_event_session, :meter_event_adjustments, :meter_event_stream, :meter_events
def initialize(requestor)
super(requestor)
super
@meter_event_session = Stripe::V2::Billing::MeterEventSessionService.new(@requestor)
@meter_event_adjustments = Stripe::V2::Billing::MeterEventAdjustmentService.new(@requestor)
@meter_event_stream = Stripe::V2::Billing::MeterEventStreamService.new(@requestor)

View File

@ -8,7 +8,7 @@ module Stripe
attr_reader :persons
def initialize(requestor)
super(requestor)
super
@persons = Stripe::V2::Core::Accounts::PersonService.new(@requestor)
end

View File

@ -8,7 +8,7 @@ module Stripe
attr_reader :gb_bank_accounts, :us_bank_accounts
def initialize(requestor)
super(requestor)
super
@gb_bank_accounts = Stripe::V2::Core::Vault::GbBankAccountService.new(@requestor)
@us_bank_accounts = Stripe::V2::Core::Vault::UsBankAccountService.new(@requestor)
end

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :accounts, :account_links, :event_destinations, :events, :vault
def initialize(requestor)
super(requestor)
super
@accounts = Stripe::V2::Core::AccountService.new(@requestor)
@account_links = Stripe::V2::Core::AccountLinkService.new(@requestor)
@event_destinations = Stripe::V2::Core::EventDestinationService.new(@requestor)

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :adjustments, :financial_accounts, :financial_addresses, :inbound_transfers, :outbound_payments, :outbound_payment_quotes, :outbound_transfers, :outbound_setup_intents, :payout_methods, :payout_methods_bank_account_spec, :received_credits, :received_debits, :transactions, :transaction_entries
def initialize(requestor)
super(requestor)
super
@adjustments = Stripe::V2::MoneyManagement::AdjustmentService.new(@requestor)
@financial_accounts = Stripe::V2::MoneyManagement::FinancialAccountService.new(@requestor)
@financial_addresses = Stripe::V2::MoneyManagement::FinancialAddressService.new(@requestor)

View File

@ -7,7 +7,7 @@ module Stripe
attr_reader :financial_addresses
def initialize(requestor)
super(requestor)
super
@financial_addresses = Stripe::V2::TestHelpers::FinancialAddressService.new(@requestor)
end
end

View File

@ -6,7 +6,7 @@ module Stripe
attr_reader :core, :money_management, :billing, :test_helpers
def initialize(requestor)
super(requestor)
super
@core = Stripe::V2::CoreService.new(@requestor)
@money_management = Stripe::V2::MoneyManagementService.new(@requestor)
@billing = Stripe::V2::BillingService.new(@requestor)

File diff suppressed because one or more lines are too long

View File

@ -397,6 +397,17 @@ module Stripe
sig { returns(T.nilable(String)) }
attr_reader :user_agent
end
class RegistrationDate < Stripe::StripeObject
# The day of registration, between 1 and 31.
sig { returns(T.nilable(Integer)) }
attr_reader :day
# The month of registration, between 1 and 12.
sig { returns(T.nilable(Integer)) }
attr_reader :month
# The four-digit year of registration.
sig { returns(T.nilable(Integer)) }
attr_reader :year
end
class Verification < Stripe::StripeObject
class Document < Stripe::StripeObject
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.
@ -461,6 +472,9 @@ module Stripe
# The company's phone number (used for verification).
sig { returns(T.nilable(String)) }
attr_reader :phone
# Attribute for field registration_date
sig { returns(RegistrationDate) }
attr_reader :registration_date
# The category identifying the legal structure of the company or legal entity. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
sig { returns(String) }
attr_reader :structure
@ -2142,6 +2156,19 @@ module Stripe
}
def initialize(date: nil, ip: nil, user_agent: nil); end
end
class RegistrationDate < Stripe::RequestParams
# The day of registration, between 1 and 31.
sig { returns(Integer) }
attr_accessor :day
# The month of registration, between 1 and 12.
sig { returns(Integer) }
attr_accessor :month
# The four-digit year of registration.
sig { returns(Integer) }
attr_accessor :year
sig { params(day: Integer, month: Integer, year: Integer).void }
def initialize(day: nil, month: nil, year: nil); end
end
class Verification < Stripe::RequestParams
class Document < Stripe::RequestParams
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -2210,6 +2237,11 @@ module Stripe
# The company's phone number (used for verification).
sig { returns(T.nilable(String)) }
attr_accessor :phone
# Attribute for param field registration_date
sig {
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Account::UpdateParams::Company::RegistrationDate))))
}
attr_accessor :registration_date
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
sig { returns(T.nilable(String)) }
attr_accessor :registration_number
@ -2229,7 +2261,7 @@ module Stripe
sig { returns(T.nilable(::Stripe::Account::UpdateParams::Company::Verification)) }
attr_accessor :verification
sig {
params(address: T.nilable(::Stripe::Account::UpdateParams::Company::Address), address_kana: T.nilable(::Stripe::Account::UpdateParams::Company::AddressKana), address_kanji: T.nilable(::Stripe::Account::UpdateParams::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::Account::UpdateParams::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::Account::UpdateParams::Company::OwnershipDeclaration), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::Account::UpdateParams::Company::Verification)).void
params(address: T.nilable(::Stripe::Account::UpdateParams::Company::Address), address_kana: T.nilable(::Stripe::Account::UpdateParams::Company::AddressKana), address_kanji: T.nilable(::Stripe::Account::UpdateParams::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::Account::UpdateParams::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::Account::UpdateParams::Company::OwnershipDeclaration), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_date: T.nilable(T.nilable(T.any(String, ::Stripe::Account::UpdateParams::Company::RegistrationDate))), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::Account::UpdateParams::Company::Verification)).void
}
def initialize(
address: nil,
@ -2247,6 +2279,7 @@ module Stripe
ownership_declaration: nil,
ownership_exemption_reason: nil,
phone: nil,
registration_date: nil,
registration_number: nil,
structure: nil,
tax_id: nil,
@ -4312,6 +4345,19 @@ module Stripe
}
def initialize(date: nil, ip: nil, user_agent: nil); end
end
class RegistrationDate < Stripe::RequestParams
# The day of registration, between 1 and 31.
sig { returns(Integer) }
attr_accessor :day
# The month of registration, between 1 and 12.
sig { returns(Integer) }
attr_accessor :month
# The four-digit year of registration.
sig { returns(Integer) }
attr_accessor :year
sig { params(day: Integer, month: Integer, year: Integer).void }
def initialize(day: nil, month: nil, year: nil); end
end
class Verification < Stripe::RequestParams
class Document < Stripe::RequestParams
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
@ -4380,6 +4426,11 @@ module Stripe
# The company's phone number (used for verification).
sig { returns(T.nilable(String)) }
attr_accessor :phone
# Attribute for param field registration_date
sig {
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Account::CreateParams::Company::RegistrationDate))))
}
attr_accessor :registration_date
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
sig { returns(T.nilable(String)) }
attr_accessor :registration_number
@ -4399,7 +4450,7 @@ module Stripe
sig { returns(T.nilable(::Stripe::Account::CreateParams::Company::Verification)) }
attr_accessor :verification
sig {
params(address: T.nilable(::Stripe::Account::CreateParams::Company::Address), address_kana: T.nilable(::Stripe::Account::CreateParams::Company::AddressKana), address_kanji: T.nilable(::Stripe::Account::CreateParams::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::Account::CreateParams::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::Account::CreateParams::Company::OwnershipDeclaration), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::Account::CreateParams::Company::Verification)).void
params(address: T.nilable(::Stripe::Account::CreateParams::Company::Address), address_kana: T.nilable(::Stripe::Account::CreateParams::Company::AddressKana), address_kanji: T.nilable(::Stripe::Account::CreateParams::Company::AddressKanji), directors_provided: T.nilable(T::Boolean), directorship_declaration: T.nilable(::Stripe::Account::CreateParams::Company::DirectorshipDeclaration), executives_provided: T.nilable(T::Boolean), export_license_id: T.nilable(String), export_purpose_code: T.nilable(String), name: T.nilable(String), name_kana: T.nilable(String), name_kanji: T.nilable(String), owners_provided: T.nilable(T::Boolean), ownership_declaration: T.nilable(::Stripe::Account::CreateParams::Company::OwnershipDeclaration), ownership_exemption_reason: T.nilable(T.nilable(T.any(String, String))), phone: T.nilable(String), registration_date: T.nilable(T.nilable(T.any(String, ::Stripe::Account::CreateParams::Company::RegistrationDate))), registration_number: T.nilable(String), structure: T.nilable(T.nilable(T.any(String, String))), tax_id: T.nilable(String), tax_id_registrar: T.nilable(String), vat_id: T.nilable(String), verification: T.nilable(::Stripe::Account::CreateParams::Company::Verification)).void
}
def initialize(
address: nil,
@ -4417,6 +4468,7 @@ module Stripe
ownership_declaration: nil,
ownership_exemption_reason: nil,
phone: nil,
registration_date: nil,
registration_number: nil,
structure: nil,
tax_id: nil,

Some files were not shown because too many files have changed in this diff Show More