shopify v0.4.0 Shopify.Checkout
Link to this section Summary
Functions
Requests all resources
Requests to mark a comment as complete
Requests the resource count
Requests to create a new resource
Requests a resource by id
Retrieves a list of shipping rates for a token
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. - params: Any additional query params.
Examples
iex> Shopify.session |> Shopify.Product.all
{: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() }, binary() ) :: {:ok, %Shopify.Checkout{ abandoned_checkout_url: term(), billing_address: term(), buyer_accepts_marketing: term(), cancel_reason: term(), cart_token: term(), closed_at: term(), completed_at: term(), created_at: term(), currency: term(), customer: term(), customer_id: term(), device_id: term(), discount_codes: term(), email: term(), gateway: term(), landing_site: term(), line_items: term(), location_id: term(), note: term(), order: term(), order_id: term(), referring_site: term(), shipping_address: term(), shipping_lines: term(), shopify_payments_account_id: term(), source_name: term(), subtotal_price: term(), tax_lines: term(), taxes_included: term(), token: term(), total_discounts: term(), total_line_items_price: term(), total_price: term(), total_tax: term(), total_weight: term(), updated_at: term(), user_id: term() }} | {:error, map()}
Requests to mark a comment as complete.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - token: A checkout token.
Examples
iex> Shopify.session |> Shopify.Checkout.complete("asdfasdfasdf")
{:ok, %Shopify.Response{}}
Requests the resource count.
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.count
{:ok, %Shopify.Response{}}
Requests to create a new resource.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
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.Response{}}
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{}}
shipping_rates( %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() }, binary() ) :: {:ok, %Shopify.Checkout{ abandoned_checkout_url: term(), billing_address: term(), buyer_accepts_marketing: term(), cancel_reason: term(), cart_token: term(), closed_at: term(), completed_at: term(), created_at: term(), currency: term(), customer: term(), customer_id: term(), device_id: term(), discount_codes: term(), email: term(), gateway: term(), landing_site: term(), line_items: term(), location_id: term(), note: term(), order: term(), order_id: term(), referring_site: term(), shipping_address: term(), shipping_lines: term(), shopify_payments_account_id: term(), source_name: term(), subtotal_price: term(), tax_lines: term(), taxes_included: term(), token: term(), total_discounts: term(), total_line_items_price: term(), total_price: term(), total_tax: term(), total_weight: term(), updated_at: term(), user_id: term() }} | {:error, map()}
Retrieves a list of shipping rates for a token.
Returns {:ok, %Shopify.Response{}}
or {:error, %Shopify.Response{}}
Parameters
- session: A
%Shopify.Session{}
struct. - token: A checkout token.
Examples
iex> Shopify.session |> Shopify.Checkout.shipping_rates("asdfasdfasdf")
{:ok, %Shopify.Response{}}
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{}}