class Levelup::Requests::ListOrders
Represents a request to list all orders made at a specified location. This is a v14 request and should not be expected to remain functional indefinitely.
Public Instance Methods
auth_type()
click to toggle source
# File lib/levelup/requests/list_orders.rb, line 8 def auth_type :merchant_v14 end
response_from_hash(hash)
click to toggle source
# File lib/levelup/requests/list_orders.rb, line 12 def response_from_hash(hash) if hash.nil? # no orders found for this location Responses::Success.new(orders: []) else orders = hash.map { |order| OpenStruct.new(order['order']) } Responses::Success.new(orders: orders) end end