Class: Levelup::Requests::ListUserOrders
- Inherits:
-
Base
- Object
- Templates::DataParcel
- Base
- Levelup::Requests::ListUserOrders
- Includes:
- Templates::UserAuthenticated
- Defined in:
- lib/levelup/requests/list_user_orders.rb
Overview
Represents a request to create an address for a specific user. For information about its parameters, see UserAddressData and UserAuthenticated. User access token must have the read_user_orders permission.
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes included from Templates::UserAuthenticated
Instance Method Summary collapse
Methods included from Templates::UserAuthenticated
Methods inherited from Base
#auth_type, #headers, instance_variables_excluded_from_hash, #send_to_api
Methods inherited from Templates::DataParcel
excluded?, #initialize, instance_variables_excluded_from_hash
Constructor Details
This class inherits a constructor from Levelup::Templates::DataParcel
Instance Method Details
#body ⇒ Object
9 10 11 |
# File 'lib/levelup/requests/list_user_orders.rb', line 9 def body {} end |
#response_from_hash(hash) ⇒ Object
13 14 15 16 |
# File 'lib/levelup/requests/list_user_orders.rb', line 13 def response_from_hash(hash) orders = hash.map { |order| OpenStruct.new(order['order']) } Responses::Success.new(orders: orders) end |