Class: Lightspeed::API::Categories

Inherits:
Object
  • Object
show all
Defined in:
lib/lightspeed/api/categories.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Categories

Returns a new instance of Categories.



4
5
6
# File 'lib/lightspeed/api/categories.rb', line 4

def initialize(client)
  @client = client
end

Instance Method Details

#allObject



8
9
10
# File 'lib/lightspeed/api/categories.rb', line 8

def all
  client.get("Account/#{client.}/Category.json").body
end

#find(item_id, with: []) ⇒ Object



12
13
14
# File 'lib/lightspeed/api/categories.rb', line 12

def find(item_id, with: [])
  client.get("Account/#{client.}/Category/#{item_id}.json", relations: with).body
end