class Lightspeed::API::Categories

Attributes

client[R]

Public Class Methods

new(client) click to toggle source
# File lib/lightspeed/api/categories.rb, line 4
def initialize(client)
  @client = client
end

Public Instance Methods

all() click to toggle source
# File lib/lightspeed/api/categories.rb, line 8
def all
  client.get("Account/#{client.account_id}/Category.json").body
end
find(item_id, with: []) click to toggle source
# 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

Private Instance Methods

chosen_relations(with) click to toggle source
# File lib/lightspeed/api/categories.rb, line 20
def chosen_relations(with)
  with.map do |relation|
    relation.to_s.camelize
  end
end