Skip to content
Merged
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
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7f436e73385732b1c5502f408a6fe37f7b6b0612
28b33d4a6cc796fd90ee77d1c5ea63206b25f727
57 changes: 30 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 18.1.0-beta.1 - 2025-11-18
This release changes the pinned API version to `2025-11-17.preview`.

* [#1722](https://github.com/stripe/stripe-ruby/pull/1722) Update generated code for beta
* Add support for new resources `V2::Core::AccountPersonToken` and `V2::Core::AccountToken`
* Remove support for resource `V2::Payments::OffSessionPayment`
* Add support for `create` and `retrieve` methods on resources `V2::Core::AccountPersonToken` and `V2::Core::AccountToken`
* Remove support for `cancel`, `capture`, `create`, `list`, and `retrieve` methods on resource `V2::Payments::OffSessionPayment`
* Change `Tax::Association.tax_transaction_attempts` to be required
* Add support for `specified_commercial_transactions_act_url` on `Account::BusinessProfile`, `AccountCreateParams::BusinessProfile`, and `AccountUpdateParams::BusinessProfile`
* Add support for `paypay_payments` on `Account::Setting`, `AccountCreateParams::Setting`, and `AccountUpdateParams::Setting`
* Change type of `Billing::Analytics::MeterUsageRetrieveParams::Meter.dimension_filters` from `string` to `array(string)`
* Change type of `Billing::Analytics::MeterUsageRetrieveParams::Meter.tenant_filters` from `string` to `array(string)`
* Add support for `car_rental_data`, `flight_data`, and `lodging_data` on `ChargeCaptureParams::PaymentDetail`, `ChargeUpdateParams::PaymentDetail`, `PaymentIntentCaptureParams::PaymentDetail`, `PaymentIntentConfirmParams::PaymentDetail`, `PaymentIntentCreateParams::PaymentDetail`, and `PaymentIntentUpdateParams::PaymentDetail`
* Add support for `supplementary_purchase_data` on `OrderCreateParams::Payment::Setting::PaymentMethodOption::Klarna`, `OrderUpdateParams::Payment::Setting::PaymentMethodOption::Klarna`, `PaymentIntentConfirmParams::PaymentMethodOption::Klarna`, `PaymentIntentCreateParams::PaymentMethodOption::Klarna`, and `PaymentIntentUpdateParams::PaymentMethodOption::Klarna`
* Add support for `allow_redisplay` and `customer_account` on `PaymentMethodListParams`
* Add support for `future_requirements` on `V2::Core::Account`
* Add support for `konbini_payments` and `script_statement_descriptor` on `V2::Core::Account::Configuration::Merchant`, `V2::Core::AccountCreateParams::Configuration::Merchant`, and `V2::Core::AccountUpdateParams::Configuration::Merchant`
* Add support for `eur` on `V2::Core::Account::Configuration::Storer::Capability::HoldsCurrency`, `V2::Core::AccountCreateParams::Configuration::Storer::Capability::HoldsCurrency`, and `V2::Core::AccountUpdateParams::Configuration::Storer::Capability::HoldsCurrency`
* Add support for `requirements_collector` on `V2::Core::Account::Default::Responsibility`
* Remove support for `collector` on `V2::Core::Account::Requirement`
* Add support for `changes` on `V2::Core::Event`
* Add support for `account_token` on `V2::Core::AccountCreateParams` and `V2::Core::AccountUpdateParams`
* Add support for `person_token` on `V2::Core::AccountPersonCreateParams` and `V2::Core::AccountPersonUpdateParams`
* Add support for `changes` on `V2::Core::Event`
* Add support for thin event `V2CoreHealthEventGenerationFailureResolvedEvent`
* Remove support for thin events `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent`, `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent`, `V2PaymentsOffSessionPaymentCanceledEvent`, `V2PaymentsOffSessionPaymentCreatedEvent`, `V2PaymentsOffSessionPaymentFailedEvent`, `V2PaymentsOffSessionPaymentRequiresCaptureEvent`, and `V2PaymentsOffSessionPaymentSucceededEvent` with related object `V2::Payments::OffSessionPayment`

## 18.1.0-alpha.2 - 2025-11-20
This release changes the pinned API version to `2025-11-17.preview`.

Expand Down Expand Up @@ -128,33 +156,8 @@ This release changes the pinned API version to `2025-11-17.preview`.
* Add support for `mb_way` and `twint` on `Refund::DestinationDetail`
* Change type of `SubscriptionScheduleUpdateParams.billing_schedules` from `array(billing_schedules_update_params)` to `emptyable(array(billing_schedules_update_params))`

## 18.1.0-beta.1 - 2025-11-18
This release changes the pinned API version to `2025-11-17.preview`.

* [#1722](https://github.com/stripe/stripe-ruby/pull/1722) Update generated code for beta
* Add support for new resources `V2::Core::AccountPersonToken` and `V2::Core::AccountToken`
* Remove support for resource `V2::Payments::OffSessionPayment`
* Add support for `create` and `retrieve` methods on resources `V2::Core::AccountPersonToken` and `V2::Core::AccountToken`
* Remove support for `cancel`, `capture`, `create`, `list`, and `retrieve` methods on resource `V2::Payments::OffSessionPayment`
* Change `Tax::Association.tax_transaction_attempts` to be required
* Add support for `specified_commercial_transactions_act_url` on `Account::BusinessProfile`, `AccountCreateParams::BusinessProfile`, and `AccountUpdateParams::BusinessProfile`
* Add support for `paypay_payments` on `Account::Setting`, `AccountCreateParams::Setting`, and `AccountUpdateParams::Setting`
* Change type of `Billing::Analytics::MeterUsageRetrieveParams::Meter.dimension_filters` from `string` to `array(string)`
* Change type of `Billing::Analytics::MeterUsageRetrieveParams::Meter.tenant_filters` from `string` to `array(string)`
* Add support for `car_rental_data`, `flight_data`, and `lodging_data` on `ChargeCaptureParams::PaymentDetail`, `ChargeUpdateParams::PaymentDetail`, `PaymentIntentCaptureParams::PaymentDetail`, `PaymentIntentConfirmParams::PaymentDetail`, `PaymentIntentCreateParams::PaymentDetail`, and `PaymentIntentUpdateParams::PaymentDetail`
* Add support for `supplementary_purchase_data` on `OrderCreateParams::Payment::Setting::PaymentMethodOption::Klarna`, `OrderUpdateParams::Payment::Setting::PaymentMethodOption::Klarna`, `PaymentIntentConfirmParams::PaymentMethodOption::Klarna`, `PaymentIntentCreateParams::PaymentMethodOption::Klarna`, and `PaymentIntentUpdateParams::PaymentMethodOption::Klarna`
* Add support for `allow_redisplay` and `customer_account` on `PaymentMethodListParams`
* Add support for `future_requirements` on `V2::Core::Account`
* Add support for `konbini_payments` and `script_statement_descriptor` on `V2::Core::Account::Configuration::Merchant`, `V2::Core::AccountCreateParams::Configuration::Merchant`, and `V2::Core::AccountUpdateParams::Configuration::Merchant`
* Add support for `eur` on `V2::Core::Account::Configuration::Storer::Capability::HoldsCurrency`, `V2::Core::AccountCreateParams::Configuration::Storer::Capability::HoldsCurrency`, and `V2::Core::AccountUpdateParams::Configuration::Storer::Capability::HoldsCurrency`
* Add support for `requirements_collector` on `V2::Core::Account::Default::Responsibility`
* Remove support for `collector` on `V2::Core::Account::Requirement`
* Add support for `changes` on `V2::Core::Event`
* Add support for `account_token` on `V2::Core::AccountCreateParams` and `V2::Core::AccountUpdateParams`
* Add support for `person_token` on `V2::Core::AccountPersonCreateParams` and `V2::Core::AccountPersonUpdateParams`
* Add support for `changes` on `V2::Core::Event`
* Add support for thin event `V2CoreHealthEventGenerationFailureResolvedEvent`
* Remove support for thin events `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent`, `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent`, `V2PaymentsOffSessionPaymentCanceledEvent`, `V2PaymentsOffSessionPaymentCreatedEvent`, `V2PaymentsOffSessionPaymentFailedEvent`, `V2PaymentsOffSessionPaymentRequiresCaptureEvent`, and `V2PaymentsOffSessionPaymentSucceededEvent` with related object `V2::Payments::OffSessionPayment`
## 18.0.1 - 2025-11-21
* [#1736](https://github.com/stripe/stripe-ruby/pull/1736) Throw a specific error when accessing `payment_intent` property on `Invoice` object to ease debugging.

## 18.0.0 - 2025-11-18
This release changes the pinned API version to `2025-11-17.clover`.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2128
v2129
1 change: 1 addition & 0 deletions lib/stripe/object_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def self.object_names_to_classes
Privacy::RedactionJob.object_name => Privacy::RedactionJob,
Privacy::RedactionJobValidationError.object_name => Privacy::RedactionJobValidationError,
Product.object_name => Product,
ProductCatalog::TrialOffer.object_name => ProductCatalog::TrialOffer,
ProductFeature.object_name => ProductFeature,
PromotionCode.object_name => PromotionCode,
Quote.object_name => Quote,
Expand Down
1 change: 1 addition & 0 deletions lib/stripe/params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@
require "stripe/params/privacy/redaction_job_update_params"
require "stripe/params/privacy/redaction_job_validate_params"
require "stripe/params/privacy/redaction_job_validation_error_list_params"
require "stripe/params/product_catalog/trial_offer_create_params"
require "stripe/params/product_create_params"
require "stripe/params/product_delete_params"
require "stripe/params/product_feature_create_params"
Expand Down
15 changes: 14 additions & 1 deletion lib/stripe/params/payment_intent_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5517,6 +5517,15 @@ def initialize(
end
end

class PaymentsOrchestration < ::Stripe::RequestParams
# Whether this feature is enabled.
attr_accessor :enabled

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

class RadarOptions < ::Stripe::RequestParams
# A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
attr_accessor :session
Expand Down Expand Up @@ -5702,6 +5711,8 @@ def initialize(amount: nil, destination: nil)
attr_accessor :transfer_group
# Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
attr_accessor :use_stripe_sdk
# When you enable this parameter, this PaymentIntent will route your payment to processors that you configure in the dashboard.
attr_accessor :payments_orchestration

def initialize(
allocated_funds: nil,
Expand Down Expand Up @@ -5743,7 +5754,8 @@ def initialize(
statement_descriptor_suffix: nil,
transfer_data: nil,
transfer_group: nil,
use_stripe_sdk: nil
use_stripe_sdk: nil,
payments_orchestration: nil
)
@allocated_funds = allocated_funds
@amount = amount
Expand Down Expand Up @@ -5785,6 +5797,7 @@ def initialize(
@transfer_data = transfer_data
@transfer_group = transfer_group
@use_stripe_sdk = use_stripe_sdk
@payments_orchestration = payments_orchestration
end
end
end
60 changes: 60 additions & 0 deletions lib/stripe/params/product_catalog/trial_offer_create_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module ProductCatalog
class TrialOfferCreateParams < ::Stripe::RequestParams
class Duration < ::Stripe::RequestParams
class Relative < ::Stripe::RequestParams
# The number of recurring price's interval to apply for the trial period.
attr_accessor :iterations

def initialize(iterations: nil)
@iterations = iterations
end
end
# The relative duration of the trial period computed as the number of recurring price intervals.
attr_accessor :relative
# Specifies how the trial offer duration is determined.
attr_accessor :type

def initialize(relative: nil, type: nil)
@relative = relative
@type = type
end
end

class EndBehavior < ::Stripe::RequestParams
class Transition < ::Stripe::RequestParams
# The price to transition the recurring item to when the trial offer ends.
attr_accessor :price

def initialize(price: nil)
@price = price
end
end
# The transition to apply when the trial offer ends.
attr_accessor :transition

def initialize(transition: nil)
@transition = transition
end
end
# Duration of one service period of the trial.
attr_accessor :duration
# Define behavior that occurs at the end of the trial.
attr_accessor :end_behavior
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# Price configuration during the trial period (amount, billing scheme, etc).
attr_accessor :price

def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil)
@duration = duration
@end_behavior = end_behavior
@expand = expand
@price = price
end
end
end
end
1 change: 1 addition & 0 deletions lib/stripe/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
require "stripe/resources/privacy/redaction_job"
require "stripe/resources/privacy/redaction_job_validation_error"
require "stripe/resources/product"
require "stripe/resources/product_catalog/trial_offer"
require "stripe/resources/product_feature"
require "stripe/resources/promotion_code"
require "stripe/resources/quote"
Expand Down
16 changes: 4 additions & 12 deletions lib/stripe/resources/delegated_checkout/requested_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@ class LineItemDetail < ::Stripe::StripeObject
attr_reader :amount_discount
# The total before any discounts or taxes are applied.
attr_reader :amount_subtotal
# The total after discounts but before taxes are applied.
attr_reader :amount_subtotal_after_discount
# The total after discounts and taxes.
attr_reader :amount_total
# The per-unit amount of the item after discounts but before taxes are applied.
attr_reader :unit_amount_after_discount
# The per-unit discount amount. If no discount were applied, defaults to 0.
attr_reader :unit_discount

def self.inner_class_types
@inner_class_types = {}
Expand Down Expand Up @@ -291,14 +283,14 @@ def self.field_remappings
@field_remappings = {}
end
end
# The amount discount of the total details.
attr_reader :amount_discount
# The amount fulfillment of the total details.
attr_reader :amount_fulfillment
# The amount tax of the total details.
attr_reader :amount_tax
# Total of all items after discounts but before taxes are applied.
attr_reader :amount_subtotal_after_discount
# The amount of order-level discounts applied to the cart. The total discount amount for this session can be computed by summing the cart discount and the item discounts.
attr_reader :amount_cart_discount
# The amount of item-level discounts applied to the cart. The total discount amount for this session can be computed by summing the cart discount and the item discounts.
attr_reader :amount_items_discount
# The applicable fees of the total details.
attr_reader :applicable_fees

Expand Down
16 changes: 16 additions & 0 deletions lib/stripe/resources/payment_intent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3459,6 +3459,19 @@ def self.field_remappings
@field_remappings = {}
end
end

class PaymentsOrchestration < ::Stripe::StripeObject
# Whether this feature is enabled.
attr_reader :enabled

def self.inner_class_types
@inner_class_types = {}
end

def self.field_remappings
@field_remappings = {}
end
end
# Allocated Funds configuration for this PaymentIntent.
attr_reader :allocated_funds
# Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
Expand Down Expand Up @@ -3573,6 +3586,8 @@ def self.field_remappings
attr_reader :transfer_data
# A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
attr_reader :transfer_group
# When you enable this parameter, this PaymentIntent will route your payment to processors that you configure in the dashboard.
attr_reader :payments_orchestration

# Manually reconcile the remaining amount for a customer_balance PaymentIntent.
def apply_customer_balance(params = {}, opts = {})
Expand Down Expand Up @@ -3947,6 +3962,7 @@ def self.inner_class_types
processing: Processing,
shipping: Shipping,
transfer_data: TransferData,
payments_orchestration: PaymentsOrchestration,
}
end

Expand Down
101 changes: 101 additions & 0 deletions lib/stripe/resources/product_catalog/trial_offer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module ProductCatalog
# Resource for the TrialOffer API, used to describe a subscription item's trial period settings.
# Renders a TrialOffer object that describes the price, duration, end_behavior of a trial offer.
class TrialOffer < APIResource
extend Stripe::APIOperations::Create

OBJECT_NAME = "product_catalog.trial_offer"
def self.object_name
"product_catalog.trial_offer"
end

class Duration < ::Stripe::StripeObject
class Relative < ::Stripe::StripeObject
# The number of iterations of the price's interval for this trial offer.
attr_reader :iterations

def self.inner_class_types
@inner_class_types = {}
end

def self.field_remappings
@field_remappings = {}
end
end
# Attribute for field relative
attr_reader :relative
# The type of trial offer duration.
attr_reader :type

def self.inner_class_types
@inner_class_types = { relative: Relative }
end

def self.field_remappings
@field_remappings = {}
end
end

class EndBehavior < ::Stripe::StripeObject
class Transition < ::Stripe::StripeObject
# The new price to use at the end of the trial offer period.
attr_reader :price

def self.inner_class_types
@inner_class_types = {}
end

def self.field_remappings
@field_remappings = {}
end
end
# Attribute for field transition
attr_reader :transition
# The type of behavior when the trial offer ends.
attr_reader :type

def self.inner_class_types
@inner_class_types = { transition: Transition }
end

def self.field_remappings
@field_remappings = {}
end
end
# Attribute for field duration
attr_reader :duration
# Attribute for field end_behavior
attr_reader :end_behavior
# 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.
attr_reader :livemode
# String representing the object's type. Objects of the same type share the same value.
attr_reader :object
# The price during the trial offer.
attr_reader :price

# Creates a trial offer.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,
path: "/v1/product_catalog/trial_offers",
params: params,
opts: opts
)
end

def self.inner_class_types
@inner_class_types = { duration: Duration, end_behavior: EndBehavior }
end

def self.field_remappings
@field_remappings = {}
end
end
end
end
2 changes: 2 additions & 0 deletions lib/stripe/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
require "stripe/services/privacy/redaction_job_service"
require "stripe/services/privacy/redaction_job_validation_error_service"
require "stripe/services/privacy_service"
require "stripe/services/product_catalog/trial_offer_service"
require "stripe/services/product_catalog_service"
require "stripe/services/product_feature_service"
require "stripe/services/product_service"
require "stripe/services/promotion_code_service"
Expand Down
Loading