stripe 15.0.0 → 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 +129 -44
- data/CONTRIBUTING.md +25 -0
- data/Gemfile +1 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +28 -55
- data/VERSION +1 -1
- data/lib/stripe/api_operations/nested_resource.rb +35 -35
- data/lib/stripe/api_requestor.rb +1 -1
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/connection_manager.rb +1 -3
- data/lib/stripe/event_types.rb +1 -0
- data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +1 -1
- data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +1 -1
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +21 -0
- data/lib/stripe/oauth.rb +1 -1
- data/lib/stripe/resources/account.rb +198 -28
- data/lib/stripe/resources/account_session.rb +176 -72
- data/lib/stripe/resources/apple_pay_domain.rb +1 -2
- data/lib/stripe/resources/balance.rb +42 -0
- data/lib/stripe/resources/balance_transaction.rb +2 -0
- data/lib/stripe/resources/bank_account.rb +2 -2
- data/lib/stripe/resources/billing_portal/session.rb +3 -3
- data/lib/stripe/resources/capability.rb +1 -1
- data/lib/stripe/resources/charge.rb +43 -20
- data/lib/stripe/resources/checkout/session.rb +120 -19
- data/lib/stripe/resources/confirmation_token.rb +119 -100
- data/lib/stripe/resources/country_spec.rb +1 -1
- data/lib/stripe/resources/coupon.rb +2 -3
- data/lib/stripe/resources/credit_note.rb +21 -18
- data/lib/stripe/resources/customer.rb +4 -6
- data/lib/stripe/resources/customer_session.rb +5 -5
- data/lib/stripe/resources/dispute.rb +2 -2
- data/lib/stripe/resources/event.rb +3 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/funding_instructions.rb +1 -1
- data/lib/stripe/resources/identity/verification_report.rb +6 -0
- data/lib/stripe/resources/identity/verification_session.rb +51 -11
- data/lib/stripe/resources/invoice.rb +146 -32
- data/lib/stripe/resources/invoice_item.rb +3 -7
- data/lib/stripe/resources/invoice_line_item.rb +1 -1
- data/lib/stripe/resources/invoice_payment.rb +9 -2
- data/lib/stripe/resources/issuing/authorization.rb +8 -8
- data/lib/stripe/resources/issuing/card.rb +1 -1
- data/lib/stripe/resources/issuing/dispute.rb +3 -3
- data/lib/stripe/resources/login_link.rb +2 -1
- data/lib/stripe/resources/mandate.rb +3 -0
- data/lib/stripe/resources/payment_intent.rb +602 -325
- data/lib/stripe/resources/payment_method.rb +76 -117
- data/lib/stripe/resources/payment_method_configuration.rb +356 -2
- data/lib/stripe/resources/payment_method_domain.rb +15 -2
- data/lib/stripe/resources/payout.rb +4 -4
- data/lib/stripe/resources/person.rb +27 -3
- data/lib/stripe/resources/plan.rb +2 -3
- data/lib/stripe/resources/price.rb +1 -1
- data/lib/stripe/resources/product.rb +1 -2
- data/lib/stripe/resources/quote.rb +28 -3
- data/lib/stripe/resources/radar/value_list.rb +1 -2
- data/lib/stripe/resources/radar/value_list_item.rb +1 -2
- data/lib/stripe/resources/refund.rb +8 -1
- data/lib/stripe/resources/reversal.rb +1 -1
- data/lib/stripe/resources/review.rb +1 -1
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +414 -293
- data/lib/stripe/resources/source.rb +1 -1
- data/lib/stripe/resources/subscription.rb +149 -27
- data/lib/stripe/resources/subscription_item.rb +33 -0
- data/lib/stripe/resources/subscription_schedule.rb +141 -4
- data/lib/stripe/resources/tax/calculation.rb +6 -2
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/registration.rb +261 -1
- data/lib/stripe/resources/tax/transaction.rb +1 -1
- data/lib/stripe/resources/tax_id.rb +3 -4
- data/lib/stripe/resources/tax_rate.rb +2 -2
- data/lib/stripe/resources/terminal/configuration.rb +2 -2
- data/lib/stripe/resources/terminal/location.rb +2 -3
- data/lib/stripe/resources/terminal/reader.rb +426 -6
- data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
- data/lib/stripe/resources/token.rb +63 -2
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources/treasury/financial_account.rb +5 -1
- data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
- data/lib/stripe/resources/v2/event.rb +2 -2
- data/lib/stripe/resources/v2/event_destination.rb +2 -2
- data/lib/stripe/resources/webhook_endpoint.rb +1 -2
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/services/account_external_account_service.rb +3 -4
- data/lib/stripe/services/account_login_link_service.rb +1 -1
- data/lib/stripe/services/account_person_service.rb +85 -2
- data/lib/stripe/services/account_service.rb +169 -20
- data/lib/stripe/services/account_session_service.rb +115 -47
- data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
- data/lib/stripe/services/application_fee_service.rb +1 -1
- data/lib/stripe/services/apps_service.rb +1 -1
- data/lib/stripe/services/balance_service.rb +1 -1
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/session_service.rb +1 -1
- data/lib/stripe/services/billing_portal_service.rb +1 -1
- data/lib/stripe/services/billing_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +4 -4
- data/lib/stripe/services/checkout/session_service.rb +94 -15
- data/lib/stripe/services/checkout_service.rb +1 -1
- data/lib/stripe/services/climate_service.rb +1 -1
- data/lib/stripe/services/coupon_service.rb +1 -2
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +14 -15
- data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
- data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
- data/lib/stripe/services/customer_payment_method_service.rb +1 -1
- data/lib/stripe/services/customer_payment_source_service.rb +1 -1
- data/lib/stripe/services/customer_service.rb +5 -7
- data/lib/stripe/services/customer_session_service.rb +1 -1
- data/lib/stripe/services/customer_tax_id_service.rb +2 -3
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/entitlements_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/financial_connections/account_service.rb +1 -1
- data/lib/stripe/services/financial_connections_service.rb +1 -1
- data/lib/stripe/services/forwarding_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +21 -5
- data/lib/stripe/services/identity_service.rb +1 -1
- data/lib/stripe/services/invoice_item_service.rb +1 -2
- data/lib/stripe/services/invoice_service.rb +122 -28
- data/lib/stripe/services/issuing/authorization_service.rb +4 -4
- data/lib/stripe/services/issuing/card_service.rb +1 -1
- data/lib/stripe/services/issuing/dispute_service.rb +2 -2
- data/lib/stripe/services/issuing_service.rb +1 -1
- data/lib/stripe/services/payment_intent_service.rb +563 -313
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_method_configuration_service.rb +254 -2
- data/lib/stripe/services/payment_method_domain_service.rb +1 -1
- data/lib/stripe/services/payment_method_service.rb +59 -105
- data/lib/stripe/services/payout_service.rb +2 -2
- data/lib/stripe/services/plan_service.rb +2 -3
- data/lib/stripe/services/price_service.rb +2 -2
- data/lib/stripe/services/product_feature_service.rb +1 -2
- data/lib/stripe/services/product_service.rb +3 -4
- data/lib/stripe/services/promotion_code_service.rb +1 -1
- data/lib/stripe/services/quote_service.rb +21 -4
- data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
- data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
- data/lib/stripe/services/radar/value_list_service.rb +1 -2
- data/lib/stripe/services/radar_service.rb +1 -1
- data/lib/stripe/services/reporting_service.rb +1 -1
- data/lib/stripe/services/setup_intent_service.rb +403 -291
- data/lib/stripe/services/sigma_service.rb +1 -1
- data/lib/stripe/services/source_service.rb +2 -2
- data/lib/stripe/services/subscription_item_service.rb +26 -0
- data/lib/stripe/services/subscription_schedule_service.rb +106 -3
- data/lib/stripe/services/subscription_service.rb +121 -26
- data/lib/stripe/services/tax/calculation_service.rb +6 -2
- data/lib/stripe/services/tax/registration_service.rb +170 -1
- data/lib/stripe/services/tax/transaction_service.rb +1 -1
- data/lib/stripe/services/tax_id_service.rb +2 -3
- data/lib/stripe/services/tax_service.rb +1 -1
- data/lib/stripe/services/terminal/configuration_service.rb +1 -2
- data/lib/stripe/services/terminal/location_service.rb +2 -3
- data/lib/stripe/services/terminal/reader_service.rb +196 -2
- data/lib/stripe/services/terminal_service.rb +1 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +90 -91
- data/lib/stripe/services/test_helpers/issuing_service.rb +1 -1
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
- data/lib/stripe/services/test_helpers/terminal_service.rb +1 -1
- data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
- data/lib/stripe/services/test_helpers/treasury_service.rb +1 -1
- data/lib/stripe/services/test_helpers_service.rb +1 -1
- data/lib/stripe/services/token_service.rb +62 -1
- data/lib/stripe/services/transfer_service.rb +2 -2
- data/lib/stripe/services/treasury/financial_account_service.rb +6 -2
- data/lib/stripe/services/treasury_service.rb +1 -1
- data/lib/stripe/services/v1_services.rb +1 -1
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
- data/lib/stripe/services/v2/billing_service.rb +3 -3
- data/lib/stripe/services/v2/core/event_destination_service.rb +17 -23
- data/lib/stripe/services/v2/core/event_service.rb +1 -2
- data/lib/stripe/services/v2/core_service.rb +1 -1
- data/lib/stripe/services/v2_services.rb +1 -1
- data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -1
- data/rbi/stripe/resources/account.rbi +190 -35
- data/rbi/stripe/resources/account_session.rbi +196 -77
- data/rbi/stripe/resources/apple_pay_domain.rbi +1 -3
- data/rbi/stripe/resources/balance.rbi +55 -0
- data/rbi/stripe/resources/balance_transaction.rbi +3 -0
- data/rbi/stripe/resources/bank_account.rbi +2 -2
- data/rbi/stripe/resources/billing/alert.rbi +2 -2
- data/rbi/stripe/resources/billing_portal/session.rbi +3 -3
- data/rbi/stripe/resources/capability.rbi +1 -1
- data/rbi/stripe/resources/charge.rbi +52 -20
- data/rbi/stripe/resources/checkout/session.rbi +133 -24
- data/rbi/stripe/resources/confirmation_token.rbi +140 -115
- data/rbi/stripe/resources/country_spec.rbi +1 -1
- data/rbi/stripe/resources/coupon.rbi +2 -4
- data/rbi/stripe/resources/credit_note.rbi +23 -18
- data/rbi/stripe/resources/customer.rbi +4 -8
- data/rbi/stripe/resources/customer_session.rbi +5 -5
- data/rbi/stripe/resources/dispute.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +4 -1
- data/rbi/stripe/resources/file.rbi +1 -1
- data/rbi/stripe/resources/identity/verification_report.rbi +9 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +59 -12
- data/rbi/stripe/resources/invoice.rbi +149 -40
- data/rbi/stripe/resources/invoice_item.rbi +3 -8
- data/rbi/stripe/resources/invoice_line_item.rbi +2 -2
- data/rbi/stripe/resources/invoice_payment.rbi +9 -2
- data/rbi/stripe/resources/issuing/authorization.rbi +8 -8
- data/rbi/stripe/resources/issuing/card.rbi +1 -1
- data/rbi/stripe/resources/issuing/dispute.rbi +3 -3
- data/rbi/stripe/resources/login_link.rbi +2 -1
- data/rbi/stripe/resources/mandate.rbi +4 -0
- data/rbi/stripe/resources/payment_intent.rbi +637 -381
- data/rbi/stripe/resources/payment_method.rbi +81 -133
- data/rbi/stripe/resources/payment_method_configuration.rbi +400 -4
- data/rbi/stripe/resources/payment_method_domain.rbi +18 -2
- data/rbi/stripe/resources/payout.rbi +4 -4
- data/rbi/stripe/resources/person.rbi +33 -3
- data/rbi/stripe/resources/plan.rbi +2 -4
- data/rbi/stripe/resources/price.rbi +1 -1
- data/rbi/stripe/resources/product.rbi +1 -3
- data/rbi/stripe/resources/quote.rbi +25 -3
- data/rbi/stripe/resources/radar/value_list.rbi +1 -3
- data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
- data/rbi/stripe/resources/refund.rbi +8 -1
- data/rbi/stripe/resources/reversal.rbi +1 -1
- data/rbi/stripe/resources/review.rbi +1 -1
- data/rbi/stripe/resources/setup_attempt.rbi +1 -1
- data/rbi/stripe/resources/setup_intent.rbi +464 -346
- data/rbi/stripe/resources/source.rbi +1 -1
- data/rbi/stripe/resources/subscription.rbi +150 -34
- data/rbi/stripe/resources/subscription_item.rbi +36 -2
- data/rbi/stripe/resources/subscription_schedule.rbi +161 -11
- data/rbi/stripe/resources/tax/calculation.rbi +7 -3
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +4 -1
- data/rbi/stripe/resources/tax/registration.rbi +249 -2
- data/rbi/stripe/resources/tax/transaction.rbi +1 -1
- data/rbi/stripe/resources/tax_id.rbi +3 -5
- data/rbi/stripe/resources/tax_rate.rbi +2 -2
- data/rbi/stripe/resources/terminal/configuration.rbi +2 -3
- data/rbi/stripe/resources/terminal/location.rbi +4 -6
- data/rbi/stripe/resources/terminal/reader.rbi +415 -8
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
- data/rbi/stripe/resources/token.rbi +70 -4
- data/rbi/stripe/resources/transfer.rbi +1 -1
- data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +3 -3
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +3 -3
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +3 -3
- data/rbi/stripe/resources/v2/event.rbi +3 -3
- data/rbi/stripe/resources/v2/event_destination.rbi +3 -3
- data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
- data/rbi/stripe/services/account_external_account_service.rbi +3 -5
- data/rbi/stripe/services/account_login_link_service.rbi +1 -1
- data/rbi/stripe/services/account_person_service.rbi +93 -5
- data/rbi/stripe/services/account_service.rbi +166 -28
- data/rbi/stripe/services/account_session_service.rbi +126 -52
- data/rbi/stripe/services/apple_pay_domain_service.rbi +1 -3
- data/rbi/stripe/services/balance_service.rbi +1 -1
- data/rbi/stripe/services/billing/alert_service.rbi +2 -2
- data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
- data/rbi/stripe/services/charge_service.rbi +4 -4
- data/rbi/stripe/services/checkout/session_service.rbi +104 -19
- data/rbi/stripe/services/coupon_service.rbi +1 -3
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
- data/rbi/stripe/services/credit_note_service.rbi +13 -14
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +3 -3
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +2 -2
- data/rbi/stripe/services/customer_payment_method_service.rbi +1 -1
- data/rbi/stripe/services/customer_payment_source_service.rbi +1 -1
- data/rbi/stripe/services/customer_service.rbi +4 -8
- data/rbi/stripe/services/customer_session_service.rbi +1 -1
- data/rbi/stripe/services/customer_tax_id_service.rbi +2 -4
- data/rbi/stripe/services/dispute_service.rbi +1 -1
- data/rbi/stripe/services/file_service.rbi +1 -1
- data/rbi/stripe/services/identity/verification_session_service.rbi +22 -6
- data/rbi/stripe/services/invoice_item_service.rbi +1 -3
- data/rbi/stripe/services/invoice_service.rbi +126 -35
- data/rbi/stripe/services/issuing/authorization_service.rbi +4 -4
- data/rbi/stripe/services/issuing/card_service.rbi +1 -1
- data/rbi/stripe/services/issuing/dispute_service.rbi +2 -2
- data/rbi/stripe/services/payment_intent_service.rbi +599 -369
- data/rbi/stripe/services/payment_method_configuration_service.rbi +280 -4
- data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
- data/rbi/stripe/services/payment_method_service.rbi +62 -121
- data/rbi/stripe/services/payout_service.rbi +2 -2
- data/rbi/stripe/services/plan_service.rbi +2 -4
- data/rbi/stripe/services/price_service.rbi +2 -2
- data/rbi/stripe/services/product_feature_service.rbi +1 -3
- data/rbi/stripe/services/product_service.rbi +2 -4
- data/rbi/stripe/services/promotion_code_service.rbi +1 -1
- data/rbi/stripe/services/quote_service.rbi +16 -3
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +1 -1
- data/rbi/stripe/services/radar/value_list_item_service.rbi +1 -3
- data/rbi/stripe/services/radar/value_list_service.rbi +1 -3
- data/rbi/stripe/services/setup_intent_service.rbi +457 -344
- data/rbi/stripe/services/source_service.rbi +1 -1
- data/rbi/stripe/services/subscription_item_service.rbi +28 -2
- data/rbi/stripe/services/subscription_schedule_service.rbi +119 -10
- data/rbi/stripe/services/subscription_service.rbi +121 -33
- data/rbi/stripe/services/tax/calculation_service.rbi +6 -2
- data/rbi/stripe/services/tax/registration_service.rbi +171 -2
- data/rbi/stripe/services/tax_id_service.rbi +2 -4
- data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
- data/rbi/stripe/services/terminal/location_service.rbi +4 -6
- data/rbi/stripe/services/terminal/reader_service.rbi +200 -4
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +106 -106
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +31 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +1 -3
- data/rbi/stripe/services/token_service.rbi +71 -3
- data/rbi/stripe/services/transfer_service.rbi +1 -1
- data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
- data/rbi/stripe/services/v2/billing_service.rbi +1 -1
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +14 -22
- data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
- data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
- metadata +5 -2
@@ -16,7 +16,7 @@ module Stripe
|
|
16
16
|
# Create sessions on-demand when customers intend to manage their subscriptions
|
17
17
|
# and billing details.
|
18
18
|
#
|
19
|
-
# Related guide: [Customer management](https://stripe.com/customer-management)
|
19
|
+
# Related guide: [Customer management](https://docs.stripe.com/customer-management)
|
20
20
|
class Session < APIResource
|
21
21
|
extend Stripe::APIOperations::Create
|
22
22
|
|
@@ -82,7 +82,7 @@ module Stripe
|
|
82
82
|
# [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
|
83
83
|
attr_reader :quantity
|
84
84
|
end
|
85
|
-
# The coupon or promotion code to apply to this subscription update.
|
85
|
+
# The coupon or promotion code to apply to this subscription update.
|
86
86
|
attr_reader :discounts
|
87
87
|
# The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
|
88
88
|
attr_reader :items
|
@@ -202,7 +202,7 @@ module Stripe
|
|
202
202
|
@quantity = quantity
|
203
203
|
end
|
204
204
|
end
|
205
|
-
# The coupon or promotion code to apply to this subscription update.
|
205
|
+
# The coupon or promotion code to apply to this subscription update.
|
206
206
|
attr_accessor :discounts
|
207
207
|
# The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
|
208
208
|
attr_accessor :items
|
@@ -65,7 +65,7 @@ module Stripe
|
|
65
65
|
end
|
66
66
|
# Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
|
67
67
|
attr_reader :alternatives
|
68
|
-
#
|
68
|
+
# The date by which all required account information must be both submitted and verified. This includes fields listed in `currently_due` as well as those in `pending_verification`. If any required information is missing or unverified by this date, the account may be disabled. Note that `current_deadline` may change if additional `currently_due` requirements are requested.
|
69
69
|
attr_reader :current_deadline
|
70
70
|
# Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
|
71
71
|
attr_reader :currently_due
|
@@ -43,6 +43,8 @@ module Stripe
|
|
43
43
|
attr_reader :name
|
44
44
|
# Billing phone number (including extension).
|
45
45
|
attr_reader :phone
|
46
|
+
# Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
|
47
|
+
attr_reader :tax_id
|
46
48
|
end
|
47
49
|
|
48
50
|
class FraudDetails < Stripe::StripeObject
|
@@ -155,6 +157,10 @@ module Stripe
|
|
155
157
|
end
|
156
158
|
|
157
159
|
class Affirm < Stripe::StripeObject
|
160
|
+
# ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
|
161
|
+
attr_reader :location
|
162
|
+
# ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
|
163
|
+
attr_reader :reader
|
158
164
|
# The Affirm transaction ID associated with this payment.
|
159
165
|
attr_reader :transaction_id
|
160
166
|
end
|
@@ -284,7 +290,7 @@ module Stripe
|
|
284
290
|
# For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
|
285
291
|
# One of `month`.
|
286
292
|
attr_reader :interval
|
287
|
-
# Type of installment plan, one of `fixed_count`.
|
293
|
+
# Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
|
288
294
|
attr_reader :type
|
289
295
|
end
|
290
296
|
# Installment plan selected for the payment.
|
@@ -468,7 +474,7 @@ module Stripe
|
|
468
474
|
attr_reader :iin
|
469
475
|
# Attribute for field incremental_authorization
|
470
476
|
attr_reader :incremental_authorization
|
471
|
-
# Installment details for this payment
|
477
|
+
# Installment details for this payment.
|
472
478
|
#
|
473
479
|
# For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
|
474
480
|
attr_reader :installments
|
@@ -509,9 +515,9 @@ module Stripe
|
|
509
515
|
class Receipt < Stripe::StripeObject
|
510
516
|
# The type of account being debited or credited
|
511
517
|
attr_reader :account_type
|
512
|
-
#
|
518
|
+
# The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.
|
513
519
|
attr_reader :application_cryptogram
|
514
|
-
#
|
520
|
+
# 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.
|
515
521
|
attr_reader :application_preferred_name
|
516
522
|
# Identifier for this transaction.
|
517
523
|
attr_reader :authorization_code
|
@@ -519,11 +525,11 @@ module Stripe
|
|
519
525
|
attr_reader :authorization_response_code
|
520
526
|
# 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`.
|
521
527
|
attr_reader :cardholder_verification_method
|
522
|
-
#
|
528
|
+
# Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.
|
523
529
|
attr_reader :dedicated_file_name
|
524
|
-
#
|
530
|
+
# 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.
|
525
531
|
attr_reader :terminal_verification_results
|
526
|
-
# An indication of
|
532
|
+
# An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.
|
527
533
|
attr_reader :transaction_status_information
|
528
534
|
end
|
529
535
|
|
@@ -575,7 +581,7 @@ module Stripe
|
|
575
581
|
attr_reader :offline
|
576
582
|
# Defines whether the authorized amount can be over-captured or not
|
577
583
|
attr_reader :overcapture_supported
|
578
|
-
# EMV tag 5F2D
|
584
|
+
# 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.
|
579
585
|
attr_reader :preferred_locales
|
580
586
|
# How card details were read in this transaction.
|
581
587
|
attr_reader :read_method
|
@@ -592,6 +598,17 @@ module Stripe
|
|
592
598
|
attr_reader :cashtag
|
593
599
|
end
|
594
600
|
|
601
|
+
class Crypto < Stripe::StripeObject
|
602
|
+
# The wallet address of the customer.
|
603
|
+
attr_reader :buyer_address
|
604
|
+
# The blockchain network that the transaction was sent on.
|
605
|
+
attr_reader :network
|
606
|
+
# The token currency that the transaction was sent with.
|
607
|
+
attr_reader :token_currency
|
608
|
+
# The blockchain transaction hash of the crypto payment.
|
609
|
+
attr_reader :transaction_hash
|
610
|
+
end
|
611
|
+
|
595
612
|
class CustomerBalance < Stripe::StripeObject; end
|
596
613
|
|
597
614
|
class Eps < Stripe::StripeObject
|
@@ -631,7 +648,7 @@ module Stripe
|
|
631
648
|
end
|
632
649
|
|
633
650
|
class Ideal < Stripe::StripeObject
|
634
|
-
# The customer's bank. 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`.
|
651
|
+
# The customer's bank. 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`.
|
635
652
|
attr_reader :bank
|
636
653
|
# The Bank Identifier Code of the customer's bank.
|
637
654
|
attr_reader :bic
|
@@ -650,9 +667,9 @@ module Stripe
|
|
650
667
|
class Receipt < Stripe::StripeObject
|
651
668
|
# The type of account being debited or credited
|
652
669
|
attr_reader :account_type
|
653
|
-
#
|
670
|
+
# The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.
|
654
671
|
attr_reader :application_cryptogram
|
655
|
-
#
|
672
|
+
# 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.
|
656
673
|
attr_reader :application_preferred_name
|
657
674
|
# Identifier for this transaction.
|
658
675
|
attr_reader :authorization_code
|
@@ -660,11 +677,11 @@ module Stripe
|
|
660
677
|
attr_reader :authorization_response_code
|
661
678
|
# 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`.
|
662
679
|
attr_reader :cardholder_verification_method
|
663
|
-
#
|
680
|
+
# Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.
|
664
681
|
attr_reader :dedicated_file_name
|
665
|
-
#
|
682
|
+
# 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.
|
666
683
|
attr_reader :terminal_verification_results
|
667
|
-
# An indication of
|
684
|
+
# An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.
|
668
685
|
attr_reader :transaction_status_information
|
669
686
|
end
|
670
687
|
# Card brand. Can be `interac`, `mastercard` or `visa`.
|
@@ -699,7 +716,7 @@ module Stripe
|
|
699
716
|
attr_reader :network
|
700
717
|
# This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
|
701
718
|
attr_reader :network_transaction_id
|
702
|
-
# EMV tag 5F2D
|
719
|
+
# 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.
|
703
720
|
attr_reader :preferred_locales
|
704
721
|
# How card details were read in this transaction.
|
705
722
|
attr_reader :read_method
|
@@ -976,6 +993,10 @@ module Stripe
|
|
976
993
|
class WechatPay < Stripe::StripeObject
|
977
994
|
# Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
|
978
995
|
attr_reader :fingerprint
|
996
|
+
# ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
|
997
|
+
attr_reader :location
|
998
|
+
# ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
|
999
|
+
attr_reader :reader
|
979
1000
|
# Transaction ID of this particular WeChat Pay transaction.
|
980
1001
|
attr_reader :transaction_id
|
981
1002
|
end
|
@@ -1015,6 +1036,8 @@ module Stripe
|
|
1015
1036
|
attr_reader :card_present
|
1016
1037
|
# Attribute for field cashapp
|
1017
1038
|
attr_reader :cashapp
|
1039
|
+
# Attribute for field crypto
|
1040
|
+
attr_reader :crypto
|
1018
1041
|
# Attribute for field customer_balance
|
1019
1042
|
attr_reader :customer_balance
|
1020
1043
|
# Attribute for field eps
|
@@ -1634,9 +1657,9 @@ module Stripe
|
|
1634
1657
|
|
1635
1658
|
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
|
1636
1659
|
#
|
1637
|
-
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
|
1660
|
+
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
|
1638
1661
|
#
|
1639
|
-
# Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
|
1662
|
+
# Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
|
1640
1663
|
def capture(params = {}, opts = {})
|
1641
1664
|
request_stripe_object(
|
1642
1665
|
method: :post,
|
@@ -1648,9 +1671,9 @@ module Stripe
|
|
1648
1671
|
|
1649
1672
|
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
|
1650
1673
|
#
|
1651
|
-
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
|
1674
|
+
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
|
1652
1675
|
#
|
1653
|
-
# Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
|
1676
|
+
# Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
|
1654
1677
|
def self.capture(charge, params = {}, opts = {})
|
1655
1678
|
request_stripe_object(
|
1656
1679
|
method: :post,
|
@@ -1660,7 +1683,7 @@ module Stripe
|
|
1660
1683
|
)
|
1661
1684
|
end
|
1662
1685
|
|
1663
|
-
# This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
|
1686
|
+
# This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents)
|
1664
1687
|
# to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
|
1665
1688
|
# object used to request payment.
|
1666
1689
|
def self.create(params = {}, opts = {})
|
@@ -60,6 +60,8 @@ module Stripe
|
|
60
60
|
attr_reader :enabled
|
61
61
|
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
62
62
|
attr_reader :liability
|
63
|
+
# The tax provider powering automatic tax.
|
64
|
+
attr_reader :provider
|
63
65
|
# The status of the most recent automated tax calculation for this session.
|
64
66
|
attr_reader :status
|
65
67
|
end
|
@@ -232,7 +234,7 @@ module Stripe
|
|
232
234
|
end
|
233
235
|
|
234
236
|
class TaxId < Stripe::StripeObject
|
235
|
-
# The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
|
237
|
+
# The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
|
236
238
|
attr_reader :type
|
237
239
|
# The value of the tax ID.
|
238
240
|
attr_reader :value
|
@@ -675,6 +677,14 @@ module Stripe
|
|
675
677
|
class NaverPay < Stripe::StripeObject
|
676
678
|
# Controls when the funds will be captured from the customer's account.
|
677
679
|
attr_reader :capture_method
|
680
|
+
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
681
|
+
#
|
682
|
+
# 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.
|
683
|
+
#
|
684
|
+
# 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.
|
685
|
+
#
|
686
|
+
# 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).
|
687
|
+
attr_reader :setup_future_usage
|
678
688
|
end
|
679
689
|
|
680
690
|
class Oxxo < Stripe::StripeObject
|
@@ -1010,6 +1020,15 @@ module Stripe
|
|
1010
1020
|
attr_reader :breakdown
|
1011
1021
|
end
|
1012
1022
|
|
1023
|
+
class WalletOptions < Stripe::StripeObject
|
1024
|
+
class Link < Stripe::StripeObject
|
1025
|
+
# Describes whether Checkout should display Link. Defaults to `auto`.
|
1026
|
+
attr_reader :display
|
1027
|
+
end
|
1028
|
+
# Attribute for field link
|
1029
|
+
attr_reader :link
|
1030
|
+
end
|
1031
|
+
|
1013
1032
|
class ListParams < Stripe::RequestParams
|
1014
1033
|
class Created < Stripe::RequestParams
|
1015
1034
|
# Minimum value to filter by (exclusive)
|
@@ -2160,6 +2179,43 @@ module Stripe
|
|
2160
2179
|
end
|
2161
2180
|
|
2162
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
|
2163
2219
|
# Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
2164
2220
|
#
|
2165
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.
|
@@ -2168,9 +2224,12 @@ module Stripe
|
|
2168
2224
|
#
|
2169
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).
|
2170
2226
|
attr_accessor :setup_future_usage
|
2227
|
+
# Subscription details if the Checkout Session sets up a future subscription.
|
2228
|
+
attr_accessor :subscriptions
|
2171
2229
|
|
2172
|
-
def initialize(setup_future_usage: nil)
|
2230
|
+
def initialize(setup_future_usage: nil, subscriptions: nil)
|
2173
2231
|
@setup_future_usage = setup_future_usage
|
2232
|
+
@subscriptions = subscriptions
|
2174
2233
|
end
|
2175
2234
|
end
|
2176
2235
|
|
@@ -2309,8 +2368,7 @@ module Stripe
|
|
2309
2368
|
end
|
2310
2369
|
end
|
2311
2370
|
|
2312
|
-
class PayByBank < Stripe::RequestParams
|
2313
|
-
end
|
2371
|
+
class PayByBank < Stripe::RequestParams; end
|
2314
2372
|
|
2315
2373
|
class Payco < Stripe::RequestParams
|
2316
2374
|
# Controls when the funds will be captured from the customer's account.
|
@@ -2706,11 +2764,18 @@ module Stripe
|
|
2706
2764
|
class SavedPaymentMethodOptions < Stripe::RequestParams
|
2707
2765
|
# Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
|
2708
2766
|
attr_accessor :allow_redisplay_filters
|
2767
|
+
# Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
|
2768
|
+
attr_accessor :payment_method_remove
|
2709
2769
|
# Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
|
2710
2770
|
attr_accessor :payment_method_save
|
2711
2771
|
|
2712
|
-
def initialize(
|
2772
|
+
def initialize(
|
2773
|
+
allow_redisplay_filters: nil,
|
2774
|
+
payment_method_remove: nil,
|
2775
|
+
payment_method_save: nil
|
2776
|
+
)
|
2713
2777
|
@allow_redisplay_filters = allow_redisplay_filters
|
2778
|
+
@payment_method_remove = payment_method_remove
|
2714
2779
|
@payment_method_save = payment_method_save
|
2715
2780
|
end
|
2716
2781
|
end
|
@@ -2847,6 +2912,15 @@ module Stripe
|
|
2847
2912
|
end
|
2848
2913
|
|
2849
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
|
+
|
2850
2924
|
class InvoiceSettings < Stripe::RequestParams
|
2851
2925
|
class Issuer < Stripe::RequestParams
|
2852
2926
|
# The connected account being referenced when `type` is `account`.
|
@@ -2899,6 +2973,8 @@ module Stripe
|
|
2899
2973
|
attr_accessor :application_fee_percent
|
2900
2974
|
# A future timestamp to anchor the subscription's billing cycle for new subscriptions.
|
2901
2975
|
attr_accessor :billing_cycle_anchor
|
2976
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
2977
|
+
attr_accessor :billing_mode
|
2902
2978
|
# The tax rates that will apply to any subscription item that does not have
|
2903
2979
|
# `tax_rates` set. Invoices created will have their `default_tax_rates` populated
|
2904
2980
|
# from the subscription.
|
@@ -2917,12 +2993,9 @@ module Stripe
|
|
2917
2993
|
attr_accessor :proration_behavior
|
2918
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.
|
2919
2995
|
attr_accessor :transfer_data
|
2920
|
-
# Unix timestamp representing the end of the trial period the customer
|
2921
|
-
# will get before being charged for the first time. Has to be at least
|
2922
|
-
# 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.
|
2923
2997
|
attr_accessor :trial_end
|
2924
|
-
# Integer representing the number of trial period days before the
|
2925
|
-
# 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.
|
2926
2999
|
attr_accessor :trial_period_days
|
2927
3000
|
# Settings related to subscription trials.
|
2928
3001
|
attr_accessor :trial_settings
|
@@ -2930,6 +3003,7 @@ module Stripe
|
|
2930
3003
|
def initialize(
|
2931
3004
|
application_fee_percent: nil,
|
2932
3005
|
billing_cycle_anchor: nil,
|
3006
|
+
billing_mode: nil,
|
2933
3007
|
default_tax_rates: nil,
|
2934
3008
|
description: nil,
|
2935
3009
|
invoice_settings: nil,
|
@@ -2943,6 +3017,7 @@ module Stripe
|
|
2943
3017
|
)
|
2944
3018
|
@application_fee_percent = application_fee_percent
|
2945
3019
|
@billing_cycle_anchor = billing_cycle_anchor
|
3020
|
+
@billing_mode = billing_mode
|
2946
3021
|
@default_tax_rates = default_tax_rates
|
2947
3022
|
@description = description
|
2948
3023
|
@invoice_settings = invoice_settings
|
@@ -2967,6 +3042,23 @@ module Stripe
|
|
2967
3042
|
@required = required
|
2968
3043
|
end
|
2969
3044
|
end
|
3045
|
+
|
3046
|
+
class WalletOptions < Stripe::RequestParams
|
3047
|
+
class Link < Stripe::RequestParams
|
3048
|
+
# Specifies whether Checkout should display Link as a payment option. By default, Checkout will display all the supported wallets that the Checkout Session was created with. This is the `auto` behavior, and it is the default choice.
|
3049
|
+
attr_accessor :display
|
3050
|
+
|
3051
|
+
def initialize(display: nil)
|
3052
|
+
@display = display
|
3053
|
+
end
|
3054
|
+
end
|
3055
|
+
# contains details about the Link wallet options.
|
3056
|
+
attr_accessor :link
|
3057
|
+
|
3058
|
+
def initialize(link: nil)
|
3059
|
+
@link = link
|
3060
|
+
end
|
3061
|
+
end
|
2970
3062
|
# Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
|
2971
3063
|
attr_accessor :adaptive_pricing
|
2972
3064
|
# Configure actions after a Checkout Session has expired.
|
@@ -3029,7 +3121,7 @@ module Stripe
|
|
3029
3121
|
attr_accessor :expires_at
|
3030
3122
|
# Generate a post-purchase Invoice for one-time payments.
|
3031
3123
|
attr_accessor :invoice_creation
|
3032
|
-
# 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.
|
3033
3125
|
#
|
3034
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.
|
3035
3127
|
#
|
@@ -3076,9 +3168,9 @@ module Stripe
|
|
3076
3168
|
# prioritize the most relevant payment methods based on the customer's location and
|
3077
3169
|
# other characteristics.
|
3078
3170
|
attr_accessor :payment_method_types
|
3079
|
-
# This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
|
3171
|
+
# This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions.
|
3080
3172
|
#
|
3081
|
-
# For specific permissions, please refer to their dedicated subsections, such as `permissions.
|
3173
|
+
# For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
|
3082
3174
|
attr_accessor :permissions
|
3083
3175
|
# Controls phone number collection settings for the session.
|
3084
3176
|
#
|
@@ -3116,6 +3208,8 @@ module Stripe
|
|
3116
3208
|
attr_accessor :tax_id_collection
|
3117
3209
|
# The UI mode of the Session. Defaults to `hosted`.
|
3118
3210
|
attr_accessor :ui_mode
|
3211
|
+
# Wallet-specific configuration.
|
3212
|
+
attr_accessor :wallet_options
|
3119
3213
|
|
3120
3214
|
def initialize(
|
3121
3215
|
adaptive_pricing: nil,
|
@@ -3160,7 +3254,8 @@ module Stripe
|
|
3160
3254
|
subscription_data: nil,
|
3161
3255
|
success_url: nil,
|
3162
3256
|
tax_id_collection: nil,
|
3163
|
-
ui_mode: nil
|
3257
|
+
ui_mode: nil,
|
3258
|
+
wallet_options: nil
|
3164
3259
|
)
|
3165
3260
|
@adaptive_pricing = adaptive_pricing
|
3166
3261
|
@after_expiration = after_expiration
|
@@ -3205,6 +3300,7 @@ module Stripe
|
|
3205
3300
|
@success_url = success_url
|
3206
3301
|
@tax_id_collection = tax_id_collection
|
3207
3302
|
@ui_mode = ui_mode
|
3303
|
+
@wallet_options = wallet_options
|
3208
3304
|
end
|
3209
3305
|
end
|
3210
3306
|
|
@@ -3364,7 +3460,7 @@ module Stripe
|
|
3364
3460
|
@shipping_rate_data = shipping_rate_data
|
3365
3461
|
end
|
3366
3462
|
end
|
3367
|
-
# Information about the customer collected within the Checkout Session.
|
3463
|
+
# Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions.
|
3368
3464
|
attr_accessor :collected_information
|
3369
3465
|
# Specifies which fields in the response should be expanded.
|
3370
3466
|
attr_accessor :expand
|
@@ -3432,7 +3528,8 @@ module Stripe
|
|
3432
3528
|
# customer ID, a cart ID, or similar, and can be used to reconcile the
|
3433
3529
|
# Session with your internal systems.
|
3434
3530
|
attr_reader :client_reference_id
|
3435
|
-
# The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded`.
|
3531
|
+
# The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. For `ui_mode: embedded`, the client secret is to be used when initializing Stripe.js embedded checkout.
|
3532
|
+
# For `ui_mode: custom`, use the client secret with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end.
|
3436
3533
|
attr_reader :client_secret
|
3437
3534
|
# Information about the customer collected within the Checkout Session.
|
3438
3535
|
attr_reader :collected_information
|
@@ -3508,7 +3605,7 @@ module Stripe
|
|
3508
3605
|
attr_reader :payment_status
|
3509
3606
|
# This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
|
3510
3607
|
#
|
3511
|
-
# For specific permissions, please refer to their dedicated subsections, such as `permissions.
|
3608
|
+
# For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
|
3512
3609
|
attr_reader :permissions
|
3513
3610
|
# Attribute for field phone_number_collection
|
3514
3611
|
attr_reader :phone_number_collection
|
@@ -3518,7 +3615,7 @@ module Stripe
|
|
3518
3615
|
attr_reader :recovered_from
|
3519
3616
|
# This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
|
3520
3617
|
attr_reader :redirect_on_completion
|
3521
|
-
# Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
|
3618
|
+
# Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
|
3522
3619
|
attr_reader :return_url
|
3523
3620
|
# Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
|
3524
3621
|
attr_reader :saved_payment_method_options
|
@@ -3536,7 +3633,7 @@ module Stripe
|
|
3536
3633
|
# relevant text on the page, such as the submit button. `submit_type` can only be
|
3537
3634
|
# specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
|
3538
3635
|
attr_reader :submit_type
|
3539
|
-
# The ID of the
|
3636
|
+
# The ID of the [Subscription](https://stripe.com/docs/api/subscriptions) for Checkout Sessions in `subscription` mode.
|
3540
3637
|
attr_reader :subscription
|
3541
3638
|
# The URL the customer will be directed to after the payment or
|
3542
3639
|
# subscription creation is successful.
|
@@ -3550,6 +3647,8 @@ module Stripe
|
|
3550
3647
|
# The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`
|
3551
3648
|
# This value is only present when the session is active.
|
3552
3649
|
attr_reader :url
|
3650
|
+
# Wallet-specific configuration for this Checkout Session.
|
3651
|
+
attr_reader :wallet_options
|
3553
3652
|
|
3554
3653
|
# Creates a Checkout Session object.
|
3555
3654
|
def self.create(params = {}, opts = {})
|
@@ -3616,6 +3715,8 @@ module Stripe
|
|
3616
3715
|
end
|
3617
3716
|
|
3618
3717
|
# Updates a Checkout Session object.
|
3718
|
+
#
|
3719
|
+
# Related guide: [Dynamically update Checkout](https://docs.stripe.com/payments/checkout/dynamic-updates)
|
3619
3720
|
def self.update(session, params = {}, opts = {})
|
3620
3721
|
request_stripe_object(
|
3621
3722
|
method: :post,
|