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
@@ -466,12 +466,78 @@ module Stripe
|
|
466
466
|
end
|
467
467
|
|
468
468
|
class Klarna < Stripe::RequestParams
|
469
|
+
class OnDemand < Stripe::RequestParams
|
470
|
+
# Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
|
471
|
+
attr_accessor :average_amount
|
472
|
+
# 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.
|
473
|
+
attr_accessor :maximum_amount
|
474
|
+
# 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.
|
475
|
+
attr_accessor :minimum_amount
|
476
|
+
# Interval at which the customer is making purchases
|
477
|
+
attr_accessor :purchase_interval
|
478
|
+
# The number of `purchase_interval` between charges
|
479
|
+
attr_accessor :purchase_interval_count
|
480
|
+
|
481
|
+
def initialize(
|
482
|
+
average_amount: nil,
|
483
|
+
maximum_amount: nil,
|
484
|
+
minimum_amount: nil,
|
485
|
+
purchase_interval: nil,
|
486
|
+
purchase_interval_count: nil
|
487
|
+
)
|
488
|
+
@average_amount = average_amount
|
489
|
+
@maximum_amount = maximum_amount
|
490
|
+
@minimum_amount = minimum_amount
|
491
|
+
@purchase_interval = purchase_interval
|
492
|
+
@purchase_interval_count = purchase_interval_count
|
493
|
+
end
|
494
|
+
end
|
495
|
+
|
496
|
+
class Subscription < Stripe::RequestParams
|
497
|
+
class NextBilling < Stripe::RequestParams
|
498
|
+
# The amount of the next charge for the subscription.
|
499
|
+
attr_accessor :amount
|
500
|
+
# The date of the next charge for the subscription in YYYY-MM-DD format.
|
501
|
+
attr_accessor :date
|
502
|
+
|
503
|
+
def initialize(amount: nil, date: nil)
|
504
|
+
@amount = amount
|
505
|
+
@date = date
|
506
|
+
end
|
507
|
+
end
|
508
|
+
# Unit of time between subscription charges.
|
509
|
+
attr_accessor :interval
|
510
|
+
# The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
|
511
|
+
attr_accessor :interval_count
|
512
|
+
# Name for subscription.
|
513
|
+
attr_accessor :name
|
514
|
+
# Describes the upcoming charge for this subscription.
|
515
|
+
attr_accessor :next_billing
|
516
|
+
# A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
|
517
|
+
attr_accessor :reference
|
518
|
+
|
519
|
+
def initialize(
|
520
|
+
interval: nil,
|
521
|
+
interval_count: nil,
|
522
|
+
name: nil,
|
523
|
+
next_billing: nil,
|
524
|
+
reference: nil
|
525
|
+
)
|
526
|
+
@interval = interval
|
527
|
+
@interval_count = interval_count
|
528
|
+
@name = name
|
529
|
+
@next_billing = next_billing
|
530
|
+
@reference = reference
|
531
|
+
end
|
532
|
+
end
|
469
533
|
# Controls when the funds are captured from the customer's account.
|
470
534
|
#
|
471
535
|
# If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
|
472
536
|
#
|
473
537
|
# If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
|
474
538
|
attr_accessor :capture_method
|
539
|
+
# On-demand details if setting up or charging an on-demand payment.
|
540
|
+
attr_accessor :on_demand
|
475
541
|
# Preferred language of the Klarna authorization page that the customer is redirected to
|
476
542
|
attr_accessor :preferred_locale
|
477
543
|
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
@@ -484,11 +550,21 @@ module Stripe
|
|
484
550
|
#
|
485
551
|
# If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
|
486
552
|
attr_accessor :setup_future_usage
|
553
|
+
# Subscription details if setting up or charging a subscription.
|
554
|
+
attr_accessor :subscriptions
|
487
555
|
|
488
|
-
def initialize(
|
556
|
+
def initialize(
|
557
|
+
capture_method: nil,
|
558
|
+
on_demand: nil,
|
559
|
+
preferred_locale: nil,
|
560
|
+
setup_future_usage: nil,
|
561
|
+
subscriptions: nil
|
562
|
+
)
|
489
563
|
@capture_method = capture_method
|
564
|
+
@on_demand = on_demand
|
490
565
|
@preferred_locale = preferred_locale
|
491
566
|
@setup_future_usage = setup_future_usage
|
567
|
+
@subscriptions = subscriptions
|
492
568
|
end
|
493
569
|
end
|
494
570
|
|
@@ -1523,12 +1599,78 @@ module Stripe
|
|
1523
1599
|
end
|
1524
1600
|
|
1525
1601
|
class Klarna < Stripe::RequestParams
|
1602
|
+
class OnDemand < Stripe::RequestParams
|
1603
|
+
# Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
|
1604
|
+
attr_accessor :average_amount
|
1605
|
+
# 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.
|
1606
|
+
attr_accessor :maximum_amount
|
1607
|
+
# 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.
|
1608
|
+
attr_accessor :minimum_amount
|
1609
|
+
# Interval at which the customer is making purchases
|
1610
|
+
attr_accessor :purchase_interval
|
1611
|
+
# The number of `purchase_interval` between charges
|
1612
|
+
attr_accessor :purchase_interval_count
|
1613
|
+
|
1614
|
+
def initialize(
|
1615
|
+
average_amount: nil,
|
1616
|
+
maximum_amount: nil,
|
1617
|
+
minimum_amount: nil,
|
1618
|
+
purchase_interval: nil,
|
1619
|
+
purchase_interval_count: nil
|
1620
|
+
)
|
1621
|
+
@average_amount = average_amount
|
1622
|
+
@maximum_amount = maximum_amount
|
1623
|
+
@minimum_amount = minimum_amount
|
1624
|
+
@purchase_interval = purchase_interval
|
1625
|
+
@purchase_interval_count = purchase_interval_count
|
1626
|
+
end
|
1627
|
+
end
|
1628
|
+
|
1629
|
+
class Subscription < Stripe::RequestParams
|
1630
|
+
class NextBilling < Stripe::RequestParams
|
1631
|
+
# The amount of the next charge for the subscription.
|
1632
|
+
attr_accessor :amount
|
1633
|
+
# The date of the next charge for the subscription in YYYY-MM-DD format.
|
1634
|
+
attr_accessor :date
|
1635
|
+
|
1636
|
+
def initialize(amount: nil, date: nil)
|
1637
|
+
@amount = amount
|
1638
|
+
@date = date
|
1639
|
+
end
|
1640
|
+
end
|
1641
|
+
# Unit of time between subscription charges.
|
1642
|
+
attr_accessor :interval
|
1643
|
+
# The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
|
1644
|
+
attr_accessor :interval_count
|
1645
|
+
# Name for subscription.
|
1646
|
+
attr_accessor :name
|
1647
|
+
# Describes the upcoming charge for this subscription.
|
1648
|
+
attr_accessor :next_billing
|
1649
|
+
# A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
|
1650
|
+
attr_accessor :reference
|
1651
|
+
|
1652
|
+
def initialize(
|
1653
|
+
interval: nil,
|
1654
|
+
interval_count: nil,
|
1655
|
+
name: nil,
|
1656
|
+
next_billing: nil,
|
1657
|
+
reference: nil
|
1658
|
+
)
|
1659
|
+
@interval = interval
|
1660
|
+
@interval_count = interval_count
|
1661
|
+
@name = name
|
1662
|
+
@next_billing = next_billing
|
1663
|
+
@reference = reference
|
1664
|
+
end
|
1665
|
+
end
|
1526
1666
|
# Controls when the funds are captured from the customer's account.
|
1527
1667
|
#
|
1528
1668
|
# If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
|
1529
1669
|
#
|
1530
1670
|
# If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
|
1531
1671
|
attr_accessor :capture_method
|
1672
|
+
# On-demand details if setting up or charging an on-demand payment.
|
1673
|
+
attr_accessor :on_demand
|
1532
1674
|
# Preferred language of the Klarna authorization page that the customer is redirected to
|
1533
1675
|
attr_accessor :preferred_locale
|
1534
1676
|
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
@@ -1541,11 +1683,21 @@ module Stripe
|
|
1541
1683
|
#
|
1542
1684
|
# If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
|
1543
1685
|
attr_accessor :setup_future_usage
|
1686
|
+
# Subscription details if setting up or charging a subscription.
|
1687
|
+
attr_accessor :subscriptions
|
1544
1688
|
|
1545
|
-
def initialize(
|
1689
|
+
def initialize(
|
1690
|
+
capture_method: nil,
|
1691
|
+
on_demand: nil,
|
1692
|
+
preferred_locale: nil,
|
1693
|
+
setup_future_usage: nil,
|
1694
|
+
subscriptions: nil
|
1695
|
+
)
|
1546
1696
|
@capture_method = capture_method
|
1697
|
+
@on_demand = on_demand
|
1547
1698
|
@preferred_locale = preferred_locale
|
1548
1699
|
@setup_future_usage = setup_future_usage
|
1700
|
+
@subscriptions = subscriptions
|
1549
1701
|
end
|
1550
1702
|
end
|
1551
1703
|
|