shopify v0.4.0 Shopify.Order.Fulfillment
Link to this section Summary
Functions
Requests all resources
Request to cancel a fulfillment
Request to mark a fulfillment as complete
Requests the resource count
Requests to create a new resource
Requests a resource by id
Request to transition a fulfillment from pending to open
Requests to update a resource by id
Link to this section Functions
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{}}
cancel(
%Shopify.Session{
access_token: term(),
api_key: term(),
api_version: term(),
client_id: term(),
client_secret: term(),
password: term(),
req_opts: term(),
shop_name: term(),
type: term()
},
integer(),
integer()
) ::
{:ok,
%Shopify.Order.Fulfillment{
created_at: term(),
id: term(),
line_items: term(),
location_id: term(),
notify_customer: term(),
order_id: term(),
receipt: term(),
service: term(),
shipment_status: term(),
status: term(),
tracking_company: term(),
tracking_number: term(),
tracking_numbers: term(),
tracking_url: term(),
tracking_urls: term(),
updated_at: term(),
variant_inventory_management: term()
}}
| {:error, map()}
Request to cancel a fulfillment.
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 requested nested resource.
Examples
iex> Shopify.session |> Shopify.Fulfillment.cancel(1, 1)
{:ok, %Shopify.Response{}}
complete(
%Shopify.Session{
access_token: term(),
api_key: term(),
api_version: term(),
client_id: term(),
client_secret: term(),
password: term(),
req_opts: term(),
shop_name: term(),
type: term()
},
integer(),
integer()
) ::
{:ok,
%Shopify.Order.Fulfillment{
created_at: term(),
id: term(),
line_items: term(),
location_id: term(),
notify_customer: term(),
order_id: term(),
receipt: term(),
service: term(),
shipment_status: term(),
status: term(),
tracking_company: term(),
tracking_number: term(),
tracking_numbers: term(),
tracking_url: term(),
tracking_urls: term(),
updated_at: term(),
variant_inventory_management: term()
}}
| {:error, map()}
Request to mark a fulfillment as complete.
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 requested nested resource.
Examples
iex> Shopify.session |> Shopify.Fulfillment.complete(1, 1)
{:ok, %Shopify.Response{}}
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{}}
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{}}
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{}}
open(
%Shopify.Session{
access_token: term(),
api_key: term(),
api_version: term(),
client_id: term(),
client_secret: term(),
password: term(),
req_opts: term(),
shop_name: term(),
type: term()
},
integer(),
integer()
) ::
{:ok,
%Shopify.Order.Fulfillment{
created_at: term(),
id: term(),
line_items: term(),
location_id: term(),
notify_customer: term(),
order_id: term(),
receipt: term(),
service: term(),
shipment_status: term(),
status: term(),
tracking_company: term(),
tracking_number: term(),
tracking_numbers: term(),
tracking_url: term(),
tracking_urls: term(),
updated_at: term(),
variant_inventory_management: term()
}}
| {:error, map()}
Request to transition a fulfillment from pending to open.
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 requested nested resource.
Examples
iex> Shopify.session |> Shopify.Fulfillment.open(1, 1)
{:ok, %Shopify.Response{}}
Requests to update a resource by id.
Returns {:ok, %Shopify.Response{}} or {:error, %Shopify.Error{}}
Parameters
- session: A
%Shopify.Session{}struct. - top_id: The id of the top-level resource.
- nest_id: The id of the nested-level resource.
- updated_resource: A struct of the resource being updated.
Examples
iex> Shopify.session |> Shopify.CustomerAddress.update(customer_id, address_id)
{:ok, %Shopify.Response{}}