Class: Seatsio::UsageSummaryForAllMonths

Inherits:
Object
  • Object
show all
Defined in:
lib/seatsio/domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ UsageSummaryForAllMonths

Returns a new instance of UsageSummaryForAllMonths.



484
485
486
487
488
489
490
491
# File 'lib/seatsio/domain.rb', line 484

def initialize(data)
  usage = []
  data['usage'].each do |item|
    usage << UsageSummaryForMonth.new(item)
  end
  @usage = usage
  @usage_cutoff_date =  DateTime.iso8601(data['usageCutoffDate'])
end

Instance Attribute Details

#usageObject (readonly)

Returns the value of attribute usage.



482
483
484
# File 'lib/seatsio/domain.rb', line 482

def usage
  @usage
end

#usage_cutoff_dateObject (readonly)

Returns the value of attribute usage_cutoff_date.



482
483
484
# File 'lib/seatsio/domain.rb', line 482

def usage_cutoff_date
  @usage_cutoff_date
end