stripe 15.3.0.pre.beta.2 → 15.4.0.pre.beta.1
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 +42 -16
- data/OPENAPI_VERSION +1 -1
- data/README.md +13 -49
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +2 -2
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +3 -3
- 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 +93 -93
- 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 +53 -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/dispute.rb +2 -0
- data/lib/stripe/resources/event.rb +1 -1
- data/lib/stripe/resources/identity/verification_session.rb +34 -0
- data/lib/stripe/resources/invoice.rb +21 -3
- data/lib/stripe/resources/invoice_item.rb +1 -4
- data/lib/stripe/resources/mandate.rb +3 -0
- data/lib/stripe/resources/order.rb +154 -2
- data/lib/stripe/resources/payment_attempt_record.rb +30 -17
- data/lib/stripe/resources/payment_intent.rb +331 -12
- data/lib/stripe/resources/payment_method.rb +17 -9
- data/lib/stripe/resources/payment_record.rb +30 -17
- data/lib/stripe/resources/quote.rb +15 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +8 -1
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +285 -3
- data/lib/stripe/resources/subscription.rb +27 -10
- data/lib/stripe/resources/subscription_schedule.rb +17 -1
- 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 +10 -10
- data/lib/stripe/resources/token.rb +1 -1
- data/lib/stripe/resources/treasury/financial_account.rb +5 -1
- data/lib/stripe/resources/v2/core/account.rb +9 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +3 -3
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +1 -1
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +1 -1
- data/lib/stripe/resources/v2/money_management/received_credit.rb +8 -2
- data/lib/stripe/services/account_service.rb +83 -5
- data/lib/stripe/services/account_session_service.rb +62 -62
- data/lib/stripe/services/billing_portal/session_service.rb +1 -1
- data/lib/stripe/services/checkout/session_service.rb +53 -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 +21 -3
- data/lib/stripe/services/order_service.rb +154 -2
- 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 +9 -0
- data/lib/stripe/services/setup_intent_service.rb +275 -2
- data/lib/stripe/services/subscription_schedule_service.rb +9 -0
- data/lib/stripe/services/subscription_service.rb +21 -4
- data/lib/stripe/services/tax/registration_service.rb +13 -0
- data/lib/stripe/services/terminal/reader_service.rb +4 -4
- 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/account_service.rb +47 -15
- data/lib/stripe/services/v2/core/accounts/person_service.rb +9 -10
- data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +4 -5
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +2 -2
- data/lib/stripe/services/v2/core_service.rb +2 -2
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +13 -12
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +36 -36
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +44 -45
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +10 -10
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +41 -41
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +1 -2
- data/lib/stripe/services/v2/money_management_service.rb +4 -4
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +9 -10
- data/lib/stripe/services/v2_services.rb +3 -3
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -1
- data/rbi/stripe.rbi +14445 -12226
- metadata +3 -2
@@ -229,6 +229,13 @@ module Stripe
|
|
229
229
|
|
230
230
|
class CardPresent < Stripe::StripeObject; end
|
231
231
|
|
232
|
+
class Klarna < Stripe::StripeObject
|
233
|
+
# The currency of the setup intent. Three letter ISO currency code.
|
234
|
+
attr_reader :currency
|
235
|
+
# Preferred locale of the Klarna checkout page that the customer is redirected to.
|
236
|
+
attr_reader :preferred_locale
|
237
|
+
end
|
238
|
+
|
232
239
|
class Link < Stripe::StripeObject
|
233
240
|
# [Deprecated] This is a legacy parameter that no longer has any function.
|
234
241
|
attr_reader :persistent_token
|
@@ -319,6 +326,8 @@ module Stripe
|
|
319
326
|
attr_reader :card
|
320
327
|
# Attribute for field card_present
|
321
328
|
attr_reader :card_present
|
329
|
+
# Attribute for field klarna
|
330
|
+
attr_reader :klarna
|
322
331
|
# Attribute for field link
|
323
332
|
attr_reader :link
|
324
333
|
# Attribute for field paypal
|
@@ -559,6 +568,7 @@ module Stripe
|
|
559
568
|
end
|
560
569
|
|
561
570
|
class Cashapp < Stripe::RequestParams; end
|
571
|
+
class Crypto < Stripe::RequestParams; end
|
562
572
|
class CustomerBalance < Stripe::RequestParams; end
|
563
573
|
|
564
574
|
class Eps < Stripe::RequestParams
|
@@ -842,6 +852,8 @@ module Stripe
|
|
842
852
|
attr_accessor :boleto
|
843
853
|
# If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
|
844
854
|
attr_accessor :cashapp
|
855
|
+
# If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
|
856
|
+
attr_accessor :crypto
|
845
857
|
# If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
|
846
858
|
attr_accessor :customer_balance
|
847
859
|
# If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
|
@@ -949,6 +961,7 @@ module Stripe
|
|
949
961
|
blik: nil,
|
950
962
|
boleto: nil,
|
951
963
|
cashapp: nil,
|
964
|
+
crypto: nil,
|
952
965
|
customer_balance: nil,
|
953
966
|
eps: nil,
|
954
967
|
fpx: nil,
|
@@ -1010,6 +1023,7 @@ module Stripe
|
|
1010
1023
|
@blik = blik
|
1011
1024
|
@boleto = boleto
|
1012
1025
|
@cashapp = cashapp
|
1026
|
+
@crypto = crypto
|
1013
1027
|
@customer_balance = customer_balance
|
1014
1028
|
@eps = eps
|
1015
1029
|
@fpx = fpx
|
@@ -1270,6 +1284,88 @@ module Stripe
|
|
1270
1284
|
|
1271
1285
|
class CardPresent < Stripe::RequestParams; end
|
1272
1286
|
|
1287
|
+
class Klarna < Stripe::RequestParams
|
1288
|
+
class OnDemand < Stripe::RequestParams
|
1289
|
+
# Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
|
1290
|
+
attr_accessor :average_amount
|
1291
|
+
# The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
|
1292
|
+
attr_accessor :maximum_amount
|
1293
|
+
# The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
|
1294
|
+
attr_accessor :minimum_amount
|
1295
|
+
# Interval at which the customer is making purchases
|
1296
|
+
attr_accessor :purchase_interval
|
1297
|
+
# The number of `purchase_interval` between charges
|
1298
|
+
attr_accessor :purchase_interval_count
|
1299
|
+
|
1300
|
+
def initialize(
|
1301
|
+
average_amount: nil,
|
1302
|
+
maximum_amount: nil,
|
1303
|
+
minimum_amount: nil,
|
1304
|
+
purchase_interval: nil,
|
1305
|
+
purchase_interval_count: nil
|
1306
|
+
)
|
1307
|
+
@average_amount = average_amount
|
1308
|
+
@maximum_amount = maximum_amount
|
1309
|
+
@minimum_amount = minimum_amount
|
1310
|
+
@purchase_interval = purchase_interval
|
1311
|
+
@purchase_interval_count = purchase_interval_count
|
1312
|
+
end
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
class Subscription < Stripe::RequestParams
|
1316
|
+
class NextBilling < Stripe::RequestParams
|
1317
|
+
# The amount of the next charge for the subscription.
|
1318
|
+
attr_accessor :amount
|
1319
|
+
# The date of the next charge for the subscription in YYYY-MM-DD format.
|
1320
|
+
attr_accessor :date
|
1321
|
+
|
1322
|
+
def initialize(amount: nil, date: nil)
|
1323
|
+
@amount = amount
|
1324
|
+
@date = date
|
1325
|
+
end
|
1326
|
+
end
|
1327
|
+
# Unit of time between subscription charges.
|
1328
|
+
attr_accessor :interval
|
1329
|
+
# The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
|
1330
|
+
attr_accessor :interval_count
|
1331
|
+
# Name for subscription.
|
1332
|
+
attr_accessor :name
|
1333
|
+
# Describes the upcoming charge for this subscription.
|
1334
|
+
attr_accessor :next_billing
|
1335
|
+
# A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
|
1336
|
+
attr_accessor :reference
|
1337
|
+
|
1338
|
+
def initialize(
|
1339
|
+
interval: nil,
|
1340
|
+
interval_count: nil,
|
1341
|
+
name: nil,
|
1342
|
+
next_billing: nil,
|
1343
|
+
reference: nil
|
1344
|
+
)
|
1345
|
+
@interval = interval
|
1346
|
+
@interval_count = interval_count
|
1347
|
+
@name = name
|
1348
|
+
@next_billing = next_billing
|
1349
|
+
@reference = reference
|
1350
|
+
end
|
1351
|
+
end
|
1352
|
+
# The currency of the SetupIntent. Three letter ISO currency code.
|
1353
|
+
attr_accessor :currency
|
1354
|
+
# On-demand details if setting up a payment method for on-demand payments.
|
1355
|
+
attr_accessor :on_demand
|
1356
|
+
# Preferred language of the Klarna authorization page that the customer is redirected to
|
1357
|
+
attr_accessor :preferred_locale
|
1358
|
+
# Subscription details if setting up or charging a subscription
|
1359
|
+
attr_accessor :subscriptions
|
1360
|
+
|
1361
|
+
def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil)
|
1362
|
+
@currency = currency
|
1363
|
+
@on_demand = on_demand
|
1364
|
+
@preferred_locale = preferred_locale
|
1365
|
+
@subscriptions = subscriptions
|
1366
|
+
end
|
1367
|
+
end
|
1368
|
+
|
1273
1369
|
class Link < Stripe::RequestParams
|
1274
1370
|
# [Deprecated] This is a legacy parameter that no longer has any function.
|
1275
1371
|
attr_accessor :persistent_token
|
@@ -1450,6 +1546,8 @@ module Stripe
|
|
1450
1546
|
attr_accessor :card
|
1451
1547
|
# If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
|
1452
1548
|
attr_accessor :card_present
|
1549
|
+
# If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
|
1550
|
+
attr_accessor :klarna
|
1453
1551
|
# If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
|
1454
1552
|
attr_accessor :link
|
1455
1553
|
# If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
|
@@ -1467,6 +1565,7 @@ module Stripe
|
|
1467
1565
|
bacs_debit: nil,
|
1468
1566
|
card: nil,
|
1469
1567
|
card_present: nil,
|
1568
|
+
klarna: nil,
|
1470
1569
|
link: nil,
|
1471
1570
|
paypal: nil,
|
1472
1571
|
payto: nil,
|
@@ -1478,6 +1577,7 @@ module Stripe
|
|
1478
1577
|
@bacs_debit = bacs_debit
|
1479
1578
|
@card = card
|
1480
1579
|
@card_present = card_present
|
1580
|
+
@klarna = klarna
|
1481
1581
|
@link = link
|
1482
1582
|
@paypal = paypal
|
1483
1583
|
@payto = payto
|
@@ -1540,7 +1640,7 @@ module Stripe
|
|
1540
1640
|
attr_accessor :payment_method_data
|
1541
1641
|
# Payment method-specific configuration for this SetupIntent.
|
1542
1642
|
attr_accessor :payment_method_options
|
1543
|
-
# The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
|
1643
|
+
# The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
|
1544
1644
|
attr_accessor :payment_method_types
|
1545
1645
|
# The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
|
1546
1646
|
attr_accessor :return_url
|
@@ -1713,6 +1813,7 @@ module Stripe
|
|
1713
1813
|
end
|
1714
1814
|
|
1715
1815
|
class Cashapp < Stripe::RequestParams; end
|
1816
|
+
class Crypto < Stripe::RequestParams; end
|
1716
1817
|
class CustomerBalance < Stripe::RequestParams; end
|
1717
1818
|
|
1718
1819
|
class Eps < Stripe::RequestParams
|
@@ -1996,6 +2097,8 @@ module Stripe
|
|
1996
2097
|
attr_accessor :boleto
|
1997
2098
|
# If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
|
1998
2099
|
attr_accessor :cashapp
|
2100
|
+
# If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
|
2101
|
+
attr_accessor :crypto
|
1999
2102
|
# If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
|
2000
2103
|
attr_accessor :customer_balance
|
2001
2104
|
# If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
|
@@ -2103,6 +2206,7 @@ module Stripe
|
|
2103
2206
|
blik: nil,
|
2104
2207
|
boleto: nil,
|
2105
2208
|
cashapp: nil,
|
2209
|
+
crypto: nil,
|
2106
2210
|
customer_balance: nil,
|
2107
2211
|
eps: nil,
|
2108
2212
|
fpx: nil,
|
@@ -2164,6 +2268,7 @@ module Stripe
|
|
2164
2268
|
@blik = blik
|
2165
2269
|
@boleto = boleto
|
2166
2270
|
@cashapp = cashapp
|
2271
|
+
@crypto = crypto
|
2167
2272
|
@customer_balance = customer_balance
|
2168
2273
|
@eps = eps
|
2169
2274
|
@fpx = fpx
|
@@ -2424,6 +2529,88 @@ module Stripe
|
|
2424
2529
|
|
2425
2530
|
class CardPresent < Stripe::RequestParams; end
|
2426
2531
|
|
2532
|
+
class Klarna < Stripe::RequestParams
|
2533
|
+
class OnDemand < Stripe::RequestParams
|
2534
|
+
# Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
|
2535
|
+
attr_accessor :average_amount
|
2536
|
+
# The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
|
2537
|
+
attr_accessor :maximum_amount
|
2538
|
+
# The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
|
2539
|
+
attr_accessor :minimum_amount
|
2540
|
+
# Interval at which the customer is making purchases
|
2541
|
+
attr_accessor :purchase_interval
|
2542
|
+
# The number of `purchase_interval` between charges
|
2543
|
+
attr_accessor :purchase_interval_count
|
2544
|
+
|
2545
|
+
def initialize(
|
2546
|
+
average_amount: nil,
|
2547
|
+
maximum_amount: nil,
|
2548
|
+
minimum_amount: nil,
|
2549
|
+
purchase_interval: nil,
|
2550
|
+
purchase_interval_count: nil
|
2551
|
+
)
|
2552
|
+
@average_amount = average_amount
|
2553
|
+
@maximum_amount = maximum_amount
|
2554
|
+
@minimum_amount = minimum_amount
|
2555
|
+
@purchase_interval = purchase_interval
|
2556
|
+
@purchase_interval_count = purchase_interval_count
|
2557
|
+
end
|
2558
|
+
end
|
2559
|
+
|
2560
|
+
class Subscription < Stripe::RequestParams
|
2561
|
+
class NextBilling < Stripe::RequestParams
|
2562
|
+
# The amount of the next charge for the subscription.
|
2563
|
+
attr_accessor :amount
|
2564
|
+
# The date of the next charge for the subscription in YYYY-MM-DD format.
|
2565
|
+
attr_accessor :date
|
2566
|
+
|
2567
|
+
def initialize(amount: nil, date: nil)
|
2568
|
+
@amount = amount
|
2569
|
+
@date = date
|
2570
|
+
end
|
2571
|
+
end
|
2572
|
+
# Unit of time between subscription charges.
|
2573
|
+
attr_accessor :interval
|
2574
|
+
# The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
|
2575
|
+
attr_accessor :interval_count
|
2576
|
+
# Name for subscription.
|
2577
|
+
attr_accessor :name
|
2578
|
+
# Describes the upcoming charge for this subscription.
|
2579
|
+
attr_accessor :next_billing
|
2580
|
+
# A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
|
2581
|
+
attr_accessor :reference
|
2582
|
+
|
2583
|
+
def initialize(
|
2584
|
+
interval: nil,
|
2585
|
+
interval_count: nil,
|
2586
|
+
name: nil,
|
2587
|
+
next_billing: nil,
|
2588
|
+
reference: nil
|
2589
|
+
)
|
2590
|
+
@interval = interval
|
2591
|
+
@interval_count = interval_count
|
2592
|
+
@name = name
|
2593
|
+
@next_billing = next_billing
|
2594
|
+
@reference = reference
|
2595
|
+
end
|
2596
|
+
end
|
2597
|
+
# The currency of the SetupIntent. Three letter ISO currency code.
|
2598
|
+
attr_accessor :currency
|
2599
|
+
# On-demand details if setting up a payment method for on-demand payments.
|
2600
|
+
attr_accessor :on_demand
|
2601
|
+
# Preferred language of the Klarna authorization page that the customer is redirected to
|
2602
|
+
attr_accessor :preferred_locale
|
2603
|
+
# Subscription details if setting up or charging a subscription
|
2604
|
+
attr_accessor :subscriptions
|
2605
|
+
|
2606
|
+
def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil)
|
2607
|
+
@currency = currency
|
2608
|
+
@on_demand = on_demand
|
2609
|
+
@preferred_locale = preferred_locale
|
2610
|
+
@subscriptions = subscriptions
|
2611
|
+
end
|
2612
|
+
end
|
2613
|
+
|
2427
2614
|
class Link < Stripe::RequestParams
|
2428
2615
|
# [Deprecated] This is a legacy parameter that no longer has any function.
|
2429
2616
|
attr_accessor :persistent_token
|
@@ -2604,6 +2791,8 @@ module Stripe
|
|
2604
2791
|
attr_accessor :card
|
2605
2792
|
# If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
|
2606
2793
|
attr_accessor :card_present
|
2794
|
+
# If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
|
2795
|
+
attr_accessor :klarna
|
2607
2796
|
# If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
|
2608
2797
|
attr_accessor :link
|
2609
2798
|
# If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
|
@@ -2621,6 +2810,7 @@ module Stripe
|
|
2621
2810
|
bacs_debit: nil,
|
2622
2811
|
card: nil,
|
2623
2812
|
card_present: nil,
|
2813
|
+
klarna: nil,
|
2624
2814
|
link: nil,
|
2625
2815
|
paypal: nil,
|
2626
2816
|
payto: nil,
|
@@ -2632,6 +2822,7 @@ module Stripe
|
|
2632
2822
|
@bacs_debit = bacs_debit
|
2633
2823
|
@card = card
|
2634
2824
|
@card_present = card_present
|
2825
|
+
@klarna = klarna
|
2635
2826
|
@link = link
|
2636
2827
|
@paypal = paypal
|
2637
2828
|
@payto = payto
|
@@ -2670,7 +2861,7 @@ module Stripe
|
|
2670
2861
|
attr_accessor :payment_method_data
|
2671
2862
|
# Payment method-specific configuration for this SetupIntent.
|
2672
2863
|
attr_accessor :payment_method_options
|
2673
|
-
# The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
|
2864
|
+
# The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
|
2674
2865
|
attr_accessor :payment_method_types
|
2675
2866
|
|
2676
2867
|
def initialize(
|
@@ -2866,6 +3057,7 @@ module Stripe
|
|
2866
3057
|
end
|
2867
3058
|
|
2868
3059
|
class Cashapp < Stripe::RequestParams; end
|
3060
|
+
class Crypto < Stripe::RequestParams; end
|
2869
3061
|
class CustomerBalance < Stripe::RequestParams; end
|
2870
3062
|
|
2871
3063
|
class Eps < Stripe::RequestParams
|
@@ -3149,6 +3341,8 @@ module Stripe
|
|
3149
3341
|
attr_accessor :boleto
|
3150
3342
|
# If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
|
3151
3343
|
attr_accessor :cashapp
|
3344
|
+
# If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
|
3345
|
+
attr_accessor :crypto
|
3152
3346
|
# If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
|
3153
3347
|
attr_accessor :customer_balance
|
3154
3348
|
# If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
|
@@ -3256,6 +3450,7 @@ module Stripe
|
|
3256
3450
|
blik: nil,
|
3257
3451
|
boleto: nil,
|
3258
3452
|
cashapp: nil,
|
3453
|
+
crypto: nil,
|
3259
3454
|
customer_balance: nil,
|
3260
3455
|
eps: nil,
|
3261
3456
|
fpx: nil,
|
@@ -3317,6 +3512,7 @@ module Stripe
|
|
3317
3512
|
@blik = blik
|
3318
3513
|
@boleto = boleto
|
3319
3514
|
@cashapp = cashapp
|
3515
|
+
@crypto = crypto
|
3320
3516
|
@customer_balance = customer_balance
|
3321
3517
|
@eps = eps
|
3322
3518
|
@fpx = fpx
|
@@ -3577,6 +3773,88 @@ module Stripe
|
|
3577
3773
|
|
3578
3774
|
class CardPresent < Stripe::RequestParams; end
|
3579
3775
|
|
3776
|
+
class Klarna < Stripe::RequestParams
|
3777
|
+
class OnDemand < Stripe::RequestParams
|
3778
|
+
# Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
|
3779
|
+
attr_accessor :average_amount
|
3780
|
+
# The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
|
3781
|
+
attr_accessor :maximum_amount
|
3782
|
+
# The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
|
3783
|
+
attr_accessor :minimum_amount
|
3784
|
+
# Interval at which the customer is making purchases
|
3785
|
+
attr_accessor :purchase_interval
|
3786
|
+
# The number of `purchase_interval` between charges
|
3787
|
+
attr_accessor :purchase_interval_count
|
3788
|
+
|
3789
|
+
def initialize(
|
3790
|
+
average_amount: nil,
|
3791
|
+
maximum_amount: nil,
|
3792
|
+
minimum_amount: nil,
|
3793
|
+
purchase_interval: nil,
|
3794
|
+
purchase_interval_count: nil
|
3795
|
+
)
|
3796
|
+
@average_amount = average_amount
|
3797
|
+
@maximum_amount = maximum_amount
|
3798
|
+
@minimum_amount = minimum_amount
|
3799
|
+
@purchase_interval = purchase_interval
|
3800
|
+
@purchase_interval_count = purchase_interval_count
|
3801
|
+
end
|
3802
|
+
end
|
3803
|
+
|
3804
|
+
class Subscription < Stripe::RequestParams
|
3805
|
+
class NextBilling < Stripe::RequestParams
|
3806
|
+
# The amount of the next charge for the subscription.
|
3807
|
+
attr_accessor :amount
|
3808
|
+
# The date of the next charge for the subscription in YYYY-MM-DD format.
|
3809
|
+
attr_accessor :date
|
3810
|
+
|
3811
|
+
def initialize(amount: nil, date: nil)
|
3812
|
+
@amount = amount
|
3813
|
+
@date = date
|
3814
|
+
end
|
3815
|
+
end
|
3816
|
+
# Unit of time between subscription charges.
|
3817
|
+
attr_accessor :interval
|
3818
|
+
# The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
|
3819
|
+
attr_accessor :interval_count
|
3820
|
+
# Name for subscription.
|
3821
|
+
attr_accessor :name
|
3822
|
+
# Describes the upcoming charge for this subscription.
|
3823
|
+
attr_accessor :next_billing
|
3824
|
+
# A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
|
3825
|
+
attr_accessor :reference
|
3826
|
+
|
3827
|
+
def initialize(
|
3828
|
+
interval: nil,
|
3829
|
+
interval_count: nil,
|
3830
|
+
name: nil,
|
3831
|
+
next_billing: nil,
|
3832
|
+
reference: nil
|
3833
|
+
)
|
3834
|
+
@interval = interval
|
3835
|
+
@interval_count = interval_count
|
3836
|
+
@name = name
|
3837
|
+
@next_billing = next_billing
|
3838
|
+
@reference = reference
|
3839
|
+
end
|
3840
|
+
end
|
3841
|
+
# The currency of the SetupIntent. Three letter ISO currency code.
|
3842
|
+
attr_accessor :currency
|
3843
|
+
# On-demand details if setting up a payment method for on-demand payments.
|
3844
|
+
attr_accessor :on_demand
|
3845
|
+
# Preferred language of the Klarna authorization page that the customer is redirected to
|
3846
|
+
attr_accessor :preferred_locale
|
3847
|
+
# Subscription details if setting up or charging a subscription
|
3848
|
+
attr_accessor :subscriptions
|
3849
|
+
|
3850
|
+
def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil)
|
3851
|
+
@currency = currency
|
3852
|
+
@on_demand = on_demand
|
3853
|
+
@preferred_locale = preferred_locale
|
3854
|
+
@subscriptions = subscriptions
|
3855
|
+
end
|
3856
|
+
end
|
3857
|
+
|
3580
3858
|
class Link < Stripe::RequestParams
|
3581
3859
|
# [Deprecated] This is a legacy parameter that no longer has any function.
|
3582
3860
|
attr_accessor :persistent_token
|
@@ -3757,6 +4035,8 @@ module Stripe
|
|
3757
4035
|
attr_accessor :card
|
3758
4036
|
# If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
|
3759
4037
|
attr_accessor :card_present
|
4038
|
+
# If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
|
4039
|
+
attr_accessor :klarna
|
3760
4040
|
# If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
|
3761
4041
|
attr_accessor :link
|
3762
4042
|
# If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
|
@@ -3774,6 +4054,7 @@ module Stripe
|
|
3774
4054
|
bacs_debit: nil,
|
3775
4055
|
card: nil,
|
3776
4056
|
card_present: nil,
|
4057
|
+
klarna: nil,
|
3777
4058
|
link: nil,
|
3778
4059
|
paypal: nil,
|
3779
4060
|
payto: nil,
|
@@ -3785,6 +4066,7 @@ module Stripe
|
|
3785
4066
|
@bacs_debit = bacs_debit
|
3786
4067
|
@card = card
|
3787
4068
|
@card_present = card_present
|
4069
|
+
@klarna = klarna
|
3788
4070
|
@link = link
|
3789
4071
|
@paypal = paypal
|
3790
4072
|
@payto = payto
|
@@ -3903,7 +4185,7 @@ module Stripe
|
|
3903
4185
|
attr_reader :payment_method_configuration_details
|
3904
4186
|
# Payment method-specific configuration for this SetupIntent.
|
3905
4187
|
attr_reader :payment_method_options
|
3906
|
-
# The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
|
4188
|
+
# The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
|
3907
4189
|
attr_reader :payment_method_types
|
3908
4190
|
# ID of the single_use Mandate generated by the SetupIntent.
|
3909
4191
|
attr_reader :single_use_mandate
|
@@ -44,7 +44,9 @@ module Stripe
|
|
44
44
|
attr_reader :second
|
45
45
|
end
|
46
46
|
|
47
|
-
class
|
47
|
+
class BillingMode < Stripe::StripeObject
|
48
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
49
|
+
attr_reader :type
|
48
50
|
# Details on when the current billing_mode was adopted.
|
49
51
|
attr_reader :updated_at
|
50
52
|
end
|
@@ -889,7 +891,7 @@ module Stripe
|
|
889
891
|
attr_accessor :billing_thresholds
|
890
892
|
# 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.
|
891
893
|
attr_accessor :cancel_at
|
892
|
-
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
894
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
893
895
|
attr_accessor :cancel_at_period_end
|
894
896
|
# Details about why this subscription was cancelled
|
895
897
|
attr_accessor :cancellation_details
|
@@ -1283,6 +1285,15 @@ module Stripe
|
|
1283
1285
|
end
|
1284
1286
|
end
|
1285
1287
|
|
1288
|
+
class BillingMode < Stripe::RequestParams
|
1289
|
+
# Attribute for param field type
|
1290
|
+
attr_accessor :type
|
1291
|
+
|
1292
|
+
def initialize(type: nil)
|
1293
|
+
@type = type
|
1294
|
+
end
|
1295
|
+
end
|
1296
|
+
|
1286
1297
|
class BillingThresholds < Stripe::RequestParams
|
1287
1298
|
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1288
1299
|
attr_accessor :amount_gte
|
@@ -1751,9 +1762,9 @@ module Stripe
|
|
1751
1762
|
attr_accessor :add_invoice_items
|
1752
1763
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
1753
1764
|
attr_accessor :application_fee_percent
|
1754
|
-
# Automatic tax settings for this subscription.
|
1765
|
+
# Automatic tax settings for this subscription.
|
1755
1766
|
attr_accessor :automatic_tax
|
1756
|
-
#
|
1767
|
+
# A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
|
1757
1768
|
attr_accessor :backdate_start_date
|
1758
1769
|
# A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
|
1759
1770
|
attr_accessor :billing_cycle_anchor
|
@@ -1765,7 +1776,7 @@ module Stripe
|
|
1765
1776
|
attr_accessor :billing_thresholds
|
1766
1777
|
# 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.
|
1767
1778
|
attr_accessor :cancel_at
|
1768
|
-
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
1779
|
+
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
1769
1780
|
attr_accessor :cancel_at_period_end
|
1770
1781
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
1771
1782
|
attr_accessor :collection_method
|
@@ -1926,6 +1937,14 @@ module Stripe
|
|
1926
1937
|
end
|
1927
1938
|
|
1928
1939
|
class MigrateParams < Stripe::RequestParams
|
1940
|
+
class BillingMode < Stripe::RequestParams
|
1941
|
+
# Attribute for param field type
|
1942
|
+
attr_accessor :type
|
1943
|
+
|
1944
|
+
def initialize(type: nil)
|
1945
|
+
@type = type
|
1946
|
+
end
|
1947
|
+
end
|
1929
1948
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
1930
1949
|
attr_accessor :billing_mode
|
1931
1950
|
# Specifies which fields in the response should be expanded.
|
@@ -1969,15 +1988,13 @@ module Stripe
|
|
1969
1988
|
attr_reader :billing_cycle_anchor
|
1970
1989
|
# The fixed values used to calculate the `billing_cycle_anchor`.
|
1971
1990
|
attr_reader :billing_cycle_anchor_config
|
1972
|
-
#
|
1991
|
+
# The billing mode of the subscription.
|
1973
1992
|
attr_reader :billing_mode
|
1974
|
-
# Details about when the current billing_mode was updated.
|
1975
|
-
attr_reader :billing_mode_details
|
1976
1993
|
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
1977
1994
|
attr_reader :billing_thresholds
|
1978
1995
|
# A date in the future at which the subscription will automatically get canceled
|
1979
1996
|
attr_reader :cancel_at
|
1980
|
-
# Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
|
1997
|
+
# Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
|
1981
1998
|
attr_reader :cancel_at_period_end
|
1982
1999
|
# If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
|
1983
2000
|
attr_reader :canceled_at
|
@@ -2063,7 +2080,7 @@ module Stripe
|
|
2063
2080
|
attr_reader :trial_end
|
2064
2081
|
# Settings related to subscription trials.
|
2065
2082
|
attr_reader :trial_settings
|
2066
|
-
# If the subscription has a trial, the beginning of that trial.
|
2083
|
+
# If the subscription has a trial, the beginning of that trial.
|
2067
2084
|
attr_reader :trial_start
|
2068
2085
|
|
2069
2086
|
# Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata).
|
@@ -15,6 +15,13 @@ module Stripe
|
|
15
15
|
"subscription_schedule"
|
16
16
|
end
|
17
17
|
|
18
|
+
class BillingMode < Stripe::StripeObject
|
19
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
20
|
+
attr_reader :type
|
21
|
+
# Details on when the current billing_mode was adopted.
|
22
|
+
attr_reader :updated_at
|
23
|
+
end
|
24
|
+
|
18
25
|
class CurrentPhase < Stripe::StripeObject
|
19
26
|
# The end of this phase of the subscription schedule.
|
20
27
|
attr_reader :end_date
|
@@ -434,6 +441,15 @@ module Stripe
|
|
434
441
|
end
|
435
442
|
|
436
443
|
class CreateParams < Stripe::RequestParams
|
444
|
+
class BillingMode < Stripe::RequestParams
|
445
|
+
# Attribute for param field type
|
446
|
+
attr_accessor :type
|
447
|
+
|
448
|
+
def initialize(type: nil)
|
449
|
+
@type = type
|
450
|
+
end
|
451
|
+
end
|
452
|
+
|
437
453
|
class DefaultSettings < Stripe::RequestParams
|
438
454
|
class AutomaticTax < Stripe::RequestParams
|
439
455
|
class Liability < Stripe::RequestParams
|
@@ -2351,7 +2367,7 @@ module Stripe
|
|
2351
2367
|
attr_reader :application
|
2352
2368
|
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
2353
2369
|
attr_reader :billing_behavior
|
2354
|
-
# The
|
2370
|
+
# The billing mode of the subscription.
|
2355
2371
|
attr_reader :billing_mode
|
2356
2372
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
2357
2373
|
attr_reader :canceled_at
|
@@ -637,6 +637,11 @@ module Stripe
|
|
637
637
|
attr_reader :type
|
638
638
|
end
|
639
639
|
|
640
|
+
class Ua < Stripe::StripeObject
|
641
|
+
# Type of registration in `country`.
|
642
|
+
attr_reader :type
|
643
|
+
end
|
644
|
+
|
640
645
|
class Ug < Stripe::StripeObject
|
641
646
|
# Type of registration in `country`.
|
642
647
|
attr_reader :type
|
@@ -884,6 +889,8 @@ module Stripe
|
|
884
889
|
attr_reader :tr
|
885
890
|
# Attribute for field tz
|
886
891
|
attr_reader :tz
|
892
|
+
# Attribute for field ua
|
893
|
+
attr_reader :ua
|
887
894
|
# Attribute for field ug
|
888
895
|
attr_reader :ug
|
889
896
|
# Attribute for field us
|
@@ -2049,6 +2056,15 @@ module Stripe
|
|
2049
2056
|
end
|
2050
2057
|
end
|
2051
2058
|
|
2059
|
+
class Ua < Stripe::RequestParams
|
2060
|
+
# Type of registration to be created in `country`.
|
2061
|
+
attr_accessor :type
|
2062
|
+
|
2063
|
+
def initialize(type: nil)
|
2064
|
+
@type = type
|
2065
|
+
end
|
2066
|
+
end
|
2067
|
+
|
2052
2068
|
class Ug < Stripe::RequestParams
|
2053
2069
|
# Type of registration to be created in `country`.
|
2054
2070
|
attr_accessor :type
|
@@ -2355,6 +2371,8 @@ module Stripe
|
|
2355
2371
|
attr_accessor :tr
|
2356
2372
|
# Options for the registration in TZ.
|
2357
2373
|
attr_accessor :tz
|
2374
|
+
# Options for the registration in UA.
|
2375
|
+
attr_accessor :ua
|
2358
2376
|
# Options for the registration in UG.
|
2359
2377
|
attr_accessor :ug
|
2360
2378
|
# Options for the registration in US.
|
@@ -2463,6 +2481,7 @@ module Stripe
|
|
2463
2481
|
tj: nil,
|
2464
2482
|
tr: nil,
|
2465
2483
|
tz: nil,
|
2484
|
+
ua: nil,
|
2466
2485
|
ug: nil,
|
2467
2486
|
us: nil,
|
2468
2487
|
uy: nil,
|
@@ -2562,6 +2581,7 @@ module Stripe
|
|
2562
2581
|
@tj = tj
|
2563
2582
|
@tr = tr
|
2564
2583
|
@tz = tz
|
2584
|
+
@ua = ua
|
2565
2585
|
@ug = ug
|
2566
2586
|
@us = us
|
2567
2587
|
@uy = uy
|