Class: FlexOps::Resources::Inventory

Inherits:
Object
  • Object
show all
Defined in:
lib/flexops/resources/inventory.rb

Constant Summary collapse

PROXY =
"/api/ApiProxy"

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ Inventory

Returns a new instance of Inventory.



14
15
16
# File 'lib/flexops/resources/inventory.rb', line 14

def initialize(http)
  @http = http
end

Instance Method Details

#get_complete_snapshot(params = nil) ⇒ Object



26
27
28
# File 'lib/flexops/resources/inventory.rb', line 26

def get_complete_snapshot(params = nil)
  @http.get("#{PROXY}/api/v1/Inventory/getCompleteInventorySnapshot", query: params)
end

#get_part_numbers(params = nil) ⇒ Object



30
31
32
# File 'lib/flexops/resources/inventory.rb', line 30

def get_part_numbers(params = nil)
  @http.get("#{PROXY}/api/v1/Inventory/getPartNumberList", query: params)
end

#get_warehouse_snapshot(params = nil) ⇒ Object



22
23
24
# File 'lib/flexops/resources/inventory.rb', line 22

def get_warehouse_snapshot(params = nil)
  @http.get("#{PROXY}/api/v1/Inventory/getWarehouseInventorySnapshot", query: params)
end

#post_asn_receipt(receipt) ⇒ Object



18
19
20
# File 'lib/flexops/resources/inventory.rb', line 18

def post_asn_receipt(receipt)
  @http.post("#{PROXY}/api/v1/Inventory/postNewAsnReceipt", body: receipt)
end

#update_inventory(data) ⇒ Object



34
35
36
# File 'lib/flexops/resources/inventory.rb', line 34

def update_inventory(data)
  @http.post("#{PROXY}/api/v2/Inventory/postCustomerInventoryUpdate", body: data)
end