Class: Levelup::Endpoints::LocationOrders

Inherits:
Base
  • Object
show all
Defined in:
lib/levelup/endpoints/location_orders.rb

Overview

The endpoint holding all functions relating to orders for a specific location. This is a v14 endpoint and should not be expected to remain functional indefinitely.

Instance Method Summary collapse

Constructor Details

#initialize(location_id) ⇒ LocationOrders

Returns a new instance of LocationOrders.



8
9
10
# File 'lib/levelup/endpoints/location_orders.rb', line 8

def initialize(location_id)
  @id = location_id
end

Instance Method Details

#list(merchant_auth_token) ⇒ Object

Gets a list of orders made at this location. This list is paginated.

merchant_auth_token

An access token for the merchant that owns this location.



17
18
19
20
21
# File 'lib/levelup/endpoints/location_orders.rb', line 17

def list(merchant_auth_token)
  request = Requests::ListOrders.new(
    merchant_access_token: merchant_auth_token)
  request.send_to_api(:get, endpoint_path(:v14))
end