Class: Stripe::Subscription::CancelParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/subscription.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) ⇒ CancelParams

Returns a new instance of CancelParams.



262
263
264
265
266
267
# File 'lib/stripe/resources/subscription.rb', line 262

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



254
255
256
# File 'lib/stripe/resources/subscription.rb', line 254

def cancellation_details
  @cancellation_details
end

#expandObject

Specifies which fields in the response should be expanded.



256
257
258
# File 'lib/stripe/resources/subscription.rb', line 256

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



258
259
260
# File 'lib/stripe/resources/subscription.rb', line 258

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



260
261
262
# File 'lib/stripe/resources/subscription.rb', line 260

def prorate
  @prorate
end