Class: Lightspeed::API::Categories
- Inherits:
-
Object
- Object
- Lightspeed::API::Categories
- Defined in:
- lib/lightspeed/api/categories.rb
Instance Method Summary collapse
- #all ⇒ Object
- #find(item_id, with: []) ⇒ Object
-
#initialize(client) ⇒ Categories
constructor
A new instance of Categories.
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
#all ⇒ Object
8 9 10 |
# File 'lib/lightspeed/api/categories.rb', line 8 def all client.get("Account/#{client.account_id}/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.account_id}/Category/#{item_id}.json", relations: with).body end |