Module: LightspeedRestaurantClient::Operations::List

Included in:
Company, Customer, CustomerCreditChange, Receipt
Defined in:
lib/lightspeed_restaurant/operations/list.rb

Instance Method Summary collapse

Instance Method Details

#list(params = {}) ⇒ Object Also known as: all



4
5
6
7
8
# File 'lib/lightspeed_restaurant/operations/list.rb', line 4

def list(params = {})
  response = JSON.parse(LightspeedRestaurantClient.get(resource_path, {}, params))
  results = response.is_a?(Array) ? response : response['results']
  instantiate(results)
end