Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Inventory Endpoints #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/lightspeed/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
require_relative 'item_attribute_sets'
require_relative 'images'
require_relative 'inventories'
require_relative 'inventory_count_items'
require_relative 'inventory_count_reconciles'
require_relative 'inventory_counts'
require_relative 'orders'
require_relative 'sales'
require_relative 'shops'
Expand All @@ -24,6 +27,9 @@ class Account < Lightspeed::Resource
:Employees,
:Images,
:Inventories,
:InventoryCountItems,
:InventoryCountReconciles,
:InventoryCounts,
:ItemMatrices,
:ItemAttributeSets,
:Items,
Expand Down
16 changes: 16 additions & 0 deletions lib/lightspeed/inventory_count.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

require_relative 'resource'

module Lightspeed
class InventoryCount < Lightspeed::Resource
alias_method :archive, :destroy

fields(
inventoryCountID: :id,
name: :string,
timeStamp: :datetime,
archived: :boolean,
shopID: :id
)
end
end
17 changes: 17 additions & 0 deletions lib/lightspeed/inventory_count_item.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

require_relative 'resource'

module Lightspeed
class InventoryCountItem < Lightspeed::Resource
alias_method :archive, :destroy

fields(
inventoryCountItemID: :id,
qty: :integer,
timeStamp: :datetime,
inventoryCountID: :id,
itemID: :id,
employeeID: :id
)
end
end
9 changes: 9 additions & 0 deletions lib/lightspeed/inventory_count_items.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require_relative 'collection'

require_relative 'inventory_count_item'

module Lightspeed
class InventoryCountItems < Lightspeed::Collection
alias_method :archive, :destroy
end
end
17 changes: 17 additions & 0 deletions lib/lightspeed/inventory_count_reconcile.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

require_relative 'resource'

module Lightspeed
class InventoryCountReconcile < Lightspeed::Resource
alias_method :archive, :destroy

fields(
inventoryCountReconcileID: :id,
createTime: :datetime,
costChange: :decimal,
qohChange: :integer,
inventoryCountID: :id,
itemID: :id
)
end
end
9 changes: 9 additions & 0 deletions lib/lightspeed/inventory_count_reconciles.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require_relative 'collection'

require_relative 'inventory_count_reconcile'

module Lightspeed
class InventoryCountReconciles < Lightspeed::Collection
alias_method :archive, :destroy
end
end
9 changes: 9 additions & 0 deletions lib/lightspeed/inventory_counts.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require_relative 'collection'

require_relative 'inventory_count'

module Lightspeed
class InventoryCounts < Lightspeed::Collection
alias_method :archive, :destroy
end
end