Class: Rev::OrdersListPage
- Inherits:
-
ApiSerializable
- Object
- ApiSerializable
- Rev::OrdersListPage
- Defined in:
- lib/rev-api/models/order.rb
Overview
Represents a paginated list of orders, including padination info.
Instance Attribute Summary collapse
-
#orders ⇒ Object
readonly
Returns the value of attribute orders.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#results_per_page ⇒ Object
readonly
Returns the value of attribute results_per_page.
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
Instance Method Summary collapse
-
#initialize(fields) ⇒ OrdersListPage
constructor
A new instance of OrdersListPage.
Methods inherited from ApiSerializable
Constructor Details
#initialize(fields) ⇒ OrdersListPage
Returns a new instance of OrdersListPage.
108 109 110 111 |
# File 'lib/rev-api/models/order.rb', line 108 def initialize(fields) super fields @orders = fields['orders'].map { |order_fields| Order.new(order_fields) } end |
Instance Attribute Details
#orders ⇒ Object (readonly)
Returns the value of attribute orders.
105 106 107 |
# File 'lib/rev-api/models/order.rb', line 105 def orders @orders end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
105 106 107 |
# File 'lib/rev-api/models/order.rb', line 105 def page @page end |
#results_per_page ⇒ Object (readonly)
Returns the value of attribute results_per_page.
105 106 107 |
# File 'lib/rev-api/models/order.rb', line 105 def results_per_page @results_per_page end |
#total_count ⇒ Object (readonly)
Returns the value of attribute total_count.
105 106 107 |
# File 'lib/rev-api/models/order.rb', line 105 def total_count @total_count end |