Class: Stripe::SubscriptionResumeParams

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

Defined Under Namespace

Classes: BillingCycleAnchor

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, discriminator, discriminator_fields, field_encodings, new, #to_h

Constructor Details

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

Returns a new instance of SubscriptionResumeParams.



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/stripe/params/subscription_resume_params.rb', line 25

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

Instance Attribute Details

#billing_cycle_anchor ⇒ Object

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.



15
16
17
# File 'lib/stripe/params/subscription_resume_params.rb', line 15

def billing_cycle_anchor
  @billing_cycle_anchor
end

#expand ⇒ Object

Specifies which fields in the response should be expanded.



17
18
19
# File 'lib/stripe/params/subscription_resume_params.rb', line 17

def expand
  @expand
end

#payment_behavior ⇒ Object

Controls whether Stripe attempts payment on the resumption invoice in the resume request, and how payment on that invoice affects the subscription's status. The default is resume_on_payment_attempt.



19
20
21
# File 'lib/stripe/params/subscription_resume_params.rb', line 19

def payment_behavior
  @payment_behavior
end

#proration_behavior ⇒ Object

Determines how to handle 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.



21
22
23
# File 'lib/stripe/params/subscription_resume_params.rb', line 21

def proration_behavior
  @proration_behavior
end

#proration_date ⇒ Object

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



23
24
25
# File 'lib/stripe/params/subscription_resume_params.rb', line 23

def proration_date
  @proration_date
end