Class: Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/invoice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(interval: nil, interval_count: nil) ⇒ Duration

Returns a new instance of Duration.



3435
3436
3437
3438
# File 'lib/stripe/resources/invoice.rb', line 3435

def initialize(interval: nil, interval_count: nil)
  @interval = interval
  @interval_count = interval_count
end

Instance Attribute Details

#intervalObject

Specifies a type of interval unit. Either ‘day`, `week`, `month` or `year`.



3431
3432
3433
# File 'lib/stripe/resources/invoice.rb', line 3431

def interval
  @interval
end

#interval_countObject

The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.



3433
3434
3435
# File 'lib/stripe/resources/invoice.rb', line 3433

def interval_count
  @interval_count
end