Class: JanioAPI::Order::Collection

Inherits:
ActiveResource::Collection
  • Object
show all
Defined in:
lib/janio_api/resources/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed = {}) ⇒ Collection

Returns a new instance of Collection.



8
9
10
11
12
13
# File 'lib/janio_api/resources/order.rb', line 8

def initialize(parsed = {})
  @count = parsed["count"]
  @next = parsed["next"]
  @previous = parsed["previous"]
  @elements = parsed["results"]
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



6
7
8
# File 'lib/janio_api/resources/order.rb', line 6

def count
  @count
end

#nextObject

Returns the value of attribute next.



6
7
8
# File 'lib/janio_api/resources/order.rb', line 6

def next
  @next
end

#previousObject

Returns the value of attribute previous.



6
7
8
# File 'lib/janio_api/resources/order.rb', line 6

def previous
  @previous
end