Class: Stripe::InvoiceService::CreatePreviewParams::Discount::DiscountEnd

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/invoice_service.rb

Defined Under Namespace

Classes: Duration

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(duration: nil, timestamp: nil, type: nil) ⇒ DiscountEnd

Returns a new instance of DiscountEnd.



2233
2234
2235
2236
2237
# File 'lib/stripe/services/invoice_service.rb', line 2233

def initialize(duration: nil, timestamp: nil, type: nil)
  @duration = duration
  @timestamp = timestamp
  @type = type
end

Instance Attribute Details

#durationObject

Time span for the redeemed discount.



2227
2228
2229
# File 'lib/stripe/services/invoice_service.rb', line 2227

def duration
  @duration
end

#timestampObject

A precise Unix timestamp for the discount to end. Must be in the future.



2229
2230
2231
# File 'lib/stripe/services/invoice_service.rb', line 2229

def timestamp
  @timestamp
end

#typeObject

The type of calculation made to determine when the discount ends.



2231
2232
2233
# File 'lib/stripe/services/invoice_service.rb', line 2231

def type
  @type
end