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



1560
1561
1562
1563
1564
# File 'lib/stripe/services/invoice_service.rb', line 1560

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.



1554
1555
1556
# File 'lib/stripe/services/invoice_service.rb', line 1554

def duration
  @duration
end

#timestampObject

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



1556
1557
1558
# File 'lib/stripe/services/invoice_service.rb', line 1556

def timestamp
  @timestamp
end

#typeObject

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



1558
1559
1560
# File 'lib/stripe/services/invoice_service.rb', line 1558

def type
  @type
end