Class: Seatsio::Domain::UsageDetails

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ UsageDetails

Returns a new instance of UsageDetails.



316
317
318
319
# File 'lib/seatsio/domain.rb', line 316

def initialize(data)
  @subaccount = data['subaccount'] ? UsageSubaccount.new(data['subaccount']) : nil
  @usage_by_chart = data['usageByChart'].map { |usage| UsageByChart.new(usage) }
end

Instance Attribute Details

#subaccountObject (readonly)

Returns the value of attribute subaccount.



314
315
316
# File 'lib/seatsio/domain.rb', line 314

def subaccount
  @subaccount
end