shopify v0.4.0 Shopify.Transaction
Link to this section Summary
Functions
Requests all resources
Requests the resource count
Requests to create a new resource
Requests a resource by id
Link to this section Functions
Link to this function
all(session, top_id, params \\ %{})
Requests all resources.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - top_id: The id of the top-level resource.
- params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Transaction.all(order_id)
{:ok, %Shopify.Response{}}
Link to this function
count(session, top_id, params \\ %{})
Requests the resource count.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - top_id: The id of the top-level resource.
- params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Transaction.count(order_id)
{:ok, %Shopify.Response{}}
Link to this function
create(session, top_id, new_resource)
Requests to create a new resource.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - top_id: The id of the top-level resource.
- new_resource: A struct of the resource being created.
Examples
iex> Shopify.session |> Shopify.Transaction.create(order_id)
{:ok, %Shopify.Response{}}
Link to this function
find(session, top_id, nest_id, params \\ %{})
Requests a resource by id.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - top_id: The id of the top-level resource.
- nest_id: The id of the nest-level resource.
- params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Transaction.find(order_id, transaction_id)
{:ok, %Shopify.Response{}}