Class: Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::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.



2277
2278
2279
2280
2281
# File 'lib/stripe/services/invoice_service.rb', line 2277

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.



2271
2272
2273
# File 'lib/stripe/services/invoice_service.rb', line 2271

def duration
  @duration
end

#timestampObject

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



2273
2274
2275
# File 'lib/stripe/services/invoice_service.rb', line 2273

def timestamp
  @timestamp
end

#typeObject

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



2275
2276
2277
# File 'lib/stripe/services/invoice_service.rb', line 2275

def type
  @type
end