stripe 15.4.0.pre.beta.2 → 15.5.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 -1
- data/CHANGELOG.md +61 -5
- data/OPENAPI_VERSION +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/event_types.rb +2 -2
- data/lib/stripe/events/{v2_core_account_link_completed_event.rb → v2_core_account_link_returned_event.rb} +2 -2
- data/lib/stripe/events/{v2_off_session_payment_requires_capture_event.rb → v2_money_management_payout_method_updated_event.rb} +3 -3
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +1 -1
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +2 -1
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +1 -1
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +1 -1
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +1 -1
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +1 -1
- data/lib/stripe/object_types.rb +3 -0
- data/lib/stripe/resources/account.rb +5 -5
- data/lib/stripe/resources/account_link.rb +3 -1
- data/lib/stripe/resources/account_session.rb +51 -0
- data/lib/stripe/resources/balance_settings.rb +13 -13
- data/lib/stripe/resources/billing/credit_grant.rb +1 -1
- data/lib/stripe/resources/billing/meter_usage.rb +23 -0
- data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
- data/lib/stripe/resources/charge.rb +7 -5
- data/lib/stripe/resources/checkout/session.rb +106 -6
- data/lib/stripe/resources/confirmation_token.rb +3 -3
- data/lib/stripe/resources/customer.rb +1 -1
- data/lib/stripe/resources/dispute.rb +10 -1
- data/lib/stripe/resources/event.rb +14 -26
- data/lib/stripe/resources/fx_quote.rb +6 -4
- data/lib/stripe/resources/invoice.rb +101 -8
- data/lib/stripe/resources/invoice_item.rb +1 -1
- data/lib/stripe/resources/payment_attempt_record.rb +6 -4
- data/lib/stripe/resources/payment_intent.rb +815 -4
- data/lib/stripe/resources/payment_link.rb +83 -5
- data/lib/stripe/resources/payment_method.rb +4 -4
- data/lib/stripe/resources/payment_record.rb +6 -4
- data/lib/stripe/resources/quote.rb +1 -1
- data/lib/stripe/resources/quote_preview_invoice.rb +17 -0
- data/lib/stripe/resources/radar/value_list.rb +2 -2
- data/lib/stripe/resources/refund.rb +1 -1
- data/lib/stripe/resources/review.rb +2 -2
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/subscription.rb +79 -2
- data/lib/stripe/resources/subscription_item.rb +2 -2
- data/lib/stripe/resources/subscription_schedule.rb +35 -3
- data/lib/stripe/resources/tax/registration.rb +408 -30
- data/lib/stripe/resources/terminal/configuration.rb +196 -0
- data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
- data/lib/stripe/resources/v2/core/account.rb +11 -0
- data/lib/stripe/resources/v2/core/account_link.rb +18 -2
- data/lib/stripe/resources/v2/money_management/payout_method.rb +2 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +40 -23
- data/lib/stripe/resources.rb +5 -2
- data/lib/stripe/services/account_link_service.rb +3 -1
- data/lib/stripe/services/account_service.rb +3 -3
- data/lib/stripe/services/account_session_service.rb +34 -0
- data/lib/stripe/services/balance_settings_service.rb +10 -10
- data/lib/stripe/services/billing/credit_grant_service.rb +1 -1
- data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
- data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
- data/lib/stripe/services/billing_service.rb +2 -1
- data/lib/stripe/services/checkout/session_service.rb +93 -5
- data/lib/stripe/services/invoice_item_service.rb +1 -1
- data/lib/stripe/services/invoice_service.rb +84 -8
- data/lib/stripe/services/payment_intent_service.rb +809 -3
- data/lib/stripe/services/payment_link_service.rb +81 -5
- data/lib/stripe/services/payment_method_service.rb +1 -1
- data/lib/stripe/services/quote_service.rb +1 -1
- data/lib/stripe/services/radar/value_list_service.rb +1 -1
- data/lib/stripe/services/subscription_item_service.rb +2 -2
- data/lib/stripe/services/subscription_schedule_service.rb +35 -3
- data/lib/stripe/services/subscription_service.rb +62 -2
- data/lib/stripe/services/tax/registration_service.rb +360 -30
- data/lib/stripe/services/terminal/configuration_service.rb +152 -0
- data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
- data/lib/stripe/services/terminal_service.rb +2 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +41 -3
- data/lib/stripe/services/v2/core/account_service.rb +38 -2
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +34 -19
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +4 -0
- data/lib/stripe/services.rb +2 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +4893 -390
- metadata +9 -4
@@ -186,7 +186,7 @@ module Stripe
|
|
186
186
|
class AmazonPay < Stripe::StripeObject
|
187
187
|
class Funding < Stripe::StripeObject
|
188
188
|
class Card < Stripe::StripeObject
|
189
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
189
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
190
190
|
attr_reader :brand
|
191
191
|
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
|
192
192
|
attr_reader :brand_product
|
@@ -462,7 +462,7 @@ module Stripe
|
|
462
462
|
attr_reader :amount_requested
|
463
463
|
# Authorization code on the charge.
|
464
464
|
attr_reader :authorization_code
|
465
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
465
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
466
466
|
attr_reader :brand
|
467
467
|
# When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
|
468
468
|
attr_reader :capture_before
|
@@ -557,7 +557,7 @@ module Stripe
|
|
557
557
|
end
|
558
558
|
# The authorized amount
|
559
559
|
attr_reader :amount_authorized
|
560
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
560
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
561
561
|
attr_reader :brand
|
562
562
|
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
|
563
563
|
attr_reader :brand_product
|
@@ -614,6 +614,8 @@ module Stripe
|
|
614
614
|
attr_reader :buyer_id
|
615
615
|
# A public identifier for buyers using Cash App.
|
616
616
|
attr_reader :cashtag
|
617
|
+
# A unique and immutable identifier of payments assigned by Cash App
|
618
|
+
attr_reader :transaction_id
|
617
619
|
end
|
618
620
|
|
619
621
|
class Crypto < Stripe::StripeObject
|
@@ -973,7 +975,7 @@ module Stripe
|
|
973
975
|
class RevolutPay < Stripe::StripeObject
|
974
976
|
class Funding < Stripe::StripeObject
|
975
977
|
class Card < Stripe::StripeObject
|
976
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
978
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
977
979
|
attr_reader :brand
|
978
980
|
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
|
979
981
|
attr_reader :brand_product
|
@@ -1239,7 +1241,7 @@ module Stripe
|
|
1239
1241
|
end
|
1240
1242
|
|
1241
1243
|
class PresentmentDetails < Stripe::StripeObject
|
1242
|
-
# Amount intended to be collected by this payment, denominated in presentment_currency
|
1244
|
+
# Amount intended to be collected by this payment, denominated in `presentment_currency`.
|
1243
1245
|
attr_reader :presentment_amount
|
1244
1246
|
# Currency presented to the customer during payment.
|
1245
1247
|
attr_reader :presentment_currency
|
@@ -295,6 +295,8 @@ module Stripe
|
|
295
295
|
class RenderingOptions < Stripe::StripeObject
|
296
296
|
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
|
297
297
|
attr_reader :amount_tax_display
|
298
|
+
# ID of the invoice rendering template to be used for the generated invoice.
|
299
|
+
attr_reader :template
|
298
300
|
end
|
299
301
|
# The account tax IDs associated with the invoice.
|
300
302
|
attr_reader :account_tax_ids
|
@@ -795,6 +797,14 @@ module Stripe
|
|
795
797
|
class Pix < Stripe::StripeObject
|
796
798
|
# The number of seconds after which Pix payment will expire.
|
797
799
|
attr_reader :expires_after_seconds
|
800
|
+
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
801
|
+
#
|
802
|
+
# 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.
|
803
|
+
#
|
804
|
+
# If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
|
805
|
+
#
|
806
|
+
# 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).
|
807
|
+
attr_reader :setup_future_usage
|
798
808
|
end
|
799
809
|
|
800
810
|
class RevolutPay < Stripe::StripeObject
|
@@ -1002,7 +1012,7 @@ module Stripe
|
|
1002
1012
|
end
|
1003
1013
|
|
1004
1014
|
class PresentmentDetails < Stripe::StripeObject
|
1005
|
-
# Amount intended to be collected by this payment, denominated in presentment_currency
|
1015
|
+
# Amount intended to be collected by this payment, denominated in `presentment_currency`.
|
1006
1016
|
attr_reader :presentment_amount
|
1007
1017
|
# Currency presented to the customer during payment.
|
1008
1018
|
attr_reader :presentment_currency
|
@@ -1494,9 +1504,12 @@ module Stripe
|
|
1494
1504
|
class RenderingOptions < Stripe::RequestParams
|
1495
1505
|
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
|
1496
1506
|
attr_accessor :amount_tax_display
|
1507
|
+
# ID of the invoice rendering template to use for this invoice.
|
1508
|
+
attr_accessor :template
|
1497
1509
|
|
1498
|
-
def initialize(amount_tax_display: nil)
|
1510
|
+
def initialize(amount_tax_display: nil, template: nil)
|
1499
1511
|
@amount_tax_display = amount_tax_display
|
1512
|
+
@template = template
|
1500
1513
|
end
|
1501
1514
|
end
|
1502
1515
|
# The account tax IDs associated with the invoice.
|
@@ -2585,9 +2598,18 @@ module Stripe
|
|
2585
2598
|
class Pix < Stripe::RequestParams
|
2586
2599
|
# The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
|
2587
2600
|
attr_accessor :expires_after_seconds
|
2601
|
+
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
2602
|
+
#
|
2603
|
+
# 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.
|
2604
|
+
#
|
2605
|
+
# If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
|
2606
|
+
#
|
2607
|
+
# 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).
|
2608
|
+
attr_accessor :setup_future_usage
|
2588
2609
|
|
2589
|
-
def initialize(expires_after_seconds: nil)
|
2610
|
+
def initialize(expires_after_seconds: nil, setup_future_usage: nil)
|
2590
2611
|
@expires_after_seconds = expires_after_seconds
|
2612
|
+
@setup_future_usage = setup_future_usage
|
2591
2613
|
end
|
2592
2614
|
end
|
2593
2615
|
|
@@ -2916,6 +2938,10 @@ module Stripe
|
|
2916
2938
|
end
|
2917
2939
|
# Permissions for updating the Checkout Session.
|
2918
2940
|
attr_accessor :update
|
2941
|
+
# Determines which entity is allowed to update the discounts (coupons or promotion codes) that apply to this session.
|
2942
|
+
#
|
2943
|
+
# Default is `client_only`. Stripe Checkout client will automatically handle discount updates. If set to `server_only`, only your server is allowed to update discounts.
|
2944
|
+
attr_accessor :update_discounts
|
2919
2945
|
# Determines which entity is allowed to update the line items.
|
2920
2946
|
#
|
2921
2947
|
# Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
|
@@ -2929,8 +2955,14 @@ module Stripe
|
|
2929
2955
|
# When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
|
2930
2956
|
attr_accessor :update_shipping_details
|
2931
2957
|
|
2932
|
-
def initialize(
|
2958
|
+
def initialize(
|
2959
|
+
update: nil,
|
2960
|
+
update_discounts: nil,
|
2961
|
+
update_line_items: nil,
|
2962
|
+
update_shipping_details: nil
|
2963
|
+
)
|
2933
2964
|
@update = update
|
2965
|
+
@update_discounts = update_discounts
|
2934
2966
|
@update_line_items = update_line_items
|
2935
2967
|
@update_shipping_details = update_shipping_details
|
2936
2968
|
end
|
@@ -3099,7 +3131,7 @@ module Stripe
|
|
3099
3131
|
|
3100
3132
|
class SubscriptionData < Stripe::RequestParams
|
3101
3133
|
class BillingMode < Stripe::RequestParams
|
3102
|
-
#
|
3134
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
3103
3135
|
attr_accessor :type
|
3104
3136
|
|
3105
3137
|
def initialize(type: nil)
|
@@ -3329,6 +3361,8 @@ module Stripe
|
|
3329
3361
|
#
|
3330
3362
|
# For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
|
3331
3363
|
attr_accessor :optional_items
|
3364
|
+
# Where the user is coming from. This informs the optimizations that are applied to the session. For example, a session originating from a mobile app may behave more like a native app, depending on the platform. This parameter is currently not allowed if `ui_mode` is `custom`.
|
3365
|
+
attr_accessor :origin_context
|
3332
3366
|
# A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
|
3333
3367
|
attr_accessor :payment_intent_data
|
3334
3368
|
# Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.
|
@@ -3425,6 +3459,7 @@ module Stripe
|
|
3425
3459
|
metadata: nil,
|
3426
3460
|
mode: nil,
|
3427
3461
|
optional_items: nil,
|
3462
|
+
origin_context: nil,
|
3428
3463
|
payment_intent_data: nil,
|
3429
3464
|
payment_method_collection: nil,
|
3430
3465
|
payment_method_configuration: nil,
|
@@ -3471,6 +3506,7 @@ module Stripe
|
|
3471
3506
|
@metadata = metadata
|
3472
3507
|
@mode = mode
|
3473
3508
|
@optional_items = optional_items
|
3509
|
+
@origin_context = origin_context
|
3474
3510
|
@payment_intent_data = payment_intent_data
|
3475
3511
|
@payment_method_collection = payment_method_collection
|
3476
3512
|
@payment_method_configuration = payment_method_configuration
|
@@ -3545,6 +3581,48 @@ module Stripe
|
|
3545
3581
|
end
|
3546
3582
|
end
|
3547
3583
|
|
3584
|
+
class Discount < Stripe::RequestParams
|
3585
|
+
class CouponData < Stripe::RequestParams
|
3586
|
+
# A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
|
3587
|
+
attr_accessor :amount_off
|
3588
|
+
# Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
|
3589
|
+
attr_accessor :currency
|
3590
|
+
# Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
|
3591
|
+
attr_accessor :duration
|
3592
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
3593
|
+
attr_accessor :metadata
|
3594
|
+
# Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
|
3595
|
+
attr_accessor :name
|
3596
|
+
# A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
|
3597
|
+
attr_accessor :percent_off
|
3598
|
+
|
3599
|
+
def initialize(
|
3600
|
+
amount_off: nil,
|
3601
|
+
currency: nil,
|
3602
|
+
duration: nil,
|
3603
|
+
metadata: nil,
|
3604
|
+
name: nil,
|
3605
|
+
percent_off: nil
|
3606
|
+
)
|
3607
|
+
@amount_off = amount_off
|
3608
|
+
@currency = currency
|
3609
|
+
@duration = duration
|
3610
|
+
@metadata = metadata
|
3611
|
+
@name = name
|
3612
|
+
@percent_off = percent_off
|
3613
|
+
end
|
3614
|
+
end
|
3615
|
+
# The ID of the [Coupon](https://stripe.com/docs/api/coupons) to apply to this Session. One of `coupon` or `coupon_data` is required when updating discounts.
|
3616
|
+
attr_accessor :coupon
|
3617
|
+
# Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts.
|
3618
|
+
attr_accessor :coupon_data
|
3619
|
+
|
3620
|
+
def initialize(coupon: nil, coupon_data: nil)
|
3621
|
+
@coupon = coupon
|
3622
|
+
@coupon_data = coupon_data
|
3623
|
+
end
|
3624
|
+
end
|
3625
|
+
|
3548
3626
|
class LineItem < Stripe::RequestParams
|
3549
3627
|
class AdjustableQuantity < Stripe::RequestParams
|
3550
3628
|
# Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity.
|
@@ -3766,8 +3844,22 @@ module Stripe
|
|
3766
3844
|
@shipping_rate_data = shipping_rate_data
|
3767
3845
|
end
|
3768
3846
|
end
|
3847
|
+
|
3848
|
+
class SubscriptionData < Stripe::RequestParams
|
3849
|
+
# 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.
|
3850
|
+
attr_accessor :trial_end
|
3851
|
+
# Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
|
3852
|
+
attr_accessor :trial_period_days
|
3853
|
+
|
3854
|
+
def initialize(trial_end: nil, trial_period_days: nil)
|
3855
|
+
@trial_end = trial_end
|
3856
|
+
@trial_period_days = trial_period_days
|
3857
|
+
end
|
3858
|
+
end
|
3769
3859
|
# Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions.
|
3770
3860
|
attr_accessor :collected_information
|
3861
|
+
# List of coupons and promotion codes attached to the Checkout Session.
|
3862
|
+
attr_accessor :discounts
|
3771
3863
|
# Specifies which fields in the response should be expanded.
|
3772
3864
|
attr_accessor :expand
|
3773
3865
|
# A list of items the customer is purchasing.
|
@@ -3788,19 +3880,25 @@ module Stripe
|
|
3788
3880
|
attr_accessor :metadata
|
3789
3881
|
# The shipping rate options to apply to this Session. Up to a maximum of 5.
|
3790
3882
|
attr_accessor :shipping_options
|
3883
|
+
# A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
|
3884
|
+
attr_accessor :subscription_data
|
3791
3885
|
|
3792
3886
|
def initialize(
|
3793
3887
|
collected_information: nil,
|
3888
|
+
discounts: nil,
|
3794
3889
|
expand: nil,
|
3795
3890
|
line_items: nil,
|
3796
3891
|
metadata: nil,
|
3797
|
-
shipping_options: nil
|
3892
|
+
shipping_options: nil,
|
3893
|
+
subscription_data: nil
|
3798
3894
|
)
|
3799
3895
|
@collected_information = collected_information
|
3896
|
+
@discounts = discounts
|
3800
3897
|
@expand = expand
|
3801
3898
|
@line_items = line_items
|
3802
3899
|
@metadata = metadata
|
3803
3900
|
@shipping_options = shipping_options
|
3901
|
+
@subscription_data = subscription_data
|
3804
3902
|
end
|
3805
3903
|
end
|
3806
3904
|
|
@@ -3911,6 +4009,8 @@ module Stripe
|
|
3911
4009
|
attr_reader :object
|
3912
4010
|
# The optional items presented to the customer at checkout.
|
3913
4011
|
attr_reader :optional_items
|
4012
|
+
# Where the user is coming from. This informs the optimizations that are applied to the session.
|
4013
|
+
attr_reader :origin_context
|
3914
4014
|
# The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
|
3915
4015
|
attr_reader :payment_intent
|
3916
4016
|
# The ID of the Payment Link that created this Session.
|
@@ -180,7 +180,7 @@ module Stripe
|
|
180
180
|
end
|
181
181
|
# The authorized amount
|
182
182
|
attr_reader :amount_authorized
|
183
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
183
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
184
184
|
attr_reader :brand
|
185
185
|
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
|
186
186
|
attr_reader :brand_product
|
@@ -362,7 +362,7 @@ module Stripe
|
|
362
362
|
# Attribute for field visa_checkout
|
363
363
|
attr_reader :visa_checkout
|
364
364
|
end
|
365
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
365
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
366
366
|
attr_reader :brand
|
367
367
|
# Checks on Card address and CVC if provided.
|
368
368
|
attr_reader :checks
|
@@ -419,7 +419,7 @@ module Stripe
|
|
419
419
|
# The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
|
420
420
|
attr_reader :type
|
421
421
|
end
|
422
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
422
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
423
423
|
attr_reader :brand
|
424
424
|
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
|
425
425
|
attr_reader :brand_product
|
@@ -781,7 +781,7 @@ module Stripe
|
|
781
781
|
end
|
782
782
|
# The customer's address.
|
783
783
|
attr_reader :address
|
784
|
-
# The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize.
|
784
|
+
# The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see [invoice_credit_balance](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance).
|
785
785
|
attr_reader :balance
|
786
786
|
# The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically.
|
787
787
|
attr_reader :cash_balance
|
@@ -196,7 +196,7 @@ module Stripe
|
|
196
196
|
end
|
197
197
|
|
198
198
|
class Card < Stripe::StripeObject
|
199
|
-
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa
|
199
|
+
# Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
|
200
200
|
attr_reader :brand
|
201
201
|
# The type of dispute opened. Different case types may have varying fees and financial impact.
|
202
202
|
attr_reader :case_type
|
@@ -227,6 +227,13 @@ module Stripe
|
|
227
227
|
attr_reader :type
|
228
228
|
end
|
229
229
|
|
230
|
+
class SmartDisputes < Stripe::StripeObject
|
231
|
+
# Evidence that could be provided to improve the SmartDisputes packet
|
232
|
+
attr_reader :recommended_evidence
|
233
|
+
# Smart Disputes auto representment packet availability status.
|
234
|
+
attr_reader :status
|
235
|
+
end
|
236
|
+
|
230
237
|
class ListParams < Stripe::RequestParams
|
231
238
|
class Created < Stripe::RequestParams
|
232
239
|
# Minimum value to filter by (exclusive)
|
@@ -625,6 +632,8 @@ module Stripe
|
|
625
632
|
attr_reader :payment_method_details
|
626
633
|
# Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `noncompliant`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).
|
627
634
|
attr_reader :reason
|
635
|
+
# Attribute for field smart_disputes
|
636
|
+
attr_reader :smart_disputes
|
628
637
|
# Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
|
629
638
|
attr_reader :status
|
630
639
|
|
@@ -2,35 +2,23 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Stripe
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# `
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# `charge.succeeded` event.
|
5
|
+
# Snapshot events allow you to track and react to activity in your Stripe integration. When
|
6
|
+
# the state of another API resource changes, Stripe creates an `Event` object that contains
|
7
|
+
# all the relevant information associated with that action, including the affected API
|
8
|
+
# resource. For example, a successful payment triggers a `charge.succeeded` event, which
|
9
|
+
# contains the `Charge` in the event's data property. Some actions trigger multiple events.
|
10
|
+
# For example, if you create a new subscription for a customer, it triggers both a
|
11
|
+
# `customer.subscription.created` event and a `charge.succeeded` event.
|
13
12
|
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
# `invoice.payment_failed` event contains an invoice.
|
13
|
+
# Configure an event destination in your account to listen for events that represent actions
|
14
|
+
# your integration needs to respond to. Additionally, you can retrieve an individual event or
|
15
|
+
# a list of events from the API.
|
18
16
|
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
# [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
|
23
|
-
# `Event` objects directly to an endpoint on your server. You can manage
|
24
|
-
# webhooks in your
|
25
|
-
# [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
|
26
|
-
# to [listen for events](https://docs.stripe.com/webhooks)
|
27
|
-
# so that your integration can automatically trigger reactions.
|
17
|
+
# [Connect](https://docs.stripe.com/connect) platforms can also receive event notifications
|
18
|
+
# that occur in their connected accounts. These events include an account attribute that
|
19
|
+
# identifies the relevant connected account.
|
28
20
|
#
|
29
|
-
#
|
30
|
-
# that occur in connected accounts. For these events, there's an
|
31
|
-
# additional `account` attribute in the received `Event` object.
|
32
|
-
#
|
33
|
-
# We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)
|
21
|
+
# You can access events through the [Retrieve Event API](https://docs.stripe.com/api/events#retrieve_event)
|
34
22
|
# for 30 days.
|
35
23
|
class Event < APIResource
|
36
24
|
extend Stripe::APIOperations::List
|
@@ -2,10 +2,12 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Stripe
|
5
|
-
# The FX Quotes API provides three
|
6
|
-
# - View
|
7
|
-
# -
|
8
|
-
# -
|
5
|
+
# The FX Quotes API provides three functions:
|
6
|
+
# - View Stripe's current exchange rate for any given currency pair.
|
7
|
+
# - Extend quoted rates for a 1-hour period or a 24-hour period, minimizing uncertainty from FX fluctuations.
|
8
|
+
# - Preview the FX fees Stripe will charge on your FX transaction, allowing you to anticipate specific settlement amounts before payment costs.
|
9
|
+
#
|
10
|
+
# [View the docs](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api)
|
9
11
|
class FxQuote < APIResource
|
10
12
|
extend Stripe::APIOperations::Create
|
11
13
|
extend Stripe::APIOperations::List
|