Class: Seatsio::UsageSummaryForAllMonths
- Inherits:
-
Object
- Object
- Seatsio::UsageSummaryForAllMonths
- Defined in:
- lib/seatsio/domain.rb
Instance Attribute Summary collapse
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
-
#usage_cutoff_date ⇒ Object
readonly
Returns the value of attribute usage_cutoff_date.
Instance Method Summary collapse
-
#initialize(data) ⇒ UsageSummaryForAllMonths
constructor
A new instance of UsageSummaryForAllMonths.
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
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
482 483 484 |
# File 'lib/seatsio/domain.rb', line 482 def usage @usage end |
#usage_cutoff_date ⇒ Object (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 |