class Snap::Api::StockTotals
Interact with the stock totals endpoint.
Public Class Methods
find(sku:)
click to toggle source
# File lib/snap/api/stock_totals.rb, line 12 def self.find(sku:) client.get("/stocktotals?$filter=SKUId eq '#{sku}'") end
find!(sku:)
click to toggle source
# File lib/snap/api/stock_totals.rb, line 16 def self.find!(sku:) response = find(sku: sku) raise Api::StockTotalNotFoundError, "No stock totals found for #{sku}" if response.empty? response end
index()
click to toggle source
# File lib/snap/api/stock_totals.rb, line 8 def self.index client.get('/stocktotals') end
model()
click to toggle source
# File lib/snap/api/stock_totals.rb, line 23 def self.model Snap::StockTotalList end