Skip to content

Update generated code for beta #1607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions API_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-05-28.preview
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ This release changes the pinned API version to `2025-05-28.preview`.
* Add support for `tax_transaction_attempts` on `Tax::Association`
* Add support for `confirm_config` on `Terminal::Reader::Action::ConfirmPaymentIntent` and `Terminal::Reader::ConfirmPaymentIntentParams`

## 15.2.1 - 2025-06-04
* [#1617](https://github.com/stripe/stripe-ruby/pull/1617) Fix `nil` requestor in `Webhook.construct_event` to allow for event data refresh
* Fix bug where `Event` constructed from `Webhook.construct_event` could not be refreshed due to a `nil` APIRequestor
* Raised in https://github.com/stripe/stripe-ruby/issues/1616

## 15.2.0 - 2025-05-29
This release changes the pinned API version to `2025-05-28.basil`.

Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1773
v1789
28 changes: 27 additions & 1 deletion lib/stripe/resources/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2170,6 +2170,15 @@ def initialize(files: nil)
end
end

class ProofOfAddress < Stripe::RequestParams
# One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
attr_accessor :files

def initialize(files: nil)
@files = files
end
end

class ProofOfRegistration < Stripe::RequestParams
# One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
attr_accessor :files
Expand Down Expand Up @@ -2199,6 +2208,8 @@ def initialize(files: nil)
attr_accessor :company_registration_verification
# One or more documents that demonstrate proof of a company's tax ID.
attr_accessor :company_tax_id_verification
# One or more documents that demonstrate proof of address.
attr_accessor :proof_of_address
# One or more documents showing the company’s proof of registration with the national business registry.
attr_accessor :proof_of_registration
# One or more documents that demonstrate proof of ultimate beneficial ownership.
Expand All @@ -2211,6 +2222,7 @@ def initialize(
company_ministerial_decree: nil,
company_registration_verification: nil,
company_tax_id_verification: nil,
proof_of_address: nil,
proof_of_registration: nil,
proof_of_ultimate_beneficial_ownership: nil
)
Expand All @@ -2220,6 +2232,7 @@ def initialize(
@company_ministerial_decree = company_ministerial_decree
@company_registration_verification = company_registration_verification
@company_tax_id_verification = company_tax_id_verification
@proof_of_address = proof_of_address
@proof_of_registration = proof_of_registration
@proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
end
Expand Down Expand Up @@ -4325,7 +4338,7 @@ def initialize(document: nil)
attr_accessor :ownership_exemption_reason
# The company's phone number (used for verification).
attr_accessor :phone
# Attribute for param field registration_date
# When the business was incorporated or registered.
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
Expand Down Expand Up @@ -4525,6 +4538,15 @@ def initialize(files: nil)
end
end

class ProofOfAddress < Stripe::RequestParams
# One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
attr_accessor :files

def initialize(files: nil)
@files = files
end
end

class ProofOfRegistration < Stripe::RequestParams
# One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
attr_accessor :files
Expand Down Expand Up @@ -4554,6 +4576,8 @@ def initialize(files: nil)
attr_accessor :company_registration_verification
# One or more documents that demonstrate proof of a company's tax ID.
attr_accessor :company_tax_id_verification
# One or more documents that demonstrate proof of address.
attr_accessor :proof_of_address
# One or more documents showing the company’s proof of registration with the national business registry.
attr_accessor :proof_of_registration
# One or more documents that demonstrate proof of ultimate beneficial ownership.
Expand All @@ -4566,6 +4590,7 @@ def initialize(
company_ministerial_decree: nil,
company_registration_verification: nil,
company_tax_id_verification: nil,
proof_of_address: nil,
proof_of_registration: nil,
proof_of_ultimate_beneficial_ownership: nil
)
Expand All @@ -4575,6 +4600,7 @@ def initialize(
@company_ministerial_decree = company_ministerial_decree
@company_registration_verification = company_registration_verification
@company_tax_id_verification = company_tax_id_verification
@proof_of_address = proof_of_address
@proof_of_registration = proof_of_registration
@proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
end
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/billing_portal/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Item < Stripe::StripeObject
# [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
attr_reader :quantity
end
# The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
# The coupon or promotion code to apply to this subscription update.
attr_reader :discounts
# The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
attr_reader :items
Expand Down Expand Up @@ -202,7 +202,7 @@ def initialize(id: nil, price: nil, quantity: nil)
@quantity = quantity
end
end
# The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
# The coupon or promotion code to apply to this subscription update.
attr_accessor :discounts
# The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
attr_accessor :items
Expand Down
9 changes: 3 additions & 6 deletions lib/stripe/resources/checkout/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3130,12 +3130,9 @@ def initialize(end_behavior: nil)
attr_accessor :proration_behavior
# If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
attr_accessor :transfer_data
# Unix timestamp representing the end of the trial period the customer
# will get before being charged for the first time. Has to be at least
# 48 hours in the future.
# Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future.
attr_accessor :trial_end
# Integer representing the number of trial period days before the
# customer is charged for the first time. Has to be at least 1.
# Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
attr_accessor :trial_period_days
# Settings related to subscription trials.
attr_accessor :trial_settings
Expand Down Expand Up @@ -3263,7 +3260,7 @@ def initialize(link: nil)
attr_accessor :expires_at
# Generate a post-purchase Invoice for one-time payments.
attr_accessor :invoice_creation
# A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
# A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode.
#
# For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
#
Expand Down
18 changes: 9 additions & 9 deletions lib/stripe/resources/credit_note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def initialize(shipping_rate: nil)
@shipping_rate = shipping_rate
end
end
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
# The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :amount
# The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
attr_accessor :credit_amount
Expand All @@ -230,7 +230,7 @@ def initialize(shipping_rate: nil)
attr_accessor :expand
# ID of the invoice.
attr_accessor :invoice
# Line items that make up the credit note.
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :lines
# The credit note's memo appears on the credit note PDF.
attr_accessor :memo
Expand All @@ -244,7 +244,7 @@ def initialize(shipping_rate: nil)
attr_accessor :refund_amount
# Refunds to link to this credit note.
attr_accessor :refunds
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :shipping_cost

def initialize(
Expand Down Expand Up @@ -373,7 +373,7 @@ def initialize(shipping_rate: nil)
@shipping_rate = shipping_rate
end
end
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
# The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :amount
# The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
attr_accessor :credit_amount
Expand All @@ -385,7 +385,7 @@ def initialize(shipping_rate: nil)
attr_accessor :expand
# ID of the invoice.
attr_accessor :invoice
# Line items that make up the credit note.
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :lines
# The credit note's memo appears on the credit note PDF.
attr_accessor :memo
Expand All @@ -399,7 +399,7 @@ def initialize(shipping_rate: nil)
attr_accessor :refund_amount
# Refunds to link to this credit note.
attr_accessor :refunds
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :shipping_cost

def initialize(
Expand Down Expand Up @@ -513,7 +513,7 @@ def initialize(shipping_rate: nil)
@shipping_rate = shipping_rate
end
end
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
# The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :amount
# The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
attr_accessor :credit_amount
Expand All @@ -529,7 +529,7 @@ def initialize(shipping_rate: nil)
attr_accessor :invoice
# 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
# Line items that make up the credit note.
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :lines
# The credit note's memo appears on the credit note PDF.
attr_accessor :memo
Expand All @@ -543,7 +543,7 @@ def initialize(shipping_rate: nil)
attr_accessor :refund_amount
# Refunds to link to this credit note.
attr_accessor :refunds
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
attr_accessor :shipping_cost
# 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
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def initialize(
end
# The connected account that originates the event.
attr_reader :account
# The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014.
# The Stripe API version used to render `data` when the event was created. The contents of `data` never change, so this value remains static regardless of the API version currently in use. This property is populated only for events created on or after October 31, 2014.
attr_reader :api_version
# Authentication context needed to fetch the event or related object.
attr_reader :context
Expand Down
34 changes: 34 additions & 0 deletions lib/stripe/resources/identity/verification_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ class Email < Stripe::StripeObject

class IdNumber < Stripe::StripeObject; end

class Matching < Stripe::StripeObject
# Strictness of the DOB matching policy to apply.
attr_reader :dob
# Strictness of the name matching policy to apply.
attr_reader :name
end

class Phone < Stripe::StripeObject
# Request one time password verification of `provided_details.phone`.
attr_reader :require_verification
Expand All @@ -60,6 +67,8 @@ class Phone < Stripe::StripeObject
attr_reader :email
# Attribute for field id_number
attr_reader :id_number
# Attribute for field matching
attr_reader :matching
# Attribute for field phone
attr_reader :phone
end
Expand All @@ -76,6 +85,13 @@ class Redaction < Stripe::StripeObject
attr_reader :status
end

class RelatedPerson < Stripe::StripeObject
# Token referencing the associated Account of the related Person resource.
attr_reader :account
# Token referencing the related Person resource.
attr_reader :person
end

class VerifiedOutputs < Stripe::StripeObject
class Address < Stripe::StripeObject
# City, district, suburb, town, or village.
Expand Down Expand Up @@ -227,6 +243,18 @@ def initialize(email: nil, phone: nil)
@phone = phone
end
end

class RelatedPerson < Stripe::RequestParams
# A token representing a connected account. If provided, the person parameter is also required and must be associated with the account.
attr_accessor :account
# A token referencing a Person resource that this verification is being used to verify.
attr_accessor :person

def initialize(account: nil, person: nil)
@account = account
@person = person
end
end
# A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
attr_accessor :client_reference_id
# Specifies which fields in the response should be expanded.
Expand All @@ -241,6 +269,8 @@ def initialize(email: nil, phone: nil)
attr_accessor :related_customer
# Token referencing a Customer Account resource.
attr_accessor :related_customer_account
# Tokens referencing a Person resource and it's associated account.
attr_accessor :related_person
# The URL that the user will be redirected to upon completing the verification flow.
attr_accessor :return_url
# The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
Expand All @@ -256,6 +286,7 @@ def initialize(
provided_details: nil,
related_customer: nil,
related_customer_account: nil,
related_person: nil,
return_url: nil,
type: nil,
verification_flow: nil
Expand All @@ -267,6 +298,7 @@ def initialize(
@provided_details = provided_details
@related_customer = related_customer
@related_customer_account = related_customer_account
@related_person = related_person
@return_url = return_url
@type = type
@verification_flow = verification_flow
Expand Down Expand Up @@ -381,6 +413,8 @@ def initialize(expand: nil)
attr_reader :related_customer
# Token referencing a Customer Account resource.
attr_reader :related_customer_account
# Attribute for field related_person
attr_reader :related_person
# Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
attr_reader :status
# The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4069,7 +4069,7 @@ def initialize(iterations: nil)
attr_accessor :billing_mode
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
attr_accessor :cancel_at
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
attr_accessor :cancel_at_period_end
# This simulates the subscription being canceled or expired immediately.
attr_accessor :cancel_now
Expand Down
Loading
Loading