Class: Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::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.



3962
3963
3964
3965
3966
# File 'lib/stripe/resources/invoice.rb', line 3962

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.



3956
3957
3958
# File 'lib/stripe/resources/invoice.rb', line 3956

def duration
  @duration
end

#timestampObject

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



3958
3959
3960
# File 'lib/stripe/resources/invoice.rb', line 3958

def timestamp
  @timestamp
end

#typeObject

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



3960
3961
3962
# File 'lib/stripe/resources/invoice.rb', line 3960

def type
  @type
end