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.



1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
# File 'lib/stripe/services/subscription_service.rb', line 1405

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).



1397
1398
1399
# File 'lib/stripe/services/subscription_service.rb', line 1397

def billing_cycle_anchor
  @billing_cycle_anchor
end

#expandObject

Specifies which fields in the response should be expanded.



1399
1400
1401
# File 'lib/stripe/services/subscription_service.rb', line 1399

def expand
  @expand
end

#proration_behaviorObject

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`.



1401
1402
1403
# File 'lib/stripe/services/subscription_service.rb', line 1401

def proration_behavior
  @proration_behavior
end

#proration_dateObject

If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](stripe.com/docs/api#retrieve_customer_invoice) endpoint.



1403
1404
1405
# File 'lib/stripe/services/subscription_service.rb', line 1403

def proration_date
  @proration_date
end