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.
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
#orders ⇒ Object (readonly)
Returns the value of attribute orders.
121 122 123 |
# File 'lib/rev-api/models/order.rb', line 121 def orders @orders end |
#page ⇒ Object (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_page ⇒ Object (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_count ⇒ Object (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 |