stripe 15.2.0.pre.beta.1 → 15.3.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/CHANGELOG.md +92 -0
- data/CONTRIBUTING.md +25 -0
- data/OPENAPI_VERSION +1 -1
- data/README.md +10 -7
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/event_types.rb +9 -0
- data/lib/stripe/events/v2_core_account_link_completed_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +1 -1
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +1 -1
- data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
- data/lib/stripe/object_types.rb +1 -3
- data/lib/stripe/resources/account.rb +47 -20
- data/lib/stripe/resources/account_session.rb +85 -24
- 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 +1 -1
- data/lib/stripe/resources/capability.rb +1 -1
- data/lib/stripe/resources/charge.rb +85 -9
- data/lib/stripe/resources/checkout/session.rb +22 -6
- data/lib/stripe/resources/confirmation_token.rb +37 -97
- data/lib/stripe/resources/country_spec.rb +1 -1
- data/lib/stripe/resources/coupon.rb +1 -2
- data/lib/stripe/resources/credit_note.rb +10 -11
- data/lib/stripe/resources/customer.rb +2 -4
- data/lib/stripe/resources/customer_session.rb +3 -3
- data/lib/stripe/resources/dispute.rb +2 -2
- data/lib/stripe/resources/event.rb +1 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/financial_connections/account.rb +2 -0
- data/lib/stripe/resources/financial_connections/institution.rb +2 -0
- data/lib/stripe/resources/identity/verification_report.rb +6 -0
- data/lib/stripe/resources/identity/verification_session.rb +17 -11
- data/lib/stripe/resources/invoice.rb +70 -43
- data/lib/stripe/resources/invoice_item.rb +2 -3
- 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/order.rb +2 -55
- data/lib/stripe/resources/payment_attempt_record.rb +8 -0
- data/lib/stripe/resources/payment_intent.rb +439 -411
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +7 -0
- data/lib/stripe/resources/payment_method.rb +50 -113
- data/lib/stripe/resources/payment_method_configuration.rb +297 -2
- data/lib/stripe/resources/payment_method_domain.rb +2 -2
- data/lib/stripe/resources/payment_record.rb +8 -0
- data/lib/stripe/resources/payout.rb +4 -4
- data/lib/stripe/resources/person.rb +2 -2
- data/lib/stripe/resources/plan.rb +2 -3
- data/lib/stripe/resources/price.rb +1 -1
- data/lib/stripe/resources/privacy/redaction_job.rb +52 -29
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +12 -4
- data/lib/stripe/resources/product.rb +1 -61
- data/lib/stripe/resources/quote.rb +1 -1
- data/lib/stripe/resources/quote_preview_invoice.rb +2 -2
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +26 -1
- 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 +6 -1
- data/lib/stripe/resources/reversal.rb +1 -1
- data/lib/stripe/resources/review.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +123 -311
- data/lib/stripe/resources/source.rb +1 -1
- data/lib/stripe/resources/subscription.rb +132 -37
- data/lib/stripe/resources/subscription_item.rb +33 -0
- data/lib/stripe/resources/subscription_schedule.rb +120 -5
- data/lib/stripe/resources/tax/association.rb +8 -31
- data/lib/stripe/resources/tax/calculation.rb +4 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/registration.rb +1 -1
- data/lib/stripe/resources/tax_id.rb +1 -2
- data/lib/stripe/resources/tax_rate.rb +2 -2
- data/lib/stripe/resources/terminal/configuration.rb +1 -2
- data/lib/stripe/resources/terminal/location.rb +2 -3
- data/lib/stripe/resources/terminal/reader.rb +26 -4
- data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
- data/lib/stripe/resources/token.rb +2 -2
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources/v2/core/account.rb +5 -5
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -20
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -24
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +74 -0
- data/lib/stripe/resources/webhook_endpoint.rb +1 -2
- data/lib/stripe/resources.rb +8 -3
- data/lib/stripe/services/account_external_account_service.rb +2 -3
- data/lib/stripe/services/account_login_link_service.rb +1 -1
- data/lib/stripe/services/account_person_service.rb +1 -2
- data/lib/stripe/services/account_service.rb +38 -13
- data/lib/stripe/services/account_session_service.rb +49 -24
- data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
- data/lib/stripe/services/balance_service.rb +1 -1
- data/lib/stripe/services/balance_settings_service.rb +2 -2
- data/lib/stripe/services/charge_service.rb +76 -8
- data/lib/stripe/services/checkout/session_service.rb +14 -6
- data/lib/stripe/services/coupon_service.rb +1 -2
- data/lib/stripe/services/credit_note_service.rb +7 -8
- 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_source_service.rb +1 -1
- data/lib/stripe/services/customer_service.rb +3 -5
- data/lib/stripe/services/customer_tax_id_service.rb +1 -2
- data/lib/stripe/services/dispute_service.rb +1 -1
- data/lib/stripe/services/external_account_service.rb +2 -3
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +5 -5
- data/lib/stripe/services/invoice_item_service.rb +1 -2
- data/lib/stripe/services/invoice_service.rb +65 -35
- 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/order_service.rb +1 -33
- data/lib/stripe/services/payment_intent_service.rb +385 -386
- data/lib/stripe/services/payment_method_configuration_service.rb +212 -2
- data/lib/stripe/services/payment_method_domain_service.rb +1 -1
- data/lib/stripe/services/payment_method_service.rb +47 -110
- 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/privacy/redaction_job_service.rb +22 -13
- data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +1 -1
- data/lib/stripe/services/product_feature_service.rb +1 -2
- data/lib/stripe/services/product_service.rb +2 -41
- data/lib/stripe/services/promotion_code_service.rb +1 -1
- data/lib/stripe/services/quote_service.rb +1 -1
- 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/setup_intent_service.rb +122 -310
- data/lib/stripe/services/source_service.rb +1 -1
- data/lib/stripe/services/subscription_item_service.rb +26 -0
- data/lib/stripe/services/subscription_schedule_service.rb +94 -4
- data/lib/stripe/services/subscription_service.rb +103 -33
- data/lib/stripe/services/tax/calculation_service.rb +4 -0
- data/lib/stripe/services/tax/registration_service.rb +1 -1
- data/lib/stripe/services/tax_id_service.rb +1 -2
- 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 +17 -3
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +37 -97
- data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/transfer_service.rb +1 -1
- data/lib/stripe/services/v1_services.rb +1 -2
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
- data/lib/stripe/services/v2/core/accounts/person_service.rb +2 -4
- data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
- data/lib/stripe/services/v2/core/event_service.rb +1 -2
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +3 -7
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +2 -4
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +1 -2
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +1 -2
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +1 -1
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +1 -2
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +1 -2
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +2 -4
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +2 -4
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +2 -4
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +3 -7
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +1 -2
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +1 -2
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +1 -2
- data/lib/stripe/services/v2/money_management/transaction_service.rb +1 -2
- data/lib/stripe/services/v2/payment_service.rb +15 -0
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +138 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +1 -2
- data/lib/stripe/services/v2_services.rb +2 -1
- data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
- data/lib/stripe/services.rb +2 -3
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +3903 -4131
- metadata +13 -8
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- data/lib/stripe/resources/gift_cards/card.rb +0 -208
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
- data/lib/stripe/services/gift_cards/card_service.rb +0 -170
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
- data/lib/stripe/services/gift_cards_service.rb +0 -14
@@ -38,6 +38,13 @@ module Stripe
|
|
38
38
|
attr_reader :liability
|
39
39
|
end
|
40
40
|
|
41
|
+
class BillingThresholds < Stripe::StripeObject
|
42
|
+
# Monetary threshold that triggers the subscription to create an invoice
|
43
|
+
attr_reader :amount_gte
|
44
|
+
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
45
|
+
attr_reader :reset_billing_cycle_anchor
|
46
|
+
end
|
47
|
+
|
41
48
|
class InvoiceSettings < Stripe::StripeObject
|
42
49
|
class Issuer < Stripe::StripeObject
|
43
50
|
# The connected account being referenced when `type` is `account`.
|
@@ -65,6 +72,8 @@ module Stripe
|
|
65
72
|
attr_reader :automatic_tax
|
66
73
|
# Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
67
74
|
attr_reader :billing_cycle_anchor
|
75
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
76
|
+
attr_reader :billing_thresholds
|
68
77
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
69
78
|
attr_reader :collection_method
|
70
79
|
# ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -137,6 +146,13 @@ module Stripe
|
|
137
146
|
attr_reader :liability
|
138
147
|
end
|
139
148
|
|
149
|
+
class BillingThresholds < Stripe::StripeObject
|
150
|
+
# Monetary threshold that triggers the subscription to create an invoice
|
151
|
+
attr_reader :amount_gte
|
152
|
+
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
153
|
+
attr_reader :reset_billing_cycle_anchor
|
154
|
+
end
|
155
|
+
|
140
156
|
class Discount < Stripe::StripeObject
|
141
157
|
class DiscountEnd < Stripe::StripeObject
|
142
158
|
# The discount end timestamp.
|
@@ -170,6 +186,11 @@ module Stripe
|
|
170
186
|
end
|
171
187
|
|
172
188
|
class Item < Stripe::StripeObject
|
189
|
+
class BillingThresholds < Stripe::StripeObject
|
190
|
+
# Usage threshold that triggers the subscription to create an invoice
|
191
|
+
attr_reader :usage_gte
|
192
|
+
end
|
193
|
+
|
173
194
|
class Discount < Stripe::StripeObject
|
174
195
|
class DiscountEnd < Stripe::StripeObject
|
175
196
|
# The discount end timestamp.
|
@@ -193,6 +214,8 @@ module Stripe
|
|
193
214
|
# Determines the type of trial for this item.
|
194
215
|
attr_reader :type
|
195
216
|
end
|
217
|
+
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
218
|
+
attr_reader :billing_thresholds
|
196
219
|
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
197
220
|
attr_reader :discounts
|
198
221
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
|
@@ -237,6 +260,8 @@ module Stripe
|
|
237
260
|
attr_reader :automatic_tax
|
238
261
|
# Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
239
262
|
attr_reader :billing_cycle_anchor
|
263
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
264
|
+
attr_reader :billing_thresholds
|
240
265
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
241
266
|
attr_reader :collection_method
|
242
267
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
@@ -261,7 +286,7 @@ module Stripe
|
|
261
286
|
attr_reader :on_behalf_of
|
262
287
|
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
263
288
|
attr_reader :pause_collection
|
264
|
-
#
|
289
|
+
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
265
290
|
attr_reader :proration_behavior
|
266
291
|
# The start of this phase of the subscription schedule.
|
267
292
|
attr_reader :start_date
|
@@ -433,6 +458,18 @@ module Stripe
|
|
433
458
|
end
|
434
459
|
end
|
435
460
|
|
461
|
+
class BillingThresholds < Stripe::RequestParams
|
462
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
463
|
+
attr_accessor :amount_gte
|
464
|
+
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
465
|
+
attr_accessor :reset_billing_cycle_anchor
|
466
|
+
|
467
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
468
|
+
@amount_gte = amount_gte
|
469
|
+
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
436
473
|
class InvoiceSettings < Stripe::RequestParams
|
437
474
|
class Issuer < Stripe::RequestParams
|
438
475
|
# The connected account being referenced when `type` is `account`.
|
@@ -476,6 +513,8 @@ module Stripe
|
|
476
513
|
attr_accessor :automatic_tax
|
477
514
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
478
515
|
attr_accessor :billing_cycle_anchor
|
516
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
517
|
+
attr_accessor :billing_thresholds
|
479
518
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
480
519
|
attr_accessor :collection_method
|
481
520
|
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -493,6 +532,7 @@ module Stripe
|
|
493
532
|
application_fee_percent: nil,
|
494
533
|
automatic_tax: nil,
|
495
534
|
billing_cycle_anchor: nil,
|
535
|
+
billing_thresholds: nil,
|
496
536
|
collection_method: nil,
|
497
537
|
default_payment_method: nil,
|
498
538
|
description: nil,
|
@@ -503,6 +543,7 @@ module Stripe
|
|
503
543
|
@application_fee_percent = application_fee_percent
|
504
544
|
@automatic_tax = automatic_tax
|
505
545
|
@billing_cycle_anchor = billing_cycle_anchor
|
546
|
+
@billing_thresholds = billing_thresholds
|
506
547
|
@collection_method = collection_method
|
507
548
|
@default_payment_method = default_payment_method
|
508
549
|
@description = description
|
@@ -626,6 +667,18 @@ module Stripe
|
|
626
667
|
end
|
627
668
|
end
|
628
669
|
|
670
|
+
class BillingThresholds < Stripe::RequestParams
|
671
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
672
|
+
attr_accessor :amount_gte
|
673
|
+
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
674
|
+
attr_accessor :reset_billing_cycle_anchor
|
675
|
+
|
676
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
677
|
+
@amount_gte = amount_gte
|
678
|
+
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
679
|
+
end
|
680
|
+
end
|
681
|
+
|
629
682
|
class Discount < Stripe::RequestParams
|
630
683
|
class DiscountEnd < Stripe::RequestParams
|
631
684
|
class Duration < Stripe::RequestParams
|
@@ -696,6 +749,15 @@ module Stripe
|
|
696
749
|
end
|
697
750
|
|
698
751
|
class Item < Stripe::RequestParams
|
752
|
+
class BillingThresholds < Stripe::RequestParams
|
753
|
+
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
754
|
+
attr_accessor :usage_gte
|
755
|
+
|
756
|
+
def initialize(usage_gte: nil)
|
757
|
+
@usage_gte = usage_gte
|
758
|
+
end
|
759
|
+
end
|
760
|
+
|
699
761
|
class Discount < Stripe::RequestParams
|
700
762
|
class DiscountEnd < Stripe::RequestParams
|
701
763
|
class Duration < Stripe::RequestParams
|
@@ -792,6 +854,8 @@ module Stripe
|
|
792
854
|
@type = type
|
793
855
|
end
|
794
856
|
end
|
857
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
858
|
+
attr_accessor :billing_thresholds
|
795
859
|
# The coupons to redeem into discounts for the subscription item.
|
796
860
|
attr_accessor :discounts
|
797
861
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
@@ -810,6 +874,7 @@ module Stripe
|
|
810
874
|
attr_accessor :trial
|
811
875
|
|
812
876
|
def initialize(
|
877
|
+
billing_thresholds: nil,
|
813
878
|
discounts: nil,
|
814
879
|
metadata: nil,
|
815
880
|
plan: nil,
|
@@ -819,6 +884,7 @@ module Stripe
|
|
819
884
|
tax_rates: nil,
|
820
885
|
trial: nil
|
821
886
|
)
|
887
|
+
@billing_thresholds = billing_thresholds
|
822
888
|
@discounts = discounts
|
823
889
|
@metadata = metadata
|
824
890
|
@plan = plan
|
@@ -875,6 +941,8 @@ module Stripe
|
|
875
941
|
attr_accessor :automatic_tax
|
876
942
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
877
943
|
attr_accessor :billing_cycle_anchor
|
944
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
945
|
+
attr_accessor :billing_thresholds
|
878
946
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
879
947
|
attr_accessor :collection_method
|
880
948
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
@@ -901,7 +969,7 @@ module Stripe
|
|
901
969
|
attr_accessor :on_behalf_of
|
902
970
|
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
903
971
|
attr_accessor :pause_collection
|
904
|
-
#
|
972
|
+
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
905
973
|
attr_accessor :proration_behavior
|
906
974
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
907
975
|
attr_accessor :transfer_data
|
@@ -919,6 +987,7 @@ module Stripe
|
|
919
987
|
application_fee_percent: nil,
|
920
988
|
automatic_tax: nil,
|
921
989
|
billing_cycle_anchor: nil,
|
990
|
+
billing_thresholds: nil,
|
922
991
|
collection_method: nil,
|
923
992
|
currency: nil,
|
924
993
|
default_payment_method: nil,
|
@@ -943,6 +1012,7 @@ module Stripe
|
|
943
1012
|
@application_fee_percent = application_fee_percent
|
944
1013
|
@automatic_tax = automatic_tax
|
945
1014
|
@billing_cycle_anchor = billing_cycle_anchor
|
1015
|
+
@billing_thresholds = billing_thresholds
|
946
1016
|
@collection_method = collection_method
|
947
1017
|
@currency = currency
|
948
1018
|
@default_payment_method = default_payment_method
|
@@ -978,7 +1048,7 @@ module Stripe
|
|
978
1048
|
end
|
979
1049
|
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
980
1050
|
attr_accessor :billing_behavior
|
981
|
-
#
|
1051
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
982
1052
|
attr_accessor :billing_mode
|
983
1053
|
# The identifier of the customer to create the subscription schedule for.
|
984
1054
|
attr_accessor :customer
|
@@ -1055,6 +1125,18 @@ module Stripe
|
|
1055
1125
|
end
|
1056
1126
|
end
|
1057
1127
|
|
1128
|
+
class BillingThresholds < Stripe::RequestParams
|
1129
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1130
|
+
attr_accessor :amount_gte
|
1131
|
+
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
1132
|
+
attr_accessor :reset_billing_cycle_anchor
|
1133
|
+
|
1134
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
1135
|
+
@amount_gte = amount_gte
|
1136
|
+
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
1137
|
+
end
|
1138
|
+
end
|
1139
|
+
|
1058
1140
|
class InvoiceSettings < Stripe::RequestParams
|
1059
1141
|
class Issuer < Stripe::RequestParams
|
1060
1142
|
# The connected account being referenced when `type` is `account`.
|
@@ -1098,6 +1180,8 @@ module Stripe
|
|
1098
1180
|
attr_accessor :automatic_tax
|
1099
1181
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
1100
1182
|
attr_accessor :billing_cycle_anchor
|
1183
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
1184
|
+
attr_accessor :billing_thresholds
|
1101
1185
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
1102
1186
|
attr_accessor :collection_method
|
1103
1187
|
# ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
@@ -1115,6 +1199,7 @@ module Stripe
|
|
1115
1199
|
application_fee_percent: nil,
|
1116
1200
|
automatic_tax: nil,
|
1117
1201
|
billing_cycle_anchor: nil,
|
1202
|
+
billing_thresholds: nil,
|
1118
1203
|
collection_method: nil,
|
1119
1204
|
default_payment_method: nil,
|
1120
1205
|
description: nil,
|
@@ -1125,6 +1210,7 @@ module Stripe
|
|
1125
1210
|
@application_fee_percent = application_fee_percent
|
1126
1211
|
@automatic_tax = automatic_tax
|
1127
1212
|
@billing_cycle_anchor = billing_cycle_anchor
|
1213
|
+
@billing_thresholds = billing_thresholds
|
1128
1214
|
@collection_method = collection_method
|
1129
1215
|
@default_payment_method = default_payment_method
|
1130
1216
|
@description = description
|
@@ -1248,6 +1334,18 @@ module Stripe
|
|
1248
1334
|
end
|
1249
1335
|
end
|
1250
1336
|
|
1337
|
+
class BillingThresholds < Stripe::RequestParams
|
1338
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1339
|
+
attr_accessor :amount_gte
|
1340
|
+
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
|
1341
|
+
attr_accessor :reset_billing_cycle_anchor
|
1342
|
+
|
1343
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
|
1344
|
+
@amount_gte = amount_gte
|
1345
|
+
@reset_billing_cycle_anchor = reset_billing_cycle_anchor
|
1346
|
+
end
|
1347
|
+
end
|
1348
|
+
|
1251
1349
|
class Discount < Stripe::RequestParams
|
1252
1350
|
class DiscountEnd < Stripe::RequestParams
|
1253
1351
|
class Duration < Stripe::RequestParams
|
@@ -1318,6 +1416,15 @@ module Stripe
|
|
1318
1416
|
end
|
1319
1417
|
|
1320
1418
|
class Item < Stripe::RequestParams
|
1419
|
+
class BillingThresholds < Stripe::RequestParams
|
1420
|
+
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
1421
|
+
attr_accessor :usage_gte
|
1422
|
+
|
1423
|
+
def initialize(usage_gte: nil)
|
1424
|
+
@usage_gte = usage_gte
|
1425
|
+
end
|
1426
|
+
end
|
1427
|
+
|
1321
1428
|
class Discount < Stripe::RequestParams
|
1322
1429
|
class DiscountEnd < Stripe::RequestParams
|
1323
1430
|
class Duration < Stripe::RequestParams
|
@@ -1414,6 +1521,8 @@ module Stripe
|
|
1414
1521
|
@type = type
|
1415
1522
|
end
|
1416
1523
|
end
|
1524
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
1525
|
+
attr_accessor :billing_thresholds
|
1417
1526
|
# The coupons to redeem into discounts for the subscription item.
|
1418
1527
|
attr_accessor :discounts
|
1419
1528
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
@@ -1432,6 +1541,7 @@ module Stripe
|
|
1432
1541
|
attr_accessor :trial
|
1433
1542
|
|
1434
1543
|
def initialize(
|
1544
|
+
billing_thresholds: nil,
|
1435
1545
|
discounts: nil,
|
1436
1546
|
metadata: nil,
|
1437
1547
|
plan: nil,
|
@@ -1441,6 +1551,7 @@ module Stripe
|
|
1441
1551
|
tax_rates: nil,
|
1442
1552
|
trial: nil
|
1443
1553
|
)
|
1554
|
+
@billing_thresholds = billing_thresholds
|
1444
1555
|
@discounts = discounts
|
1445
1556
|
@metadata = metadata
|
1446
1557
|
@plan = plan
|
@@ -1497,6 +1608,8 @@ module Stripe
|
|
1497
1608
|
attr_accessor :automatic_tax
|
1498
1609
|
# Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
1499
1610
|
attr_accessor :billing_cycle_anchor
|
1611
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
1612
|
+
attr_accessor :billing_thresholds
|
1500
1613
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
|
1501
1614
|
attr_accessor :collection_method
|
1502
1615
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
@@ -1523,7 +1636,7 @@ module Stripe
|
|
1523
1636
|
attr_accessor :on_behalf_of
|
1524
1637
|
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
1525
1638
|
attr_accessor :pause_collection
|
1526
|
-
#
|
1639
|
+
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
1527
1640
|
attr_accessor :proration_behavior
|
1528
1641
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
1529
1642
|
attr_accessor :start_date
|
@@ -1543,6 +1656,7 @@ module Stripe
|
|
1543
1656
|
application_fee_percent: nil,
|
1544
1657
|
automatic_tax: nil,
|
1545
1658
|
billing_cycle_anchor: nil,
|
1659
|
+
billing_thresholds: nil,
|
1546
1660
|
collection_method: nil,
|
1547
1661
|
currency: nil,
|
1548
1662
|
default_payment_method: nil,
|
@@ -1568,6 +1682,7 @@ module Stripe
|
|
1568
1682
|
@application_fee_percent = application_fee_percent
|
1569
1683
|
@automatic_tax = automatic_tax
|
1570
1684
|
@billing_cycle_anchor = billing_cycle_anchor
|
1685
|
+
@billing_thresholds = billing_thresholds
|
1571
1686
|
@collection_method = collection_method
|
1572
1687
|
@currency = currency
|
1573
1688
|
@default_payment_method = default_payment_method
|
@@ -1616,7 +1731,7 @@ module Stripe
|
|
1616
1731
|
attr_accessor :phases
|
1617
1732
|
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1618
1733
|
attr_accessor :prebilling
|
1619
|
-
# If the update changes the current phase, indicates
|
1734
|
+
# If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
|
1620
1735
|
attr_accessor :proration_behavior
|
1621
1736
|
|
1622
1737
|
def initialize(
|
@@ -10,45 +10,24 @@ module Stripe
|
|
10
10
|
"tax.association"
|
11
11
|
end
|
12
12
|
|
13
|
-
class
|
13
|
+
class TaxTransactionAttempt < Stripe::StripeObject
|
14
14
|
class Committed < Stripe::StripeObject
|
15
|
-
class Reversal < Stripe::StripeObject
|
16
|
-
class StatusDetails < Stripe::StripeObject
|
17
|
-
class Committed < Stripe::StripeObject
|
18
|
-
# The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object)
|
19
|
-
attr_reader :transaction
|
20
|
-
end
|
21
|
-
|
22
|
-
class Errored < Stripe::StripeObject
|
23
|
-
# Details on why we could not commit the reversal Tax Transaction
|
24
|
-
attr_reader :reason
|
25
|
-
# The [Refund](https://stripe.com/docs/api/refunds/object) ID that should have created a tax reversal.
|
26
|
-
attr_reader :refund_id
|
27
|
-
end
|
28
|
-
# Attribute for field committed
|
29
|
-
attr_reader :committed
|
30
|
-
# Attribute for field errored
|
31
|
-
attr_reader :errored
|
32
|
-
end
|
33
|
-
# Status of the attempted Tax Transaction reversal.
|
34
|
-
attr_reader :status
|
35
|
-
# Attribute for field status_details
|
36
|
-
attr_reader :status_details
|
37
|
-
end
|
38
|
-
# Attempts to create Tax Transaction reversals
|
39
|
-
attr_reader :reversals
|
40
15
|
# The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object)
|
41
16
|
attr_reader :transaction
|
42
17
|
end
|
43
18
|
|
44
19
|
class Errored < Stripe::StripeObject
|
45
|
-
# Details on why we
|
20
|
+
# Details on why we couldn't commit the tax transaction.
|
46
21
|
attr_reader :reason
|
47
22
|
end
|
48
23
|
# Attribute for field committed
|
49
24
|
attr_reader :committed
|
50
25
|
# Attribute for field errored
|
51
26
|
attr_reader :errored
|
27
|
+
# The source of the tax transaction attempt. This is either a refund or a payment intent.
|
28
|
+
attr_reader :source
|
29
|
+
# The status of the transaction attempt. This can be `errored` or `committed`.
|
30
|
+
attr_reader :status
|
52
31
|
end
|
53
32
|
|
54
33
|
class FindParams < Stripe::RequestParams
|
@@ -70,10 +49,8 @@ module Stripe
|
|
70
49
|
attr_reader :object
|
71
50
|
# The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking.
|
72
51
|
attr_reader :payment_intent
|
73
|
-
#
|
74
|
-
attr_reader :
|
75
|
-
# Attribute for field status_details
|
76
|
-
attr_reader :status_details
|
52
|
+
# Information about the tax transactions linked to this payment intent
|
53
|
+
attr_reader :tax_transaction_attempts
|
77
54
|
|
78
55
|
# Finds a tax association object by PaymentIntent id.
|
79
56
|
def self.find(params = {}, opts = {})
|
@@ -240,6 +240,8 @@ module Stripe
|
|
240
240
|
# A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
241
241
|
# If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
|
242
242
|
attr_accessor :amount
|
243
|
+
# 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.
|
244
|
+
attr_accessor :metadata
|
243
245
|
# If provided, the product's `tax_code` will be used as the line item's `tax_code`.
|
244
246
|
attr_accessor :product
|
245
247
|
# The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.
|
@@ -253,6 +255,7 @@ module Stripe
|
|
253
255
|
|
254
256
|
def initialize(
|
255
257
|
amount: nil,
|
258
|
+
metadata: nil,
|
256
259
|
product: nil,
|
257
260
|
quantity: nil,
|
258
261
|
reference: nil,
|
@@ -260,6 +263,7 @@ module Stripe
|
|
260
263
|
tax_code: nil
|
261
264
|
)
|
262
265
|
@amount = amount
|
266
|
+
@metadata = metadata
|
263
267
|
@product = product
|
264
268
|
@quantity = quantity
|
265
269
|
@reference = reference
|
@@ -50,6 +50,8 @@ module Stripe
|
|
50
50
|
attr_reader :id
|
51
51
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
52
52
|
attr_reader :livemode
|
53
|
+
# 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.
|
54
|
+
attr_reader :metadata
|
53
55
|
# String representing the object's type. Objects of the same type share the same value.
|
54
56
|
attr_reader :object
|
55
57
|
# The ID of an existing [Product](https://stripe.com/docs/api/products/object).
|
@@ -2060,7 +2060,7 @@ module Stripe
|
|
2060
2060
|
|
2061
2061
|
class Us < Stripe::RequestParams
|
2062
2062
|
class LocalAmusementTax < Stripe::RequestParams
|
2063
|
-
# A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `64343` (River Grove), and `68081` (Schiller Park).
|
2063
|
+
# A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `48892` (Midlothian), `64343` (River Grove), and `68081` (Schiller Park).
|
2064
2064
|
attr_accessor :jurisdiction
|
2065
2065
|
|
2066
2066
|
def initialize(jurisdiction: nil)
|
@@ -2,9 +2,9 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Stripe
|
5
|
-
# Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
5
|
+
# Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
|
6
6
|
#
|
7
|
-
# Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
7
|
+
# Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
8
8
|
class TaxRate < APIResource
|
9
9
|
extend Stripe::APIOperations::Create
|
10
10
|
extend Stripe::APIOperations::List
|
@@ -261,8 +261,7 @@ module Stripe
|
|
261
261
|
attr_reader :type
|
262
262
|
end
|
263
263
|
|
264
|
-
class DeleteParams < Stripe::RequestParams
|
265
|
-
end
|
264
|
+
class DeleteParams < Stripe::RequestParams; end
|
266
265
|
|
267
266
|
class UpdateParams < Stripe::RequestParams
|
268
267
|
class BbposWiseposE < Stripe::RequestParams
|
@@ -32,8 +32,7 @@ module Stripe
|
|
32
32
|
attr_reader :state
|
33
33
|
end
|
34
34
|
|
35
|
-
class DeleteParams < Stripe::RequestParams
|
36
|
-
end
|
35
|
+
class DeleteParams < Stripe::RequestParams; end
|
37
36
|
|
38
37
|
class UpdateParams < Stripe::RequestParams
|
39
38
|
class Address < Stripe::RequestParams
|
@@ -184,7 +183,7 @@ module Stripe
|
|
184
183
|
attr_reader :deleted
|
185
184
|
|
186
185
|
# Creates a new Location object.
|
187
|
-
# For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
|
186
|
+
# For further details, including which address fields are required in each country, see the [Manage locations](https://docs.stripe.com/docs/terminal/fleet/locations) guide.
|
188
187
|
def self.create(params = {}, opts = {})
|
189
188
|
request_stripe_object(
|
190
189
|
method: :post,
|
@@ -140,8 +140,14 @@ module Stripe
|
|
140
140
|
end
|
141
141
|
|
142
142
|
class ConfirmPaymentIntent < Stripe::StripeObject
|
143
|
+
class ConfirmConfig < Stripe::StripeObject
|
144
|
+
# If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion.
|
145
|
+
attr_reader :return_url
|
146
|
+
end
|
143
147
|
# Account the payment intent belongs to.
|
144
148
|
attr_reader :account
|
149
|
+
# Represents a per-transaction override of a reader configuration
|
150
|
+
attr_reader :confirm_config
|
145
151
|
# Most recent PaymentIntent processed by the reader.
|
146
152
|
attr_reader :payment_intent
|
147
153
|
end
|
@@ -154,6 +160,8 @@ module Stripe
|
|
154
160
|
end
|
155
161
|
# Enable customer initiated cancellation when processing this payment.
|
156
162
|
attr_reader :enable_customer_cancellation
|
163
|
+
# If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion.
|
164
|
+
attr_reader :return_url
|
157
165
|
# Override showing a tipping selection screen on this transaction.
|
158
166
|
attr_reader :skip_tipping
|
159
167
|
# Represents a per-transaction tipping configuration
|
@@ -255,8 +263,7 @@ module Stripe
|
|
255
263
|
attr_reader :type
|
256
264
|
end
|
257
265
|
|
258
|
-
class DeleteParams < Stripe::RequestParams
|
259
|
-
end
|
266
|
+
class DeleteParams < Stripe::RequestParams; end
|
260
267
|
|
261
268
|
class UpdateParams < Stripe::RequestParams
|
262
269
|
# Specifies which fields in the response should be expanded.
|
@@ -484,12 +491,23 @@ module Stripe
|
|
484
491
|
end
|
485
492
|
|
486
493
|
class ConfirmPaymentIntentParams < Stripe::RequestParams
|
494
|
+
class ConfirmConfig < Stripe::RequestParams
|
495
|
+
# The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
|
496
|
+
attr_accessor :return_url
|
497
|
+
|
498
|
+
def initialize(return_url: nil)
|
499
|
+
@return_url = return_url
|
500
|
+
end
|
501
|
+
end
|
502
|
+
# Configuration overrides
|
503
|
+
attr_accessor :confirm_config
|
487
504
|
# Specifies which fields in the response should be expanded.
|
488
505
|
attr_accessor :expand
|
489
506
|
# PaymentIntent ID
|
490
507
|
attr_accessor :payment_intent
|
491
508
|
|
492
|
-
def initialize(expand: nil, payment_intent: nil)
|
509
|
+
def initialize(confirm_config: nil, expand: nil, payment_intent: nil)
|
510
|
+
@confirm_config = confirm_config
|
493
511
|
@expand = expand
|
494
512
|
@payment_intent = payment_intent
|
495
513
|
end
|
@@ -509,6 +527,8 @@ module Stripe
|
|
509
527
|
attr_accessor :allow_redisplay
|
510
528
|
# Enables cancel button on transaction screens.
|
511
529
|
attr_accessor :enable_customer_cancellation
|
530
|
+
# The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
|
531
|
+
attr_accessor :return_url
|
512
532
|
# Override showing a tipping selection screen on this transaction.
|
513
533
|
attr_accessor :skip_tipping
|
514
534
|
# Tipping configuration for this transaction.
|
@@ -517,11 +537,13 @@ module Stripe
|
|
517
537
|
def initialize(
|
518
538
|
allow_redisplay: nil,
|
519
539
|
enable_customer_cancellation: nil,
|
540
|
+
return_url: nil,
|
520
541
|
skip_tipping: nil,
|
521
542
|
tipping: nil
|
522
543
|
)
|
523
544
|
@allow_redisplay = allow_redisplay
|
524
545
|
@enable_customer_cancellation = enable_customer_cancellation
|
546
|
+
@return_url = return_url
|
525
547
|
@skip_tipping = skip_tipping
|
526
548
|
@tipping = tipping
|
527
549
|
end
|
@@ -727,7 +749,7 @@ module Stripe
|
|
727
749
|
attr_reader :action
|
728
750
|
# The current software version of the reader.
|
729
751
|
attr_reader :device_sw_version
|
730
|
-
#
|
752
|
+
# Device type of the reader.
|
731
753
|
attr_reader :device_type
|
732
754
|
# Unique identifier for the object.
|
733
755
|
attr_reader :id
|
@@ -25,8 +25,7 @@ module Stripe
|
|
25
25
|
attr_reader :advancing
|
26
26
|
end
|
27
27
|
|
28
|
-
class DeleteParams < Stripe::RequestParams
|
29
|
-
end
|
28
|
+
class DeleteParams < Stripe::RequestParams; end
|
30
29
|
|
31
30
|
class ListParams < Stripe::RequestParams
|
32
31
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|