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
@@ -2179,6 +2179,43 @@ module Stripe
|
|
2179
2179
|
end
|
2180
2180
|
|
2181
2181
|
class Klarna < Stripe::RequestParams
|
2182
|
+
class Subscription < Stripe::RequestParams
|
2183
|
+
class NextBilling < Stripe::RequestParams
|
2184
|
+
# The amount of the next charge for the subscription.
|
2185
|
+
attr_accessor :amount
|
2186
|
+
# The date of the next charge for the subscription in YYYY-MM-DD format.
|
2187
|
+
attr_accessor :date
|
2188
|
+
|
2189
|
+
def initialize(amount: nil, date: nil)
|
2190
|
+
@amount = amount
|
2191
|
+
@date = date
|
2192
|
+
end
|
2193
|
+
end
|
2194
|
+
# Unit of time between subscription charges.
|
2195
|
+
attr_accessor :interval
|
2196
|
+
# The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
|
2197
|
+
attr_accessor :interval_count
|
2198
|
+
# Name for subscription.
|
2199
|
+
attr_accessor :name
|
2200
|
+
# Describes the upcoming charge for this subscription.
|
2201
|
+
attr_accessor :next_billing
|
2202
|
+
# A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
|
2203
|
+
attr_accessor :reference
|
2204
|
+
|
2205
|
+
def initialize(
|
2206
|
+
interval: nil,
|
2207
|
+
interval_count: nil,
|
2208
|
+
name: nil,
|
2209
|
+
next_billing: nil,
|
2210
|
+
reference: nil
|
2211
|
+
)
|
2212
|
+
@interval = interval
|
2213
|
+
@interval_count = interval_count
|
2214
|
+
@name = name
|
2215
|
+
@next_billing = next_billing
|
2216
|
+
@reference = reference
|
2217
|
+
end
|
2218
|
+
end
|
2182
2219
|
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
2183
2220
|
#
|
2184
2221
|
# 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.
|
@@ -2187,9 +2224,12 @@ module Stripe
|
|
2187
2224
|
#
|
2188
2225
|
# 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).
|
2189
2226
|
attr_accessor :setup_future_usage
|
2227
|
+
# Subscription details if the Checkout Session sets up a future subscription.
|
2228
|
+
attr_accessor :subscriptions
|
2190
2229
|
|
2191
|
-
def initialize(setup_future_usage: nil)
|
2230
|
+
def initialize(setup_future_usage: nil, subscriptions: nil)
|
2192
2231
|
@setup_future_usage = setup_future_usage
|
2232
|
+
@subscriptions = subscriptions
|
2193
2233
|
end
|
2194
2234
|
end
|
2195
2235
|
|
@@ -2872,6 +2912,15 @@ module Stripe
|
|
2872
2912
|
end
|
2873
2913
|
|
2874
2914
|
class SubscriptionData < Stripe::RequestParams
|
2915
|
+
class BillingMode < Stripe::RequestParams
|
2916
|
+
# Attribute for param field type
|
2917
|
+
attr_accessor :type
|
2918
|
+
|
2919
|
+
def initialize(type: nil)
|
2920
|
+
@type = type
|
2921
|
+
end
|
2922
|
+
end
|
2923
|
+
|
2875
2924
|
class InvoiceSettings < Stripe::RequestParams
|
2876
2925
|
class Issuer < Stripe::RequestParams
|
2877
2926
|
# The connected account being referenced when `type` is `account`.
|
@@ -2924,6 +2973,8 @@ module Stripe
|
|
2924
2973
|
attr_accessor :application_fee_percent
|
2925
2974
|
# A future timestamp to anchor the subscription's billing cycle for new subscriptions.
|
2926
2975
|
attr_accessor :billing_cycle_anchor
|
2976
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2977
|
+
attr_accessor :billing_mode
|
2927
2978
|
# The tax rates that will apply to any subscription item that does not have
|
2928
2979
|
# `tax_rates` set. Invoices created will have their `default_tax_rates` populated
|
2929
2980
|
# from the subscription.
|
@@ -2942,12 +2993,9 @@ module Stripe
|
|
2942
2993
|
attr_accessor :proration_behavior
|
2943
2994
|
# 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.
|
2944
2995
|
attr_accessor :transfer_data
|
2945
|
-
# Unix timestamp representing the end of the trial period the customer
|
2946
|
-
# will get before being charged for the first time. Has to be at least
|
2947
|
-
# 48 hours in the future.
|
2996
|
+
# 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.
|
2948
2997
|
attr_accessor :trial_end
|
2949
|
-
# Integer representing the number of trial period days before the
|
2950
|
-
# customer is charged for the first time. Has to be at least 1.
|
2998
|
+
# Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
|
2951
2999
|
attr_accessor :trial_period_days
|
2952
3000
|
# Settings related to subscription trials.
|
2953
3001
|
attr_accessor :trial_settings
|
@@ -2955,6 +3003,7 @@ module Stripe
|
|
2955
3003
|
def initialize(
|
2956
3004
|
application_fee_percent: nil,
|
2957
3005
|
billing_cycle_anchor: nil,
|
3006
|
+
billing_mode: nil,
|
2958
3007
|
default_tax_rates: nil,
|
2959
3008
|
description: nil,
|
2960
3009
|
invoice_settings: nil,
|
@@ -2968,6 +3017,7 @@ module Stripe
|
|
2968
3017
|
)
|
2969
3018
|
@application_fee_percent = application_fee_percent
|
2970
3019
|
@billing_cycle_anchor = billing_cycle_anchor
|
3020
|
+
@billing_mode = billing_mode
|
2971
3021
|
@default_tax_rates = default_tax_rates
|
2972
3022
|
@description = description
|
2973
3023
|
@invoice_settings = invoice_settings
|
@@ -3071,7 +3121,7 @@ module Stripe
|
|
3071
3121
|
attr_accessor :expires_at
|
3072
3122
|
# Generate a post-purchase Invoice for one-time payments.
|
3073
3123
|
attr_accessor :invoice_creation
|
3074
|
-
# A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
|
3124
|
+
# 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.
|
3075
3125
|
#
|
3076
3126
|
# 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.
|
3077
3127
|
#
|
@@ -41,7 +41,7 @@ module Stripe
|
|
41
41
|
# For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
|
42
42
|
# One of `month`.
|
43
43
|
attr_reader :interval
|
44
|
-
# Type of installment plan, one of `fixed_count`.
|
44
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
45
45
|
attr_reader :type
|
46
46
|
end
|
47
47
|
# Attribute for field plan
|
@@ -154,9 +154,9 @@ module Stripe
|
|
154
154
|
class Receipt < Stripe::StripeObject
|
155
155
|
# The type of account being debited or credited
|
156
156
|
attr_reader :account_type
|
157
|
-
#
|
157
|
+
# The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.
|
158
158
|
attr_reader :application_cryptogram
|
159
|
-
#
|
159
|
+
# The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip.
|
160
160
|
attr_reader :application_preferred_name
|
161
161
|
# Identifier for this transaction.
|
162
162
|
attr_reader :authorization_code
|
@@ -164,11 +164,11 @@ module Stripe
|
|
164
164
|
attr_reader :authorization_response_code
|
165
165
|
# Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
|
166
166
|
attr_reader :cardholder_verification_method
|
167
|
-
#
|
167
|
+
# Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.
|
168
168
|
attr_reader :dedicated_file_name
|
169
|
-
#
|
169
|
+
# A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95.
|
170
170
|
attr_reader :terminal_verification_results
|
171
|
-
# An indication of
|
171
|
+
# An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.
|
172
172
|
attr_reader :transaction_status_information
|
173
173
|
end
|
174
174
|
|
@@ -220,7 +220,7 @@ module Stripe
|
|
220
220
|
attr_reader :offline
|
221
221
|
# Defines whether the authorized amount can be over-captured or not
|
222
222
|
attr_reader :overcapture_supported
|
223
|
-
# EMV tag 5F2D
|
223
|
+
# The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.
|
224
224
|
attr_reader :preferred_locales
|
225
225
|
# How card details were read in this transaction.
|
226
226
|
attr_reader :read_method
|
@@ -447,7 +447,7 @@ module Stripe
|
|
447
447
|
attr_reader :networks
|
448
448
|
# Details about payment methods collected offline.
|
449
449
|
attr_reader :offline
|
450
|
-
# EMV tag 5F2D
|
450
|
+
# The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.
|
451
451
|
attr_reader :preferred_locales
|
452
452
|
# How card details were read in this transaction.
|
453
453
|
attr_reader :read_method
|
@@ -462,6 +462,7 @@ module Stripe
|
|
462
462
|
attr_reader :cashtag
|
463
463
|
end
|
464
464
|
|
465
|
+
class Crypto < Stripe::StripeObject; end
|
465
466
|
class CustomerBalance < Stripe::StripeObject; end
|
466
467
|
|
467
468
|
class Eps < Stripe::StripeObject
|
@@ -480,7 +481,7 @@ module Stripe
|
|
480
481
|
class Grabpay < Stripe::StripeObject; end
|
481
482
|
|
482
483
|
class Ideal < Stripe::StripeObject
|
483
|
-
# The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
|
484
|
+
# The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
|
484
485
|
attr_reader :bank
|
485
486
|
# The Bank Identifier Code of the customer's bank, if the bank was provided.
|
486
487
|
attr_reader :bic
|
@@ -519,7 +520,7 @@ module Stripe
|
|
519
520
|
attr_reader :last4
|
520
521
|
# Contains information about card networks that can be used to process the payment.
|
521
522
|
attr_reader :networks
|
522
|
-
# EMV tag 5F2D
|
523
|
+
# The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.
|
523
524
|
attr_reader :preferred_locales
|
524
525
|
# How card details were read in this transaction.
|
525
526
|
attr_reader :read_method
|
@@ -711,6 +712,8 @@ module Stripe
|
|
711
712
|
attr_reader :card_present
|
712
713
|
# Attribute for field cashapp
|
713
714
|
attr_reader :cashapp
|
715
|
+
# Attribute for field crypto
|
716
|
+
attr_reader :crypto
|
714
717
|
# The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
|
715
718
|
attr_reader :customer
|
716
719
|
# Attribute for field customer_balance
|
@@ -921,6 +924,7 @@ module Stripe
|
|
921
924
|
end
|
922
925
|
|
923
926
|
class Cashapp < Stripe::RequestParams; end
|
927
|
+
class Crypto < Stripe::RequestParams; end
|
924
928
|
class CustomerBalance < Stripe::RequestParams; end
|
925
929
|
|
926
930
|
class Eps < Stripe::RequestParams
|
@@ -1139,6 +1143,8 @@ module Stripe
|
|
1139
1143
|
attr_accessor :boleto
|
1140
1144
|
# If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
|
1141
1145
|
attr_accessor :cashapp
|
1146
|
+
# If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
|
1147
|
+
attr_accessor :crypto
|
1142
1148
|
# If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
|
1143
1149
|
attr_accessor :customer_balance
|
1144
1150
|
# If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
|
@@ -1230,6 +1236,7 @@ module Stripe
|
|
1230
1236
|
blik: nil,
|
1231
1237
|
boleto: nil,
|
1232
1238
|
cashapp: nil,
|
1239
|
+
crypto: nil,
|
1233
1240
|
customer_balance: nil,
|
1234
1241
|
eps: nil,
|
1235
1242
|
fpx: nil,
|
@@ -1283,6 +1290,7 @@ module Stripe
|
|
1283
1290
|
@blik = blik
|
1284
1291
|
@boleto = boleto
|
1285
1292
|
@cashapp = cashapp
|
1293
|
+
@crypto = crypto
|
1286
1294
|
@customer_balance = customer_balance
|
1287
1295
|
@eps = eps
|
1288
1296
|
@fpx = fpx
|
@@ -1332,7 +1340,7 @@ module Stripe
|
|
1332
1340
|
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
1333
1341
|
# One of `month`.
|
1334
1342
|
attr_accessor :interval
|
1335
|
-
# Type of installment plan, one of `fixed_count`.
|
1343
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
1336
1344
|
attr_accessor :type
|
1337
1345
|
|
1338
1346
|
def initialize(count: nil, interval: nil, type: nil)
|
@@ -214,7 +214,7 @@ module Stripe
|
|
214
214
|
@shipping_rate = shipping_rate
|
215
215
|
end
|
216
216
|
end
|
217
|
-
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
217
|
+
# 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.
|
218
218
|
attr_accessor :amount
|
219
219
|
# 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.
|
220
220
|
attr_accessor :credit_amount
|
@@ -226,7 +226,7 @@ module Stripe
|
|
226
226
|
attr_accessor :expand
|
227
227
|
# ID of the invoice.
|
228
228
|
attr_accessor :invoice
|
229
|
-
# Line items that make up the credit note.
|
229
|
+
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
230
230
|
attr_accessor :lines
|
231
231
|
# The credit note's memo appears on the credit note PDF.
|
232
232
|
attr_accessor :memo
|
@@ -240,7 +240,7 @@ module Stripe
|
|
240
240
|
attr_accessor :refund_amount
|
241
241
|
# Refunds to link to this credit note.
|
242
242
|
attr_accessor :refunds
|
243
|
-
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
243
|
+
# 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.
|
244
244
|
attr_accessor :shipping_cost
|
245
245
|
|
246
246
|
def initialize(
|
@@ -369,7 +369,7 @@ module Stripe
|
|
369
369
|
@shipping_rate = shipping_rate
|
370
370
|
end
|
371
371
|
end
|
372
|
-
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
372
|
+
# 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.
|
373
373
|
attr_accessor :amount
|
374
374
|
# 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.
|
375
375
|
attr_accessor :credit_amount
|
@@ -381,7 +381,7 @@ module Stripe
|
|
381
381
|
attr_accessor :expand
|
382
382
|
# ID of the invoice.
|
383
383
|
attr_accessor :invoice
|
384
|
-
# Line items that make up the credit note.
|
384
|
+
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
385
385
|
attr_accessor :lines
|
386
386
|
# The credit note's memo appears on the credit note PDF.
|
387
387
|
attr_accessor :memo
|
@@ -395,7 +395,7 @@ module Stripe
|
|
395
395
|
attr_accessor :refund_amount
|
396
396
|
# Refunds to link to this credit note.
|
397
397
|
attr_accessor :refunds
|
398
|
-
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
398
|
+
# 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.
|
399
399
|
attr_accessor :shipping_cost
|
400
400
|
|
401
401
|
def initialize(
|
@@ -509,7 +509,7 @@ module Stripe
|
|
509
509
|
@shipping_rate = shipping_rate
|
510
510
|
end
|
511
511
|
end
|
512
|
-
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
512
|
+
# 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.
|
513
513
|
attr_accessor :amount
|
514
514
|
# 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.
|
515
515
|
attr_accessor :credit_amount
|
@@ -525,7 +525,7 @@ module Stripe
|
|
525
525
|
attr_accessor :invoice
|
526
526
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
527
527
|
attr_accessor :limit
|
528
|
-
# Line items that make up the credit note.
|
528
|
+
# Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
|
529
529
|
attr_accessor :lines
|
530
530
|
# The credit note's memo appears on the credit note PDF.
|
531
531
|
attr_accessor :memo
|
@@ -539,7 +539,7 @@ module Stripe
|
|
539
539
|
attr_accessor :refund_amount
|
540
540
|
# Refunds to link to this credit note.
|
541
541
|
attr_accessor :refunds
|
542
|
-
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
542
|
+
# 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.
|
543
543
|
attr_accessor :shipping_cost
|
544
544
|
# 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.
|
545
545
|
attr_accessor :starting_after
|
@@ -30,7 +30,7 @@ module Stripe
|
|
30
30
|
attr_reader :payment_method_allow_redisplay_filters
|
31
31
|
# Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
|
32
32
|
attr_reader :payment_method_redisplay
|
33
|
-
# Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
|
33
|
+
# 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`.
|
34
34
|
attr_reader :payment_method_redisplay_limit
|
35
35
|
# Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
|
36
36
|
#
|
@@ -82,7 +82,7 @@ module Stripe
|
|
82
82
|
attr_accessor :payment_method_allow_redisplay_filters
|
83
83
|
# Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
|
84
84
|
attr_accessor :payment_method_redisplay
|
85
|
-
# Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
|
85
|
+
# 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`.
|
86
86
|
attr_accessor :payment_method_redisplay_limit
|
87
87
|
# Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
|
88
88
|
#
|
@@ -111,7 +111,7 @@ module Stripe
|
|
111
111
|
end
|
112
112
|
# The connected account that originates the event.
|
113
113
|
attr_reader :account
|
114
|
-
# The Stripe API version used to render `data
|
114
|
+
# 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.
|
115
115
|
attr_reader :api_version
|
116
116
|
# Authentication context needed to fetch the event or related object.
|
117
117
|
attr_reader :context
|
@@ -50,6 +50,13 @@ module Stripe
|
|
50
50
|
|
51
51
|
class IdNumber < Stripe::StripeObject; end
|
52
52
|
|
53
|
+
class Matching < Stripe::StripeObject
|
54
|
+
# Strictness of the DOB matching policy to apply.
|
55
|
+
attr_reader :dob
|
56
|
+
# Strictness of the name matching policy to apply.
|
57
|
+
attr_reader :name
|
58
|
+
end
|
59
|
+
|
53
60
|
class Phone < Stripe::StripeObject
|
54
61
|
# Request one time password verification of `provided_details.phone`.
|
55
62
|
attr_reader :require_verification
|
@@ -60,6 +67,8 @@ module Stripe
|
|
60
67
|
attr_reader :email
|
61
68
|
# Attribute for field id_number
|
62
69
|
attr_reader :id_number
|
70
|
+
# Attribute for field matching
|
71
|
+
attr_reader :matching
|
63
72
|
# Attribute for field phone
|
64
73
|
attr_reader :phone
|
65
74
|
end
|
@@ -76,6 +85,13 @@ module Stripe
|
|
76
85
|
attr_reader :status
|
77
86
|
end
|
78
87
|
|
88
|
+
class RelatedPerson < Stripe::StripeObject
|
89
|
+
# Token referencing the associated Account of the related Person resource.
|
90
|
+
attr_reader :account
|
91
|
+
# Token referencing the related Person resource.
|
92
|
+
attr_reader :person
|
93
|
+
end
|
94
|
+
|
79
95
|
class VerifiedOutputs < Stripe::StripeObject
|
80
96
|
class Address < Stripe::StripeObject
|
81
97
|
# City, district, suburb, town, or village.
|
@@ -223,6 +239,18 @@ module Stripe
|
|
223
239
|
@phone = phone
|
224
240
|
end
|
225
241
|
end
|
242
|
+
|
243
|
+
class RelatedPerson < Stripe::RequestParams
|
244
|
+
# A token representing a connected account. If provided, the person parameter is also required and must be associated with the account.
|
245
|
+
attr_accessor :account
|
246
|
+
# A token referencing a Person resource that this verification is being used to verify.
|
247
|
+
attr_accessor :person
|
248
|
+
|
249
|
+
def initialize(account: nil, person: nil)
|
250
|
+
@account = account
|
251
|
+
@person = person
|
252
|
+
end
|
253
|
+
end
|
226
254
|
# 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.
|
227
255
|
attr_accessor :client_reference_id
|
228
256
|
# Specifies which fields in the response should be expanded.
|
@@ -235,6 +263,8 @@ module Stripe
|
|
235
263
|
attr_accessor :provided_details
|
236
264
|
# Customer ID
|
237
265
|
attr_accessor :related_customer
|
266
|
+
# Tokens referencing a Person resource and it's associated account.
|
267
|
+
attr_accessor :related_person
|
238
268
|
# The URL that the user will be redirected to upon completing the verification flow.
|
239
269
|
attr_accessor :return_url
|
240
270
|
# 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`.
|
@@ -249,6 +279,7 @@ module Stripe
|
|
249
279
|
options: nil,
|
250
280
|
provided_details: nil,
|
251
281
|
related_customer: nil,
|
282
|
+
related_person: nil,
|
252
283
|
return_url: nil,
|
253
284
|
type: nil,
|
254
285
|
verification_flow: nil
|
@@ -259,6 +290,7 @@ module Stripe
|
|
259
290
|
@options = options
|
260
291
|
@provided_details = provided_details
|
261
292
|
@related_customer = related_customer
|
293
|
+
@related_person = related_person
|
262
294
|
@return_url = return_url
|
263
295
|
@type = type
|
264
296
|
@verification_flow = verification_flow
|
@@ -371,6 +403,8 @@ module Stripe
|
|
371
403
|
attr_reader :redaction
|
372
404
|
# Customer ID
|
373
405
|
attr_reader :related_customer
|
406
|
+
# Attribute for field related_person
|
407
|
+
attr_reader :related_person
|
374
408
|
# Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
|
375
409
|
attr_reader :status
|
376
410
|
# The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
|
@@ -559,7 +559,7 @@ module Stripe
|
|
559
559
|
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
560
560
|
# One of `month`.
|
561
561
|
attr_accessor :interval
|
562
|
-
# Type of installment plan, one of `fixed_count`.
|
562
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
563
563
|
attr_accessor :type
|
564
564
|
|
565
565
|
def initialize(count: nil, interval: nil, type: nil)
|
@@ -1206,7 +1206,7 @@ module Stripe
|
|
1206
1206
|
# For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
|
1207
1207
|
# One of `month`.
|
1208
1208
|
attr_accessor :interval
|
1209
|
-
# Type of installment plan, one of `fixed_count`.
|
1209
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
1210
1210
|
attr_accessor :type
|
1211
1211
|
|
1212
1212
|
def initialize(count: nil, interval: nil, type: nil)
|
@@ -2546,6 +2546,15 @@ module Stripe
|
|
2546
2546
|
end
|
2547
2547
|
|
2548
2548
|
class ScheduleDetails < Stripe::RequestParams
|
2549
|
+
class BillingMode < Stripe::RequestParams
|
2550
|
+
# Attribute for param field type
|
2551
|
+
attr_accessor :type
|
2552
|
+
|
2553
|
+
def initialize(type: nil)
|
2554
|
+
@type = type
|
2555
|
+
end
|
2556
|
+
end
|
2557
|
+
|
2549
2558
|
class Phase < Stripe::RequestParams
|
2550
2559
|
class AddInvoiceItem < Stripe::RequestParams
|
2551
2560
|
class Discount < Stripe::RequestParams
|
@@ -2899,6 +2908,8 @@ module Stripe
|
|
2899
2908
|
@trial_end = trial_end
|
2900
2909
|
end
|
2901
2910
|
end
|
2911
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2912
|
+
attr_accessor :billing_mode
|
2902
2913
|
# 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.
|
2903
2914
|
attr_accessor :end_behavior
|
2904
2915
|
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
@@ -2906,7 +2917,8 @@ module Stripe
|
|
2906
2917
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
2907
2918
|
attr_accessor :proration_behavior
|
2908
2919
|
|
2909
|
-
def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
|
2920
|
+
def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil)
|
2921
|
+
@billing_mode = billing_mode
|
2910
2922
|
@end_behavior = end_behavior
|
2911
2923
|
@phases = phases
|
2912
2924
|
@proration_behavior = proration_behavior
|
@@ -2914,6 +2926,15 @@ module Stripe
|
|
2914
2926
|
end
|
2915
2927
|
|
2916
2928
|
class SubscriptionDetails < Stripe::RequestParams
|
2929
|
+
class BillingMode < Stripe::RequestParams
|
2930
|
+
# Attribute for param field type
|
2931
|
+
attr_accessor :type
|
2932
|
+
|
2933
|
+
def initialize(type: nil)
|
2934
|
+
@type = type
|
2935
|
+
end
|
2936
|
+
end
|
2937
|
+
|
2917
2938
|
class Item < Stripe::RequestParams
|
2918
2939
|
class BillingThresholds < Stripe::RequestParams
|
2919
2940
|
# 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))
|
@@ -3031,9 +3052,11 @@ module Stripe
|
|
3031
3052
|
end
|
3032
3053
|
# 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`.
|
3033
3054
|
attr_accessor :billing_cycle_anchor
|
3055
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
3056
|
+
attr_accessor :billing_mode
|
3034
3057
|
# 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.
|
3035
3058
|
attr_accessor :cancel_at
|
3036
|
-
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
3059
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
3037
3060
|
attr_accessor :cancel_at_period_end
|
3038
3061
|
# This simulates the subscription being canceled or expired immediately.
|
3039
3062
|
attr_accessor :cancel_now
|
@@ -3054,6 +3077,7 @@ module Stripe
|
|
3054
3077
|
|
3055
3078
|
def initialize(
|
3056
3079
|
billing_cycle_anchor: nil,
|
3080
|
+
billing_mode: nil,
|
3057
3081
|
cancel_at: nil,
|
3058
3082
|
cancel_at_period_end: nil,
|
3059
3083
|
cancel_now: nil,
|
@@ -3066,6 +3090,7 @@ module Stripe
|
|
3066
3090
|
trial_end: nil
|
3067
3091
|
)
|
3068
3092
|
@billing_cycle_anchor = billing_cycle_anchor
|
3093
|
+
@billing_mode = billing_mode
|
3069
3094
|
@cancel_at = cancel_at
|
3070
3095
|
@cancel_at_period_end = cancel_at_period_end
|
3071
3096
|
@cancel_now = cancel_now
|
@@ -2,10 +2,7 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Stripe
|
5
|
-
# Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices).
|
6
|
-
# invoice by creating or updating it with an `invoice` field, at which point it will be included as
|
7
|
-
# [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within
|
8
|
-
# [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).
|
5
|
+
# Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines).
|
9
6
|
#
|
10
7
|
# Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined
|
11
8
|
# with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge
|
@@ -63,6 +63,7 @@ module Stripe
|
|
63
63
|
class Card < Stripe::StripeObject; end
|
64
64
|
class Cashapp < Stripe::StripeObject; end
|
65
65
|
class KakaoPay < Stripe::StripeObject; end
|
66
|
+
class Klarna < Stripe::StripeObject; end
|
66
67
|
class KrCard < Stripe::StripeObject; end
|
67
68
|
class Link < Stripe::StripeObject; end
|
68
69
|
class NaverPay < Stripe::StripeObject; end
|
@@ -102,6 +103,8 @@ module Stripe
|
|
102
103
|
attr_reader :cashapp
|
103
104
|
# Attribute for field kakao_pay
|
104
105
|
attr_reader :kakao_pay
|
106
|
+
# Attribute for field klarna
|
107
|
+
attr_reader :klarna
|
105
108
|
# Attribute for field kr_card
|
106
109
|
attr_reader :kr_card
|
107
110
|
# Attribute for field link
|