Class: Stripe::SubscriptionSchedule::CreateParams::Phase::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.



718
719
720
721
722
# File 'lib/stripe/resources/subscription_schedule.rb', line 718

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.



712
713
714
# File 'lib/stripe/resources/subscription_schedule.rb', line 712

def duration
  @duration
end

#timestampObject

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



714
715
716
# File 'lib/stripe/resources/subscription_schedule.rb', line 714

def timestamp
  @timestamp
end

#typeObject

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



716
717
718
# File 'lib/stripe/resources/subscription_schedule.rb', line 716

def type
  @type
end