Class: Extensiv::CartInventory

Inherits:
Resource
  • Object
show all
Defined in:
lib/extensiv/cart/cart_inventory.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Extensiv::Resource

Instance Method Details

#list(**params) ⇒ Object



5
6
7
8
# File 'lib/extensiv/cart/cart_inventory.rb', line 5

def list(**params)
  response = get_request("merchant/inventory", params: params)
  Collection.from_response(response, type: Inventory, params: params)
end

#retrieve(sku:) ⇒ Object



10
11
12
# File 'lib/extensiv/cart/cart_inventory.rb', line 10

def retrieve(sku:)
  Inventory.new get_request("merchant/inventory/#{sku}").body["response"]
end