shopify v0.4.0 Shopify.InventoryItem
Link to this section Summary
Link to this section Functions
Link to this function
all(session, params \\ %{})
Requests all resources.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Product.all
{:ok, %Shopify.Response{}}
Link to this function
find(session, id, params \\ %{})
Requests a resource by id.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - id: The id of the resource.
- params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Product.find(id)
{:ok, %Shopify.Response{}}
Link to this function
update(session, id, updated_resource)
Requests to update a resource by id.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - id: The id of the resource.
- updated_resource: A struct of the resource being updated.
Examples
iex> Shopify.session |> Shopify.Product.update(id, %Shopify.Product{})
{:ok, %Shopify.Response{}}