Class: Stripe::SubscriptionService::ResumeParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/subscription_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(billing_cycle_anchor: nil, expand: nil, proration_behavior: nil, proration_date: nil) ⇒ ResumeParams

Returns a new instance of ResumeParams.



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
# File 'lib/stripe/services/subscription_service.rb', line 1712

def initialize(
  billing_cycle_anchor: nil,
  expand: nil,
  proration_behavior: nil,
  proration_date: nil
)
  @billing_cycle_anchor = billing_cycle_anchor
  @expand = expand
  @proration_behavior = proration_behavior
  @proration_date = proration_date
end

Instance Attribute Details

#billing_cycle_anchorObject

The billing cycle anchor that applies when the subscription is resumed. Either ‘now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](stripe.com/docs/billing/subscriptions/billing-cycle).



1704
1705
1706
# File 'lib/stripe/services/subscription_service.rb', line 1704

def billing_cycle_anchor
  @billing_cycle_anchor
end

#expandObject

Specifies which fields in the response should be expanded.



1706
1707
1708
# File 'lib/stripe/services/subscription_service.rb', line 1706

def expand
  @expand
end

#proration_behaviorObject

Determines how to handle [prorations](stripe.com/docs/billing/subscriptions/prorations) resulting from the ‘billing_cycle_anchor` being `unchanged`. When the `billing_cycle_anchor` is set to `now` (default value), no prorations are generated. If no value is passed, the default is `create_prorations`.



1708
1709
1710
# File 'lib/stripe/services/subscription_service.rb', line 1708

def proration_behavior
  @proration_behavior
end

#proration_dateObject

If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](stripe.com/docs/api/invoices/create_preview) endpoint.



1710
1711
1712
# File 'lib/stripe/services/subscription_service.rb', line 1710

def proration_date
  @proration_date
end