Class: Seatsio::Domain::APIResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ APIResponse

Returns a new instance of APIResponse.



94
95
96
97
98
# File 'lib/seatsio/domain.rb', line 94

def initialize(data)
  @next_page_starts_after = data.fetch('next_page_starts_after', nil).to_i
  @previous_page_ends_before = data.fetch('previous_page_ends_before', nil).to_i
  @items = data.fetch('items', [])
end

Instance Attribute Details

#itemsObject (readonly)

Returns the value of attribute items.



92
93
94
# File 'lib/seatsio/domain.rb', line 92

def items
  @items
end

#next_page_starts_afterObject (readonly)

Returns the value of attribute next_page_starts_after.



92
93
94
# File 'lib/seatsio/domain.rb', line 92

def next_page_starts_after
  @next_page_starts_after
end

#previous_page_ends_beforeObject (readonly)

Returns the value of attribute previous_page_ends_before.



92
93
94
# File 'lib/seatsio/domain.rb', line 92

def previous_page_ends_before
  @previous_page_ends_before
end