Class: Stripe::SubscriptionItemService::DeleteParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::SubscriptionItemService::DeleteParams
- Defined in:
- lib/stripe/services/subscription_item_service.rb
Instance Attribute Summary collapse
-
#clear_usage ⇒ Object
Delete all usage for the given subscription item.
-
#proration_behavior ⇒ Object
Determines how to handle [prorations](stripe.com/docs/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, proration_behavior: nil, proration_date: nil) ⇒ DeleteParams
constructor
A new instance of DeleteParams.
Methods inherited from RequestParams
Constructor Details
#initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil) ⇒ DeleteParams
Returns a new instance of DeleteParams.
14 15 16 17 18 |
# File 'lib/stripe/services/subscription_item_service.rb', line 14 def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil) @clear_usage = clear_usage @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`.
8 9 10 |
# File 'lib/stripe/services/subscription_item_service.rb', line 8 def clear_usage @clear_usage end |
#proration_behavior ⇒ Object
Determines how to handle [prorations](stripe.com/docs/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`.
10 11 12 |
# File 'lib/stripe/services/subscription_item_service.rb', line 10 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](stripe.com/docs/api#retrieve_customer_invoice) endpoint.
12 13 14 |
# File 'lib/stripe/services/subscription_item_service.rb', line 12 def proration_date @proration_date end |