Class: Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd

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



578
579
580
581
582
# File 'lib/stripe/resources/subscription_schedule.rb', line 578

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.



572
573
574
# File 'lib/stripe/resources/subscription_schedule.rb', line 572

def duration
  @duration
end

#timestampObject

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



574
575
576
# File 'lib/stripe/resources/subscription_schedule.rb', line 574

def timestamp
  @timestamp
end

#typeObject

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



576
577
578
# File 'lib/stripe/resources/subscription_schedule.rb', line 576

def type
  @type
end