stripe 15.1.0 → 15.2.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/CHANGELOG.md +34 -6
- 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/resources/account.rb +47 -20
- data/lib/stripe/resources/account_session.rb +111 -7
- 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 +13 -5
- data/lib/stripe/resources/checkout/session.rb +20 -4
- data/lib/stripe/resources/confirmation_token.rb +33 -87
- data/lib/stripe/resources/country_spec.rb +1 -1
- data/lib/stripe/resources/coupon.rb +1 -2
- data/lib/stripe/resources/credit_note.rb +12 -9
- 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/identity/verification_report.rb +6 -0
- data/lib/stripe/resources/identity/verification_session.rb +17 -11
- data/lib/stripe/resources/invoice.rb +114 -27
- 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/payment_intent.rb +196 -302
- data/lib/stripe/resources/payment_method.rb +46 -103
- data/lib/stripe/resources/payment_method_configuration.rb +297 -2
- data/lib/stripe/resources/payment_method_domain.rb +2 -2
- 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/product.rb +1 -2
- 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 +111 -281
- data/lib/stripe/resources/source.rb +1 -1
- data/lib/stripe/resources/subscription.rb +89 -29
- data/lib/stripe/resources/subscription_item.rb +33 -0
- data/lib/stripe/resources/subscription_schedule.rb +119 -4
- 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 +275 -3
- 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/webhook_endpoint.rb +1 -2
- 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 +75 -7
- data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
- data/lib/stripe/services/balance_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +4 -4
- data/lib/stripe/services/checkout/session_service.rb +11 -3
- 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/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 +92 -23
- 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/payment_intent_service.rb +176 -292
- 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 +43 -100
- 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 +2 -3
- data/lib/stripe/services/promotion_code_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 +110 -280
- 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 +93 -3
- data/lib/stripe/services/subscription_service.rb +77 -26
- 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 +106 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +33 -87
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
- 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/v2/billing/meter_event_session_service.rb +1 -2
- 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/webhook_endpoint_service.rb +1 -2
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe/resources/account.rbi +46 -23
- data/rbi/stripe/resources/account_session.rbi +131 -12
- 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 +1 -1
- data/rbi/stripe/resources/capability.rbi +1 -1
- data/rbi/stripe/resources/charge.rbi +17 -5
- data/rbi/stripe/resources/checkout/session.rbi +22 -6
- data/rbi/stripe/resources/confirmation_token.rbi +33 -99
- data/rbi/stripe/resources/country_spec.rbi +1 -1
- data/rbi/stripe/resources/coupon.rbi +1 -3
- data/rbi/stripe/resources/credit_note.rbi +14 -9
- data/rbi/stripe/resources/customer.rbi +2 -6
- data/rbi/stripe/resources/customer_session.rbi +3 -3
- data/rbi/stripe/resources/dispute.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +1 -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 +20 -11
- data/rbi/stripe/resources/invoice.rbi +109 -33
- data/rbi/stripe/resources/invoice_item.rbi +2 -4
- data/rbi/stripe/resources/invoice_line_item.rbi +1 -1
- 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/payment_intent.rbi +201 -349
- data/rbi/stripe/resources/payment_method.rbi +46 -116
- data/rbi/stripe/resources/payment_method_configuration.rbi +334 -4
- data/rbi/stripe/resources/payment_method_domain.rbi +2 -2
- data/rbi/stripe/resources/payout.rbi +4 -4
- data/rbi/stripe/resources/person.rbi +2 -2
- 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/radar/value_list.rbi +1 -3
- data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
- data/rbi/stripe/resources/refund.rbi +5 -1
- data/rbi/stripe/resources/reversal.rbi +1 -1
- data/rbi/stripe/resources/review.rbi +1 -1
- data/rbi/stripe/resources/setup_intent.rbi +111 -325
- data/rbi/stripe/resources/source.rbi +1 -1
- data/rbi/stripe/resources/subscription.rbi +99 -36
- data/rbi/stripe/resources/subscription_item.rbi +36 -2
- data/rbi/stripe/resources/subscription_schedule.rbi +138 -10
- data/rbi/stripe/resources/tax/calculation.rbi +5 -1
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +3 -0
- data/rbi/stripe/resources/tax/registration.rbi +1 -1
- data/rbi/stripe/resources/tax_id.rbi +1 -3
- data/rbi/stripe/resources/tax_rate.rbi +2 -2
- data/rbi/stripe/resources/terminal/configuration.rbi +1 -3
- data/rbi/stripe/resources/terminal/location.rbi +2 -4
- data/rbi/stripe/resources/terminal/reader.rbi +265 -5
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
- data/rbi/stripe/resources/token.rbi +2 -2
- data/rbi/stripe/resources/transfer.rbi +1 -1
- data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
- data/rbi/stripe/services/account_external_account_service.rbi +2 -4
- data/rbi/stripe/services/account_login_link_service.rbi +1 -1
- data/rbi/stripe/services/account_person_service.rbi +1 -3
- data/rbi/stripe/services/account_service.rbi +40 -16
- data/rbi/stripe/services/account_session_service.rbi +86 -12
- 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/charge_service.rbi +4 -4
- data/rbi/stripe/services/checkout/session_service.rbi +12 -5
- data/rbi/stripe/services/coupon_service.rbi +1 -3
- data/rbi/stripe/services/credit_note_service.rbi +7 -8
- 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_source_service.rbi +1 -1
- data/rbi/stripe/services/customer_service.rbi +3 -7
- data/rbi/stripe/services/customer_tax_id_service.rbi +1 -3
- 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 +5 -5
- data/rbi/stripe/services/invoice_item_service.rbi +1 -3
- data/rbi/stripe/services/invoice_service.rbi +90 -29
- 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 +179 -339
- data/rbi/stripe/services/payment_method_configuration_service.rbi +236 -4
- data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
- data/rbi/stripe/services/payment_method_service.rbi +43 -113
- 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/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 +110 -324
- 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 +107 -9
- data/rbi/stripe/services/subscription_service.rbi +85 -33
- data/rbi/stripe/services/tax/calculation_service.rbi +5 -1
- data/rbi/stripe/services/tax/registration_service.rbi +1 -1
- data/rbi/stripe/services/tax_id_service.rbi +1 -3
- data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
- data/rbi/stripe/services/terminal/location_service.rbi +2 -4
- data/rbi/stripe/services/terminal/reader_service.rbi +115 -4
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +33 -99
- 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 +1 -1
- data/rbi/stripe/services/transfer_service.rbi +1 -1
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +4 -12
- data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
- data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
- metadata +3 -2
@@ -35,6 +35,14 @@ module Stripe
|
|
35
35
|
sig { returns(T.nilable(Liability)) }
|
36
36
|
attr_reader :liability
|
37
37
|
end
|
38
|
+
class BillingThresholds < Stripe::StripeObject
|
39
|
+
# Monetary threshold that triggers the subscription to create an invoice
|
40
|
+
sig { returns(T.nilable(Integer)) }
|
41
|
+
attr_reader :amount_gte
|
42
|
+
# 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`.
|
43
|
+
sig { returns(T.nilable(T::Boolean)) }
|
44
|
+
attr_reader :reset_billing_cycle_anchor
|
45
|
+
end
|
38
46
|
class InvoiceSettings < Stripe::StripeObject
|
39
47
|
class Issuer < Stripe::StripeObject
|
40
48
|
# The connected account being referenced when `type` is `account`.
|
@@ -71,6 +79,9 @@ module Stripe
|
|
71
79
|
# 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).
|
72
80
|
sig { returns(String) }
|
73
81
|
attr_reader :billing_cycle_anchor
|
82
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
83
|
+
sig { returns(T.nilable(BillingThresholds)) }
|
84
|
+
attr_reader :billing_thresholds
|
74
85
|
# 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`.
|
75
86
|
sig { returns(T.nilable(String)) }
|
76
87
|
attr_reader :collection_method
|
@@ -135,6 +146,14 @@ module Stripe
|
|
135
146
|
sig { returns(T.nilable(Liability)) }
|
136
147
|
attr_reader :liability
|
137
148
|
end
|
149
|
+
class BillingThresholds < Stripe::StripeObject
|
150
|
+
# Monetary threshold that triggers the subscription to create an invoice
|
151
|
+
sig { returns(T.nilable(Integer)) }
|
152
|
+
attr_reader :amount_gte
|
153
|
+
# 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`.
|
154
|
+
sig { returns(T.nilable(T::Boolean)) }
|
155
|
+
attr_reader :reset_billing_cycle_anchor
|
156
|
+
end
|
138
157
|
class Discount < Stripe::StripeObject
|
139
158
|
# ID of the coupon to create a new discount for.
|
140
159
|
sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
|
@@ -166,6 +185,11 @@ module Stripe
|
|
166
185
|
attr_reader :issuer
|
167
186
|
end
|
168
187
|
class Item < Stripe::StripeObject
|
188
|
+
class BillingThresholds < Stripe::StripeObject
|
189
|
+
# Usage threshold that triggers the subscription to create an invoice
|
190
|
+
sig { returns(T.nilable(Integer)) }
|
191
|
+
attr_reader :usage_gte
|
192
|
+
end
|
169
193
|
class Discount < Stripe::StripeObject
|
170
194
|
# ID of the coupon to create a new discount for.
|
171
195
|
sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
|
@@ -177,6 +201,9 @@ module Stripe
|
|
177
201
|
sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
|
178
202
|
attr_reader :promotion_code
|
179
203
|
end
|
204
|
+
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
205
|
+
sig { returns(T.nilable(BillingThresholds)) }
|
206
|
+
attr_reader :billing_thresholds
|
180
207
|
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
181
208
|
sig { returns(T::Array[Discount]) }
|
182
209
|
attr_reader :discounts
|
@@ -216,6 +243,9 @@ module Stripe
|
|
216
243
|
# 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).
|
217
244
|
sig { returns(T.nilable(String)) }
|
218
245
|
attr_reader :billing_cycle_anchor
|
246
|
+
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
247
|
+
sig { returns(T.nilable(BillingThresholds)) }
|
248
|
+
attr_reader :billing_thresholds
|
219
249
|
# 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`.
|
220
250
|
sig { returns(T.nilable(String)) }
|
221
251
|
attr_reader :collection_method
|
@@ -249,7 +279,7 @@ module Stripe
|
|
249
279
|
# The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
|
250
280
|
sig { returns(T.nilable(T.any(String, Stripe::Account))) }
|
251
281
|
attr_reader :on_behalf_of
|
252
|
-
#
|
282
|
+
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
253
283
|
sig { returns(String) }
|
254
284
|
attr_reader :proration_behavior
|
255
285
|
# The start of this phase of the subscription schedule.
|
@@ -469,6 +499,18 @@ module Stripe
|
|
469
499
|
}
|
470
500
|
def initialize(enabled: nil, liability: nil); end
|
471
501
|
end
|
502
|
+
class BillingThresholds < Stripe::RequestParams
|
503
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
504
|
+
sig { returns(T.nilable(Integer)) }
|
505
|
+
attr_accessor :amount_gte
|
506
|
+
# 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.
|
507
|
+
sig { returns(T.nilable(T::Boolean)) }
|
508
|
+
attr_accessor :reset_billing_cycle_anchor
|
509
|
+
sig {
|
510
|
+
params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
|
511
|
+
}
|
512
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
513
|
+
end
|
472
514
|
class InvoiceSettings < Stripe::RequestParams
|
473
515
|
class Issuer < Stripe::RequestParams
|
474
516
|
# The connected account being referenced when `type` is `account`.
|
@@ -517,6 +559,11 @@ module Stripe
|
|
517
559
|
# 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).
|
518
560
|
sig { returns(T.nilable(String)) }
|
519
561
|
attr_accessor :billing_cycle_anchor
|
562
|
+
# 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.
|
563
|
+
sig {
|
564
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds))))
|
565
|
+
}
|
566
|
+
attr_accessor :billing_thresholds
|
520
567
|
# 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.
|
521
568
|
sig { returns(T.nilable(String)) }
|
522
569
|
attr_accessor :collection_method
|
@@ -540,12 +587,13 @@ module Stripe
|
|
540
587
|
}
|
541
588
|
attr_accessor :transfer_data
|
542
589
|
sig {
|
543
|
-
params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)))).void
|
590
|
+
params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds))), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)))).void
|
544
591
|
}
|
545
592
|
def initialize(
|
546
593
|
application_fee_percent: nil,
|
547
594
|
automatic_tax: nil,
|
548
595
|
billing_cycle_anchor: nil,
|
596
|
+
billing_thresholds: nil,
|
549
597
|
collection_method: nil,
|
550
598
|
default_payment_method: nil,
|
551
599
|
description: nil,
|
@@ -652,6 +700,18 @@ module Stripe
|
|
652
700
|
}
|
653
701
|
def initialize(enabled: nil, liability: nil); end
|
654
702
|
end
|
703
|
+
class BillingThresholds < Stripe::RequestParams
|
704
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
705
|
+
sig { returns(T.nilable(Integer)) }
|
706
|
+
attr_accessor :amount_gte
|
707
|
+
# 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.
|
708
|
+
sig { returns(T.nilable(T::Boolean)) }
|
709
|
+
attr_accessor :reset_billing_cycle_anchor
|
710
|
+
sig {
|
711
|
+
params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
|
712
|
+
}
|
713
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
714
|
+
end
|
655
715
|
class Discount < Stripe::RequestParams
|
656
716
|
# ID of the coupon to create a new discount for.
|
657
717
|
sig { returns(T.nilable(String)) }
|
@@ -695,6 +755,13 @@ module Stripe
|
|
695
755
|
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
|
696
756
|
end
|
697
757
|
class Item < Stripe::RequestParams
|
758
|
+
class BillingThresholds < Stripe::RequestParams
|
759
|
+
# 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))
|
760
|
+
sig { returns(Integer) }
|
761
|
+
attr_accessor :usage_gte
|
762
|
+
sig { params(usage_gte: Integer).void }
|
763
|
+
def initialize(usage_gte: nil); end
|
764
|
+
end
|
698
765
|
class Discount < Stripe::RequestParams
|
699
766
|
# ID of the coupon to create a new discount for.
|
700
767
|
sig { returns(T.nilable(String)) }
|
@@ -753,6 +820,11 @@ module Stripe
|
|
753
820
|
unit_amount_decimal: nil
|
754
821
|
); end
|
755
822
|
end
|
823
|
+
# 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.
|
824
|
+
sig {
|
825
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds))))
|
826
|
+
}
|
827
|
+
attr_accessor :billing_thresholds
|
756
828
|
# The coupons to redeem into discounts for the subscription item.
|
757
829
|
sig {
|
758
830
|
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))))
|
@@ -779,9 +851,10 @@ module Stripe
|
|
779
851
|
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
780
852
|
attr_accessor :tax_rates
|
781
853
|
sig {
|
782
|
-
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
854
|
+
params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds))), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
783
855
|
}
|
784
856
|
def initialize(
|
857
|
+
billing_thresholds: nil,
|
785
858
|
discounts: nil,
|
786
859
|
metadata: nil,
|
787
860
|
plan: nil,
|
@@ -817,6 +890,11 @@ module Stripe
|
|
817
890
|
# 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).
|
818
891
|
sig { returns(T.nilable(String)) }
|
819
892
|
attr_accessor :billing_cycle_anchor
|
893
|
+
# 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.
|
894
|
+
sig {
|
895
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds))))
|
896
|
+
}
|
897
|
+
attr_accessor :billing_thresholds
|
820
898
|
# 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.
|
821
899
|
sig { returns(T.nilable(String)) }
|
822
900
|
attr_accessor :collection_method
|
@@ -857,7 +935,7 @@ module Stripe
|
|
857
935
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
858
936
|
sig { returns(T.nilable(String)) }
|
859
937
|
attr_accessor :on_behalf_of
|
860
|
-
#
|
938
|
+
# 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.
|
861
939
|
sig { returns(T.nilable(String)) }
|
862
940
|
attr_accessor :proration_behavior
|
863
941
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
@@ -872,13 +950,14 @@ module Stripe
|
|
872
950
|
sig { returns(T.nilable(Integer)) }
|
873
951
|
attr_accessor :trial_end
|
874
952
|
sig {
|
875
|
-
params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
|
953
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
|
876
954
|
}
|
877
955
|
def initialize(
|
878
956
|
add_invoice_items: nil,
|
879
957
|
application_fee_percent: nil,
|
880
958
|
automatic_tax: nil,
|
881
959
|
billing_cycle_anchor: nil,
|
960
|
+
billing_thresholds: nil,
|
882
961
|
collection_method: nil,
|
883
962
|
currency: nil,
|
884
963
|
default_payment_method: nil,
|
@@ -961,6 +1040,18 @@ module Stripe
|
|
961
1040
|
}
|
962
1041
|
def initialize(enabled: nil, liability: nil); end
|
963
1042
|
end
|
1043
|
+
class BillingThresholds < Stripe::RequestParams
|
1044
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1045
|
+
sig { returns(T.nilable(Integer)) }
|
1046
|
+
attr_accessor :amount_gte
|
1047
|
+
# 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.
|
1048
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1049
|
+
attr_accessor :reset_billing_cycle_anchor
|
1050
|
+
sig {
|
1051
|
+
params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
|
1052
|
+
}
|
1053
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
1054
|
+
end
|
964
1055
|
class InvoiceSettings < Stripe::RequestParams
|
965
1056
|
class Issuer < Stripe::RequestParams
|
966
1057
|
# The connected account being referenced when `type` is `account`.
|
@@ -1009,6 +1100,11 @@ module Stripe
|
|
1009
1100
|
# 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).
|
1010
1101
|
sig { returns(T.nilable(String)) }
|
1011
1102
|
attr_accessor :billing_cycle_anchor
|
1103
|
+
# 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.
|
1104
|
+
sig {
|
1105
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds))))
|
1106
|
+
}
|
1107
|
+
attr_accessor :billing_thresholds
|
1012
1108
|
# 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.
|
1013
1109
|
sig { returns(T.nilable(String)) }
|
1014
1110
|
attr_accessor :collection_method
|
@@ -1032,12 +1128,13 @@ module Stripe
|
|
1032
1128
|
}
|
1033
1129
|
attr_accessor :transfer_data
|
1034
1130
|
sig {
|
1035
|
-
params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)))).void
|
1131
|
+
params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds))), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)))).void
|
1036
1132
|
}
|
1037
1133
|
def initialize(
|
1038
1134
|
application_fee_percent: nil,
|
1039
1135
|
automatic_tax: nil,
|
1040
1136
|
billing_cycle_anchor: nil,
|
1137
|
+
billing_thresholds: nil,
|
1041
1138
|
collection_method: nil,
|
1042
1139
|
default_payment_method: nil,
|
1043
1140
|
description: nil,
|
@@ -1144,6 +1241,18 @@ module Stripe
|
|
1144
1241
|
}
|
1145
1242
|
def initialize(enabled: nil, liability: nil); end
|
1146
1243
|
end
|
1244
|
+
class BillingThresholds < Stripe::RequestParams
|
1245
|
+
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1246
|
+
sig { returns(T.nilable(Integer)) }
|
1247
|
+
attr_accessor :amount_gte
|
1248
|
+
# 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.
|
1249
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1250
|
+
attr_accessor :reset_billing_cycle_anchor
|
1251
|
+
sig {
|
1252
|
+
params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
|
1253
|
+
}
|
1254
|
+
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
1255
|
+
end
|
1147
1256
|
class Discount < Stripe::RequestParams
|
1148
1257
|
# ID of the coupon to create a new discount for.
|
1149
1258
|
sig { returns(T.nilable(String)) }
|
@@ -1187,6 +1296,13 @@ module Stripe
|
|
1187
1296
|
def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
|
1188
1297
|
end
|
1189
1298
|
class Item < Stripe::RequestParams
|
1299
|
+
class BillingThresholds < Stripe::RequestParams
|
1300
|
+
# 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))
|
1301
|
+
sig { returns(Integer) }
|
1302
|
+
attr_accessor :usage_gte
|
1303
|
+
sig { params(usage_gte: Integer).void }
|
1304
|
+
def initialize(usage_gte: nil); end
|
1305
|
+
end
|
1190
1306
|
class Discount < Stripe::RequestParams
|
1191
1307
|
# ID of the coupon to create a new discount for.
|
1192
1308
|
sig { returns(T.nilable(String)) }
|
@@ -1245,6 +1361,11 @@ module Stripe
|
|
1245
1361
|
unit_amount_decimal: nil
|
1246
1362
|
); end
|
1247
1363
|
end
|
1364
|
+
# 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.
|
1365
|
+
sig {
|
1366
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds))))
|
1367
|
+
}
|
1368
|
+
attr_accessor :billing_thresholds
|
1248
1369
|
# The coupons to redeem into discounts for the subscription item.
|
1249
1370
|
sig {
|
1250
1371
|
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))))
|
@@ -1271,9 +1392,10 @@ module Stripe
|
|
1271
1392
|
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1272
1393
|
attr_accessor :tax_rates
|
1273
1394
|
sig {
|
1274
|
-
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1395
|
+
params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds))), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1275
1396
|
}
|
1276
1397
|
def initialize(
|
1398
|
+
billing_thresholds: nil,
|
1277
1399
|
discounts: nil,
|
1278
1400
|
metadata: nil,
|
1279
1401
|
plan: nil,
|
@@ -1309,6 +1431,11 @@ module Stripe
|
|
1309
1431
|
# 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).
|
1310
1432
|
sig { returns(T.nilable(String)) }
|
1311
1433
|
attr_accessor :billing_cycle_anchor
|
1434
|
+
# 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.
|
1435
|
+
sig {
|
1436
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds))))
|
1437
|
+
}
|
1438
|
+
attr_accessor :billing_thresholds
|
1312
1439
|
# 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.
|
1313
1440
|
sig { returns(T.nilable(String)) }
|
1314
1441
|
attr_accessor :collection_method
|
@@ -1349,7 +1476,7 @@ module Stripe
|
|
1349
1476
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1350
1477
|
sig { returns(T.nilable(String)) }
|
1351
1478
|
attr_accessor :on_behalf_of
|
1352
|
-
#
|
1479
|
+
# 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.
|
1353
1480
|
sig { returns(T.nilable(String)) }
|
1354
1481
|
attr_accessor :proration_behavior
|
1355
1482
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1367,13 +1494,14 @@ module Stripe
|
|
1367
1494
|
sig { returns(T.nilable(T.any(Integer, String))) }
|
1368
1495
|
attr_accessor :trial_end
|
1369
1496
|
sig {
|
1370
|
-
params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
|
1497
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
|
1371
1498
|
}
|
1372
1499
|
def initialize(
|
1373
1500
|
add_invoice_items: nil,
|
1374
1501
|
application_fee_percent: nil,
|
1375
1502
|
automatic_tax: nil,
|
1376
1503
|
billing_cycle_anchor: nil,
|
1504
|
+
billing_thresholds: nil,
|
1377
1505
|
collection_method: nil,
|
1378
1506
|
currency: nil,
|
1379
1507
|
default_payment_method: nil,
|
@@ -1408,7 +1536,7 @@ module Stripe
|
|
1408
1536
|
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
|
1409
1537
|
sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase])) }
|
1410
1538
|
attr_accessor :phases
|
1411
|
-
# If the update changes the current phase, indicates
|
1539
|
+
# 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`.
|
1412
1540
|
sig { returns(T.nilable(String)) }
|
1413
1541
|
attr_accessor :proration_behavior
|
1414
1542
|
sig {
|
@@ -329,6 +329,9 @@ module Stripe
|
|
329
329
|
# If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
|
330
330
|
sig { returns(Integer) }
|
331
331
|
attr_accessor :amount
|
332
|
+
# 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.
|
333
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
334
|
+
attr_accessor :metadata
|
332
335
|
# If provided, the product's `tax_code` will be used as the line item's `tax_code`.
|
333
336
|
sig { returns(T.nilable(String)) }
|
334
337
|
attr_accessor :product
|
@@ -345,10 +348,11 @@ module Stripe
|
|
345
348
|
sig { returns(T.nilable(String)) }
|
346
349
|
attr_accessor :tax_code
|
347
350
|
sig {
|
348
|
-
params(amount: Integer, product: T.nilable(String), quantity: T.nilable(Integer), reference: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void
|
351
|
+
params(amount: Integer, metadata: T.nilable(T::Hash[String, String]), product: T.nilable(String), quantity: T.nilable(Integer), reference: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String)).void
|
349
352
|
}
|
350
353
|
def initialize(
|
351
354
|
amount: nil,
|
355
|
+
metadata: nil,
|
352
356
|
product: nil,
|
353
357
|
quantity: nil,
|
354
358
|
reference: nil,
|
@@ -62,6 +62,9 @@ module Stripe
|
|
62
62
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
63
63
|
sig { returns(T::Boolean) }
|
64
64
|
attr_reader :livemode
|
65
|
+
# 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.
|
66
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
67
|
+
attr_reader :metadata
|
65
68
|
# String representing the object's type. Objects of the same type share the same value.
|
66
69
|
sig { returns(String) }
|
67
70
|
attr_reader :object
|
@@ -2142,7 +2142,7 @@ module Stripe
|
|
2142
2142
|
end
|
2143
2143
|
class Us < Stripe::RequestParams
|
2144
2144
|
class LocalAmusementTax < Stripe::RequestParams
|
2145
|
-
# 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).
|
2145
|
+
# 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).
|
2146
2146
|
sig { returns(String) }
|
2147
2147
|
attr_accessor :jurisdiction
|
2148
2148
|
sig { params(jurisdiction: String).void }
|
@@ -66,9 +66,7 @@ module Stripe
|
|
66
66
|
# Always true for a deleted object
|
67
67
|
sig { returns(T::Boolean) }
|
68
68
|
attr_reader :deleted
|
69
|
-
class DeleteParams < Stripe::RequestParams
|
70
|
-
|
71
|
-
end
|
69
|
+
class DeleteParams < Stripe::RequestParams; end
|
72
70
|
class ListParams < Stripe::RequestParams
|
73
71
|
class Owner < Stripe::RequestParams
|
74
72
|
# Account the tax ID belongs to. Required when `type=account`
|
@@ -3,9 +3,9 @@
|
|
3
3
|
|
4
4
|
# typed: true
|
5
5
|
module Stripe
|
6
|
-
# 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.
|
6
|
+
# 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.
|
7
7
|
#
|
8
|
-
# Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
|
8
|
+
# Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates)
|
9
9
|
class TaxRate < APIResource
|
10
10
|
class FlatAmount < Stripe::StripeObject
|
11
11
|
# Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
|
@@ -352,9 +352,7 @@ module Stripe
|
|
352
352
|
# Always true for a deleted object
|
353
353
|
sig { returns(T::Boolean) }
|
354
354
|
attr_reader :deleted
|
355
|
-
class DeleteParams < Stripe::RequestParams
|
356
|
-
|
357
|
-
end
|
355
|
+
class DeleteParams < Stripe::RequestParams; end
|
358
356
|
class UpdateParams < Stripe::RequestParams
|
359
357
|
class BbposWiseposE < Stripe::RequestParams
|
360
358
|
# A File ID representing an image to display on the reader
|
@@ -52,9 +52,7 @@ module Stripe
|
|
52
52
|
# Always true for a deleted object
|
53
53
|
sig { returns(T::Boolean) }
|
54
54
|
attr_reader :deleted
|
55
|
-
class DeleteParams < Stripe::RequestParams
|
56
|
-
|
57
|
-
end
|
55
|
+
class DeleteParams < Stripe::RequestParams; end
|
58
56
|
class UpdateParams < Stripe::RequestParams
|
59
57
|
class Address < Stripe::RequestParams
|
60
58
|
# City, district, suburb, town, or village.
|
@@ -190,7 +188,7 @@ module Stripe
|
|
190
188
|
); end
|
191
189
|
end
|
192
190
|
# Creates a new Location object.
|
193
|
-
# For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
|
191
|
+
# 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.
|
194
192
|
sig {
|
195
193
|
params(params: T.any(::Stripe::Terminal::Location::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location)
|
196
194
|
}
|