Class: Seatsio::Domain::APIResponse
- Inherits:
-
Object
- Object
- Seatsio::Domain::APIResponse
- Defined in:
- lib/seatsio/domain.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#next_page_starts_after ⇒ Object
readonly
Returns the value of attribute next_page_starts_after.
-
#previous_page_ends_before ⇒ Object
readonly
Returns the value of attribute previous_page_ends_before.
Instance Method Summary collapse
-
#initialize(data) ⇒ APIResponse
constructor
A new instance of APIResponse.
Constructor Details
#initialize(data) ⇒ APIResponse
Returns a new instance of APIResponse.
114 115 116 117 118 |
# File 'lib/seatsio/domain.rb', line 114 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
#items ⇒ Object (readonly)
Returns the value of attribute items.
112 113 114 |
# File 'lib/seatsio/domain.rb', line 112 def items @items end |
#next_page_starts_after ⇒ Object (readonly)
Returns the value of attribute next_page_starts_after.
112 113 114 |
# File 'lib/seatsio/domain.rb', line 112 def next_page_starts_after @next_page_starts_after end |
#previous_page_ends_before ⇒ Object (readonly)
Returns the value of attribute previous_page_ends_before.
112 113 114 |
# File 'lib/seatsio/domain.rb', line 112 def previous_page_ends_before @previous_page_ends_before end |