Class: Stripe::SubscriptionItemDeleteParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/subscription_item_delete_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_usageObject

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_behaviorObject

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_behaviorObject

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_dateObject

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