stripe 15.2.1 → 15.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -0
- data/CHANGELOG.md +66 -39
- data/OPENAPI_VERSION +1 -1
- data/README.md +14 -50
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
- data/lib/stripe/resources/account.rb +89 -5
- data/lib/stripe/resources/account_session.rb +79 -79
- data/lib/stripe/resources/billing_portal/session.rb +2 -2
- data/lib/stripe/resources/charge.rb +28 -15
- data/lib/stripe/resources/checkout/session.rb +57 -7
- data/lib/stripe/resources/confirmation_token.rb +19 -11
- data/lib/stripe/resources/credit_note.rb +9 -9
- data/lib/stripe/resources/customer_session.rb +2 -2
- data/lib/stripe/resources/event.rb +1 -1
- data/lib/stripe/resources/identity/verification_session.rb +34 -0
- data/lib/stripe/resources/invoice.rb +29 -4
- data/lib/stripe/resources/invoice_item.rb +1 -4
- data/lib/stripe/resources/mandate.rb +3 -0
- data/lib/stripe/resources/payment_intent.rb +331 -12
- data/lib/stripe/resources/payment_method.rb +17 -9
- data/lib/stripe/resources/quote.rb +26 -3
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +285 -3
- data/lib/stripe/resources/subscription.rb +68 -6
- data/lib/stripe/resources/subscription_schedule.rb +22 -0
- data/lib/stripe/resources/tax/registration.rb +20 -0
- data/lib/stripe/resources/terminal/configuration.rb +1 -0
- data/lib/stripe/resources/terminal/reader.rb +152 -4
- data/lib/stripe/resources/token.rb +1 -1
- data/lib/stripe/resources/treasury/financial_account.rb +5 -1
- data/lib/stripe/services/account_service.rb +83 -5
- data/lib/stripe/services/account_session_service.rb +48 -48
- data/lib/stripe/services/billing_portal/session_service.rb +1 -1
- data/lib/stripe/services/checkout/session_service.rb +57 -7
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +6 -6
- data/lib/stripe/services/customer_session_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +16 -0
- data/lib/stripe/services/invoice_service.rb +29 -4
- data/lib/stripe/services/payment_intent_service.rb +315 -9
- data/lib/stripe/services/payment_method_service.rb +5 -0
- data/lib/stripe/services/quote_service.rb +20 -3
- data/lib/stripe/services/setup_intent_service.rb +275 -2
- data/lib/stripe/services/subscription_schedule_service.rb +13 -0
- data/lib/stripe/services/subscription_service.rb +48 -4
- data/lib/stripe/services/tax/registration_service.rb +13 -0
- data/lib/stripe/services/terminal/reader_service.rb +90 -0
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -1
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/treasury/financial_account_service.rb +5 -1
- data/lib/stripe/services/v2/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe/resources/account.rbi +78 -9
- data/rbi/stripe/resources/account_session.rbi +79 -79
- data/rbi/stripe/resources/billing_portal/session.rbi +2 -2
- data/rbi/stripe/resources/charge.rbi +32 -15
- data/rbi/stripe/resources/checkout/session.rbi +65 -9
- data/rbi/stripe/resources/confirmation_token.rbi +23 -12
- data/rbi/stripe/resources/credit_note.rbi +9 -9
- data/rbi/stripe/resources/customer_session.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +1 -1
- data/rbi/stripe/resources/identity/verification_session.rbi +39 -1
- data/rbi/stripe/resources/invoice.rbi +36 -6
- data/rbi/stripe/resources/invoice_item.rbi +1 -4
- data/rbi/stripe/resources/mandate.rbi +4 -0
- data/rbi/stripe/resources/payment_intent.rbi +361 -21
- data/rbi/stripe/resources/payment_method.rbi +19 -10
- data/rbi/stripe/resources/quote.rbi +22 -3
- data/rbi/stripe/resources/setup_attempt.rbi +1 -1
- data/rbi/stripe/resources/setup_intent.rbi +332 -9
- data/rbi/stripe/resources/subscription.rbi +60 -7
- data/rbi/stripe/resources/subscription_schedule.rbi +23 -1
- data/rbi/stripe/resources/tax/registration.rbi +20 -1
- data/rbi/stripe/resources/terminal/configuration.rbi +1 -0
- data/rbi/stripe/resources/terminal/location.rbi +2 -2
- data/rbi/stripe/resources/terminal/reader.rbi +151 -4
- data/rbi/stripe/resources/token.rbi +1 -1
- data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
- data/rbi/stripe/services/account_service.rbi +77 -9
- data/rbi/stripe/services/account_session_service.rbi +48 -48
- data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
- data/rbi/stripe/services/checkout/session_service.rbi +65 -9
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
- data/rbi/stripe/services/credit_note_service.rbi +6 -6
- data/rbi/stripe/services/customer_session_service.rbi +1 -1
- data/rbi/stripe/services/identity/verification_session_service.rbi +17 -1
- data/rbi/stripe/services/invoice_service.rbi +36 -6
- data/rbi/stripe/services/payment_intent_service.rbi +348 -18
- data/rbi/stripe/services/payment_method_service.rbi +6 -1
- data/rbi/stripe/services/quote_service.rbi +16 -3
- data/rbi/stripe/services/setup_intent_service.rbi +326 -8
- data/rbi/stripe/services/subscription_schedule_service.rbi +12 -1
- data/rbi/stripe/services/subscription_service.rbi +41 -5
- data/rbi/stripe/services/tax/registration_service.rbi +14 -1
- data/rbi/stripe/services/terminal/location_service.rbi +2 -2
- data/rbi/stripe/services/terminal/reader_service.rbi +85 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +9 -2
- data/rbi/stripe/services/token_service.rbi +1 -1
- data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
- data/rbi/stripe/services/v2/billing_service.rbi +1 -1
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +13 -13
- metadata +3 -2
@@ -1181,6 +1181,45 @@ module Stripe
|
|
1181
1181
|
def initialize(capture_method: nil, setup_future_usage: nil); end
|
1182
1182
|
end
|
1183
1183
|
class Klarna < Stripe::RequestParams
|
1184
|
+
class Subscription < Stripe::RequestParams
|
1185
|
+
class NextBilling < Stripe::RequestParams
|
1186
|
+
# The amount of the next charge for the subscription.
|
1187
|
+
sig { returns(Integer) }
|
1188
|
+
attr_accessor :amount
|
1189
|
+
# The date of the next charge for the subscription in YYYY-MM-DD format.
|
1190
|
+
sig { returns(String) }
|
1191
|
+
attr_accessor :date
|
1192
|
+
sig { params(amount: Integer, date: String).void }
|
1193
|
+
def initialize(amount: nil, date: nil); end
|
1194
|
+
end
|
1195
|
+
# Unit of time between subscription charges.
|
1196
|
+
sig { returns(String) }
|
1197
|
+
attr_accessor :interval
|
1198
|
+
# The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
|
1199
|
+
sig { returns(T.nilable(Integer)) }
|
1200
|
+
attr_accessor :interval_count
|
1201
|
+
# Name for subscription.
|
1202
|
+
sig { returns(T.nilable(String)) }
|
1203
|
+
attr_accessor :name
|
1204
|
+
# Describes the upcoming charge for this subscription.
|
1205
|
+
sig {
|
1206
|
+
returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling)
|
1207
|
+
}
|
1208
|
+
attr_accessor :next_billing
|
1209
|
+
# A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
|
1210
|
+
sig { returns(String) }
|
1211
|
+
attr_accessor :reference
|
1212
|
+
sig {
|
1213
|
+
params(interval: String, interval_count: T.nilable(Integer), name: T.nilable(String), next_billing: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna::Subscription::NextBilling, reference: String).void
|
1214
|
+
}
|
1215
|
+
def initialize(
|
1216
|
+
interval: nil,
|
1217
|
+
interval_count: nil,
|
1218
|
+
name: nil,
|
1219
|
+
next_billing: nil,
|
1220
|
+
reference: nil
|
1221
|
+
); end
|
1222
|
+
end
|
1184
1223
|
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
1185
1224
|
#
|
1186
1225
|
# If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
|
@@ -1190,8 +1229,15 @@ module Stripe
|
|
1190
1229
|
# When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
|
1191
1230
|
sig { returns(T.nilable(String)) }
|
1192
1231
|
attr_accessor :setup_future_usage
|
1193
|
-
|
1194
|
-
|
1232
|
+
# Subscription details if the Checkout Session sets up a future subscription.
|
1233
|
+
sig {
|
1234
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna::Subscription]))))
|
1235
|
+
}
|
1236
|
+
attr_accessor :subscriptions
|
1237
|
+
sig {
|
1238
|
+
params(setup_future_usage: T.nilable(String), subscriptions: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna::Subscription])))).void
|
1239
|
+
}
|
1240
|
+
def initialize(setup_future_usage: nil, subscriptions: nil); end
|
1195
1241
|
end
|
1196
1242
|
class Konbini < Stripe::RequestParams
|
1197
1243
|
# The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
|
@@ -1938,6 +1984,13 @@ module Stripe
|
|
1938
1984
|
def initialize(shipping_rate: nil, shipping_rate_data: nil); end
|
1939
1985
|
end
|
1940
1986
|
class SubscriptionData < Stripe::RequestParams
|
1987
|
+
class BillingMode < Stripe::RequestParams
|
1988
|
+
# Attribute for param field type
|
1989
|
+
sig { returns(String) }
|
1990
|
+
attr_accessor :type
|
1991
|
+
sig { params(type: String).void }
|
1992
|
+
def initialize(type: nil); end
|
1993
|
+
end
|
1941
1994
|
class InvoiceSettings < Stripe::RequestParams
|
1942
1995
|
class Issuer < Stripe::RequestParams
|
1943
1996
|
# The connected account being referenced when `type` is `account`.
|
@@ -1993,6 +2046,11 @@ module Stripe
|
|
1993
2046
|
# A future timestamp to anchor the subscription's billing cycle for new subscriptions.
|
1994
2047
|
sig { returns(T.nilable(Integer)) }
|
1995
2048
|
attr_accessor :billing_cycle_anchor
|
2049
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2050
|
+
sig {
|
2051
|
+
returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::BillingMode))
|
2052
|
+
}
|
2053
|
+
attr_accessor :billing_mode
|
1996
2054
|
# The tax rates that will apply to any subscription item that does not have
|
1997
2055
|
# `tax_rates` set. Invoices created will have their `default_tax_rates` populated
|
1998
2056
|
# from the subscription.
|
@@ -2022,13 +2080,10 @@ module Stripe
|
|
2022
2080
|
returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData))
|
2023
2081
|
}
|
2024
2082
|
attr_accessor :transfer_data
|
2025
|
-
# Unix timestamp representing the end of the trial period the customer
|
2026
|
-
# will get before being charged for the first time. Has to be at least
|
2027
|
-
# 48 hours in the future.
|
2083
|
+
# 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.
|
2028
2084
|
sig { returns(T.nilable(Integer)) }
|
2029
2085
|
attr_accessor :trial_end
|
2030
|
-
# Integer representing the number of trial period days before the
|
2031
|
-
# customer is charged for the first time. Has to be at least 1.
|
2086
|
+
# Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
|
2032
2087
|
sig { returns(T.nilable(Integer)) }
|
2033
2088
|
attr_accessor :trial_period_days
|
2034
2089
|
# Settings related to subscription trials.
|
@@ -2037,11 +2092,12 @@ module Stripe
|
|
2037
2092
|
}
|
2038
2093
|
attr_accessor :trial_settings
|
2039
2094
|
sig {
|
2040
|
-
params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void
|
2095
|
+
params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::BillingMode), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void
|
2041
2096
|
}
|
2042
2097
|
def initialize(
|
2043
2098
|
application_fee_percent: nil,
|
2044
2099
|
billing_cycle_anchor: nil,
|
2100
|
+
billing_mode: nil,
|
2045
2101
|
default_tax_rates: nil,
|
2046
2102
|
description: nil,
|
2047
2103
|
invoice_settings: nil,
|
@@ -2175,7 +2231,7 @@ module Stripe
|
|
2175
2231
|
returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation))
|
2176
2232
|
}
|
2177
2233
|
attr_accessor :invoice_creation
|
2178
|
-
# A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
|
2234
|
+
# 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.
|
2179
2235
|
#
|
2180
2236
|
# 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.
|
2181
2237
|
#
|
@@ -80,7 +80,7 @@ module Stripe
|
|
80
80
|
sig { params(shipping_rate: T.nilable(String)).void }
|
81
81
|
def initialize(shipping_rate: nil); end
|
82
82
|
end
|
83
|
-
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
83
|
+
# 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.
|
84
84
|
sig { returns(T.nilable(Integer)) }
|
85
85
|
attr_accessor :amount
|
86
86
|
# 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.
|
@@ -104,7 +104,7 @@ module Stripe
|
|
104
104
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
105
105
|
sig { returns(T.nilable(Integer)) }
|
106
106
|
attr_accessor :limit
|
107
|
-
# Line items that make up the credit note.
|
107
|
+
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
108
108
|
sig {
|
109
109
|
returns(T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line]))
|
110
110
|
}
|
@@ -129,7 +129,7 @@ module Stripe
|
|
129
129
|
returns(T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Refund]))
|
130
130
|
}
|
131
131
|
attr_accessor :refunds
|
132
|
-
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
132
|
+
# 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.
|
133
133
|
sig { returns(T.nilable(::Stripe::CreditNotePreviewLinesService::ListParams::ShippingCost)) }
|
134
134
|
attr_accessor :shipping_cost
|
135
135
|
# 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.
|
@@ -135,7 +135,7 @@ module Stripe
|
|
135
135
|
sig { params(shipping_rate: T.nilable(String)).void }
|
136
136
|
def initialize(shipping_rate: nil); end
|
137
137
|
end
|
138
|
-
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
138
|
+
# 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.
|
139
139
|
sig { returns(T.nilable(Integer)) }
|
140
140
|
attr_accessor :amount
|
141
141
|
# 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.
|
@@ -153,7 +153,7 @@ module Stripe
|
|
153
153
|
# ID of the invoice.
|
154
154
|
sig { returns(String) }
|
155
155
|
attr_accessor :invoice
|
156
|
-
# Line items that make up the credit note.
|
156
|
+
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
157
157
|
sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Line])) }
|
158
158
|
attr_accessor :lines
|
159
159
|
# The credit note's memo appears on the credit note PDF.
|
@@ -174,7 +174,7 @@ module Stripe
|
|
174
174
|
# Refunds to link to this credit note.
|
175
175
|
sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Refund])) }
|
176
176
|
attr_accessor :refunds
|
177
|
-
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
177
|
+
# 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.
|
178
178
|
sig { returns(T.nilable(::Stripe::CreditNoteService::CreateParams::ShippingCost)) }
|
179
179
|
attr_accessor :shipping_cost
|
180
180
|
sig {
|
@@ -295,7 +295,7 @@ module Stripe
|
|
295
295
|
sig { params(shipping_rate: T.nilable(String)).void }
|
296
296
|
def initialize(shipping_rate: nil); end
|
297
297
|
end
|
298
|
-
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
298
|
+
# 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.
|
299
299
|
sig { returns(T.nilable(Integer)) }
|
300
300
|
attr_accessor :amount
|
301
301
|
# 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.
|
@@ -313,7 +313,7 @@ module Stripe
|
|
313
313
|
# ID of the invoice.
|
314
314
|
sig { returns(String) }
|
315
315
|
attr_accessor :invoice
|
316
|
-
# Line items that make up the credit note.
|
316
|
+
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
317
317
|
sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Line])) }
|
318
318
|
attr_accessor :lines
|
319
319
|
# The credit note's memo appears on the credit note PDF.
|
@@ -334,7 +334,7 @@ module Stripe
|
|
334
334
|
# Refunds to link to this credit note.
|
335
335
|
sig { returns(T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Refund])) }
|
336
336
|
attr_accessor :refunds
|
337
|
-
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
337
|
+
# 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.
|
338
338
|
sig { returns(T.nilable(::Stripe::CreditNoteService::PreviewParams::ShippingCost)) }
|
339
339
|
attr_accessor :shipping_cost
|
340
340
|
sig {
|
@@ -23,7 +23,7 @@ module Stripe
|
|
23
23
|
# Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
|
24
24
|
sig { returns(T.nilable(String)) }
|
25
25
|
attr_accessor :payment_method_redisplay
|
26
|
-
# Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
|
26
|
+
# Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`.
|
27
27
|
sig { returns(T.nilable(Integer)) }
|
28
28
|
attr_accessor :payment_method_redisplay_limit
|
29
29
|
# Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
|
@@ -109,6 +109,16 @@ module Stripe
|
|
109
109
|
sig { params(email: T.nilable(String), phone: T.nilable(String)).void }
|
110
110
|
def initialize(email: nil, phone: nil); end
|
111
111
|
end
|
112
|
+
class RelatedPerson < Stripe::RequestParams
|
113
|
+
# A token representing a connected account. If provided, the person parameter is also required and must be associated with the account.
|
114
|
+
sig { returns(String) }
|
115
|
+
attr_accessor :account
|
116
|
+
# A token referencing a Person resource that this verification is being used to verify.
|
117
|
+
sig { returns(String) }
|
118
|
+
attr_accessor :person
|
119
|
+
sig { params(account: String, person: String).void }
|
120
|
+
def initialize(account: nil, person: nil); end
|
121
|
+
end
|
112
122
|
# 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.
|
113
123
|
sig { returns(T.nilable(String)) }
|
114
124
|
attr_accessor :client_reference_id
|
@@ -131,6 +141,11 @@ module Stripe
|
|
131
141
|
# Customer ID
|
132
142
|
sig { returns(T.nilable(String)) }
|
133
143
|
attr_accessor :related_customer
|
144
|
+
# Tokens referencing a Person resource and it's associated account.
|
145
|
+
sig {
|
146
|
+
returns(T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::RelatedPerson))
|
147
|
+
}
|
148
|
+
attr_accessor :related_person
|
134
149
|
# The URL that the user will be redirected to upon completing the verification flow.
|
135
150
|
sig { returns(T.nilable(String)) }
|
136
151
|
attr_accessor :return_url
|
@@ -141,7 +156,7 @@ module Stripe
|
|
141
156
|
sig { returns(T.nilable(String)) }
|
142
157
|
attr_accessor :verification_flow
|
143
158
|
sig {
|
144
|
-
params(client_reference_id: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails), related_customer: T.nilable(String), return_url: T.nilable(String), type: T.nilable(String), verification_flow: T.nilable(String)).void
|
159
|
+
params(client_reference_id: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), options: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::Options), provided_details: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails), related_customer: T.nilable(String), related_person: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::RelatedPerson), return_url: T.nilable(String), type: T.nilable(String), verification_flow: T.nilable(String)).void
|
145
160
|
}
|
146
161
|
def initialize(
|
147
162
|
client_reference_id: nil,
|
@@ -150,6 +165,7 @@ module Stripe
|
|
150
165
|
options: nil,
|
151
166
|
provided_details: nil,
|
152
167
|
related_customer: nil,
|
168
|
+
related_person: nil,
|
153
169
|
return_url: nil,
|
154
170
|
type: nil,
|
155
171
|
verification_flow: nil
|
@@ -111,7 +111,7 @@ module Stripe
|
|
111
111
|
# One of `month`.
|
112
112
|
sig { returns(T.nilable(String)) }
|
113
113
|
attr_accessor :interval
|
114
|
-
# Type of installment plan, one of `fixed_count`.
|
114
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
115
115
|
sig { returns(String) }
|
116
116
|
attr_accessor :type
|
117
117
|
sig {
|
@@ -805,7 +805,7 @@ module Stripe
|
|
805
805
|
# One of `month`.
|
806
806
|
sig { returns(T.nilable(String)) }
|
807
807
|
attr_accessor :interval
|
808
|
-
# Type of installment plan, one of `fixed_count`.
|
808
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
809
809
|
sig { returns(String) }
|
810
810
|
attr_accessor :type
|
811
811
|
sig {
|
@@ -2216,6 +2216,13 @@ module Stripe
|
|
2216
2216
|
def initialize(account: nil, type: nil); end
|
2217
2217
|
end
|
2218
2218
|
class ScheduleDetails < Stripe::RequestParams
|
2219
|
+
class BillingMode < Stripe::RequestParams
|
2220
|
+
# Attribute for param field type
|
2221
|
+
sig { returns(String) }
|
2222
|
+
attr_accessor :type
|
2223
|
+
sig { params(type: String).void }
|
2224
|
+
def initialize(type: nil); end
|
2225
|
+
end
|
2219
2226
|
class Phase < Stripe::RequestParams
|
2220
2227
|
class AddInvoiceItem < Stripe::RequestParams
|
2221
2228
|
class Discount < Stripe::RequestParams
|
@@ -2596,6 +2603,11 @@ module Stripe
|
|
2596
2603
|
trial_end: nil
|
2597
2604
|
); end
|
2598
2605
|
end
|
2606
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2607
|
+
sig {
|
2608
|
+
returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode))
|
2609
|
+
}
|
2610
|
+
attr_accessor :billing_mode
|
2599
2611
|
# Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
2600
2612
|
sig { returns(T.nilable(String)) }
|
2601
2613
|
attr_accessor :end_behavior
|
@@ -2608,11 +2620,23 @@ module Stripe
|
|
2608
2620
|
sig { returns(T.nilable(String)) }
|
2609
2621
|
attr_accessor :proration_behavior
|
2610
2622
|
sig {
|
2611
|
-
params(end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
|
2623
|
+
params(billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), proration_behavior: T.nilable(String)).void
|
2612
2624
|
}
|
2613
|
-
def initialize(
|
2625
|
+
def initialize(
|
2626
|
+
billing_mode: nil,
|
2627
|
+
end_behavior: nil,
|
2628
|
+
phases: nil,
|
2629
|
+
proration_behavior: nil
|
2630
|
+
); end
|
2614
2631
|
end
|
2615
2632
|
class SubscriptionDetails < Stripe::RequestParams
|
2633
|
+
class BillingMode < Stripe::RequestParams
|
2634
|
+
# Attribute for param field type
|
2635
|
+
sig { returns(String) }
|
2636
|
+
attr_accessor :type
|
2637
|
+
sig { params(type: String).void }
|
2638
|
+
def initialize(type: nil); end
|
2639
|
+
end
|
2616
2640
|
class Item < Stripe::RequestParams
|
2617
2641
|
class BillingThresholds < Stripe::RequestParams
|
2618
2642
|
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
@@ -2738,10 +2762,15 @@ module Stripe
|
|
2738
2762
|
# For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
2739
2763
|
sig { returns(T.nilable(T.any(String, Integer))) }
|
2740
2764
|
attr_accessor :billing_cycle_anchor
|
2765
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2766
|
+
sig {
|
2767
|
+
returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode))
|
2768
|
+
}
|
2769
|
+
attr_accessor :billing_mode
|
2741
2770
|
# 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.
|
2742
2771
|
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
2743
2772
|
attr_accessor :cancel_at
|
2744
|
-
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
2773
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
2745
2774
|
sig { returns(T.nilable(T::Boolean)) }
|
2746
2775
|
attr_accessor :cancel_at_period_end
|
2747
2776
|
# This simulates the subscription being canceled or expired immediately.
|
@@ -2771,10 +2800,11 @@ module Stripe
|
|
2771
2800
|
sig { returns(T.nilable(T.any(String, Integer))) }
|
2772
2801
|
attr_accessor :trial_end
|
2773
2802
|
sig {
|
2774
|
-
params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void
|
2803
|
+
params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void
|
2775
2804
|
}
|
2776
2805
|
def initialize(
|
2777
2806
|
billing_cycle_anchor: nil,
|
2807
|
+
billing_mode: nil,
|
2778
2808
|
cancel_at: nil,
|
2779
2809
|
cancel_at_period_end: nil,
|
2780
2810
|
cancel_now: nil,
|