Class: Stripe::SubscriptionItemDeleteParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::SubscriptionItemDeleteParams
- Defined in:
- lib/stripe/params/subscription_item_delete_params.rb
Instance Attribute Summary collapse
-
#clear_usage ⇒ Object
Delete all usage for the given subscription item.
-
#payment_behavior ⇒ Object
Controls how Stripe handles payment when a subscription update requires payment and ‘collection_method=charge_automatically`.
-
#proration_behavior ⇒ Object
Determines how to handle [prorations](docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting ‘billing_cycle_anchor=now`, or starting a trial), or if an item’s ‘quantity` changes.
-
#proration_date ⇒ Object
If set, the proration will be calculated as though the subscription was updated at the given time.
Instance Method Summary collapse
-
#initialize(clear_usage: nil, payment_behavior: nil, proration_behavior: nil, proration_date: nil) ⇒ SubscriptionItemDeleteParams
constructor
A new instance of SubscriptionItemDeleteParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(clear_usage: nil, payment_behavior: nil, proration_behavior: nil, proration_date: nil) ⇒ SubscriptionItemDeleteParams
Returns a new instance of SubscriptionItemDeleteParams.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/stripe/params/subscription_item_delete_params.rb', line 15 def initialize( clear_usage: nil, payment_behavior: nil, proration_behavior: nil, proration_date: nil ) @clear_usage = clear_usage @payment_behavior = payment_behavior @proration_behavior = proration_behavior @proration_date = proration_date end |
Instance Attribute Details
#clear_usage ⇒ Object
Delete all usage for the given subscription item. Allowed only when the current plan’s ‘usage_type` is `metered`.
7 8 9 |
# File 'lib/stripe/params/subscription_item_delete_params.rb', line 7 def clear_usage @clear_usage end |
#payment_behavior ⇒ Object
Controls how Stripe handles payment when a subscription update requires payment and ‘collection_method=charge_automatically`.
9 10 11 |
# File 'lib/stripe/params/subscription_item_delete_params.rb', line 9 def payment_behavior @payment_behavior end |
#proration_behavior ⇒ Object
Determines how to handle [prorations](docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting ‘billing_cycle_anchor=now`, or starting a trial), or if an item’s ‘quantity` changes. The default value is `create_prorations`.
11 12 13 |
# File 'lib/stripe/params/subscription_item_delete_params.rb', line 11 def proration_behavior @proration_behavior end |
#proration_date ⇒ Object
If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](/api/invoices/create_preview) endpoint.
13 14 15 |
# File 'lib/stripe/params/subscription_item_delete_params.rb', line 13 def proration_date @proration_date end |