shopify v0.4.0 Shopify.InventoryLevel
Link to this section Summary
Functions
Adjusts the inventory for a given inventory item at a given location
Requests all resources. Needs an array of inventory item ids or location ids as parameters!
Connects a given inventory with a location
Requests to delete a resource by id
Sets available inventory for a given inventory item at given location
Link to this section Functions
Adjusts the inventory for a given inventory item at a given location.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.InventoryLevel.adjust(%{inventory_item_id: 123, location_id: 123, available_adjustment: 123})
{:ok, %Shopify.Response{}}
Requests all resources. Needs an array of inventory item ids or location ids as parameters!
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - params: Can be inventory_item_ids or location_ids or both.
Examples
iex> Shopify.session |> Shopify.InventoryLevel.all(%{inventory_item_ids: [123]})
{:ok, %Shopify.Response{}}
Connects a given inventory with a location.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.InventoryLevel.connect(%{inventory_item_id: 123, location_id: 123})
{:ok, %Shopify.Response{}}
Requests to delete a resource by id.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - id: The id of the resource.
Examples
iex> Shopify.session |> Shopify.Product.delete(id)
{:ok, %Shopify.Response{}}
Sets available inventory for a given inventory item at given location.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.InventoryLevel.set(%{inventory_item_id: 123, location_id: 123, available: 5})
{:ok, %Shopify.Response{}}