shopify v0.1.3 Shopify.Webhook
Summary
Functions
Requests all resources
Requests the resource count
Requests to create a new resource
Requests to delete a resource by id
Requests a resource by id
Requests to update a resource by id
Functions
Requests all resources.
Returns {:ok, [resources]}
or {:error, %Shopify.Error{}}
Parameters
- session: A
%Shopify.Session{}
struct. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Product.all
{:ok, [%Shopify.Product{}]}
Requests the resource count.
Returns {:ok, integer}
or {:error, %Shopify.Error{}}
Parameters
- session: A
%Shopify.Session{}
struct. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Product.count
{:ok, 1}
Requests to create a new resource.
Returns {:ok, resource}
or {:error, %Shopify.Error{}}
Parameters
- session: A
%Shopify.Session{}
struct. - new_resource: A struct of the resource being created.
Examples
iex> Shopify.session |> Shopify.Product.create(%Shopify.Product{})
{:ok, %Shopify.Product{}}
Requests to delete a resource by id.
Returns {:ok, resource}
or {:error, %Shopify.Error{}}
Parameters
- session: A
%Shopify.Session{}
struct. - id: The id of the resource.
Examples
iex> Shopify.session |> Shopify.Product.delete(id)
{:ok, nil}
Requests a resource by id.
Returns {:ok, resource}
or {:error, %Shopify.Error{}}
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.Product{}}
Requests to update a resource by id.
Returns {:ok, resource}
or {:error, %Shopify.Error{}}
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.Product{}}