Class: Rev::OrdersListPage

Inherits:
ApiSerializable show all
Defined in:
lib/rev-api/models/order.rb

Overview

Represents a paginated list of orders, including padination info.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApiSerializable

#to_hash, #to_json

Constructor Details

#initialize(fields) ⇒ OrdersListPage

Returns a new instance of OrdersListPage.

Parameters:

  • fields (Hash)

    hash of OrdersListPage fields parsed from JSON API response



124
125
126
127
# File 'lib/rev-api/models/order.rb', line 124

def initialize(fields)
  super fields
  @orders = fields['orders'].map { |order_fields| Order.new(order_fields) }
end

Instance Attribute Details

#ordersObject (readonly)

Returns the value of attribute orders.



121
122
123
# File 'lib/rev-api/models/order.rb', line 121

def orders
  @orders
end

#pageObject (readonly)

Returns the value of attribute page.



121
122
123
# File 'lib/rev-api/models/order.rb', line 121

def page
  @page
end

#results_per_pageObject (readonly)

Returns the value of attribute results_per_page.



121
122
123
# File 'lib/rev-api/models/order.rb', line 121

def results_per_page
  @results_per_page
end

#total_countObject (readonly)

Returns the value of attribute total_count.



121
122
123
# File 'lib/rev-api/models/order.rb', line 121

def total_count
  @total_count
end