Class: Stripe::SubscriptionCancelParams

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

Defined Under Namespace

Classes: CancellationDetails

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil) ⇒ SubscriptionCancelParams

Returns a new instance of SubscriptionCancelParams.



26
27
28
29
30
31
# File 'lib/stripe/params/subscription_cancel_params.rb', line 26

def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil)
  @cancellation_details = cancellation_details
  @expand = expand
  @invoice_now = invoice_now
  @prorate = prorate
end

Instance Attribute Details

#cancellation_detailsObject

Details about why this subscription was cancelled



18
19
20
# File 'lib/stripe/params/subscription_cancel_params.rb', line 18

def cancellation_details
  @cancellation_details
end

#expandObject

Specifies which fields in the response should be expanded.



20
21
22
# File 'lib/stripe/params/subscription_cancel_params.rb', line 20

def expand
  @expand
end

#invoice_nowObject

Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to ‘false`.



22
23
24
# File 'lib/stripe/params/subscription_cancel_params.rb', line 22

def invoice_now
  @invoice_now
end

#prorateObject

Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to ‘false`.



24
25
26
# File 'lib/stripe/params/subscription_cancel_params.rb', line 24

def prorate
  @prorate
end