Class: Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/invoice.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.



6420
6421
6422
6423
6424
# File 'lib/stripe/resources/invoice.rb', line 6420

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.



6414
6415
6416
# File 'lib/stripe/resources/invoice.rb', line 6414

def duration
  @duration
end

#timestampObject

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



6416
6417
6418
# File 'lib/stripe/resources/invoice.rb', line 6416

def timestamp
  @timestamp
end

#typeObject

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



6418
6419
6420
# File 'lib/stripe/resources/invoice.rb', line 6418

def type
  @type
end