ExShopify v0.2.0 ExShopify.CustomerSavedSearch

Group of customers as defined by the shop owner.

Summary

Functions

Get a count of all customer saved searches

Create a new Customer Saved Search

Get all customers who match the criteria for the specified customer saved search

Delete an existing Customer Saved Search

Get a single customer saved search

Get a list of all customer saved searches

Update an existing Customer Saved Search

Types

customer_saved_search_plural()
customer_saved_search_plural() :: {:ok, [%ExShopify.CustomerSavedSearch{created_at: term, id: term, name: term, query: term, updated_at: term}], %ExShopify.Meta{api_call_limit: term}}
customer_saved_search_singular()
customer_saved_search_singular() :: {:ok, %ExShopify.CustomerSavedSearch{created_at: term, id: term, name: term, query: term, updated_at: term}, %ExShopify.Meta{api_call_limit: term}}

Functions

count(session)
count(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}) ::
  ExShopify.Resource.count |
  ExShopify.Resource.error
count(session, params)
count(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, map) ::
  ExShopify.Resource.count |
  ExShopify.Resource.error

Get a count of all customer saved searches.

Examples

Get a count all customer saved searches

iex> ExShopify.CustomerSavedSearch.count(session)
{:ok, count, meta}

Get a count of all customer saved searches after a specified id

iex> ExShopify.CustomerSavedSearch.count(session, %{sinced_id: 20610973})
{:ok, count, meta}
create(session, params)
create(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, map) ::
  customer_saved_search_singular |
  ExShopify.Resource.error

Create a new Customer Saved Search.

Examples

Create a new Customer Saved Search

iex> params = %ExShopify.CustomerSavedSearch{
...>   name: "Spent more than $50",
...>   query: "total_spent:>50"
...> }

iex> ExShopify.CustomerSavedSearch.create(session, params)
{:ok, customer_saved_search, meta}

Create a new Customer Saved Search with multiple terms

iex> params = %ExShopify.CustomerSavedSearch{
...>   name: "Spent more than $50 and after 2013",
...>   query: "total_spent:>50 order_date:>=2013-01-01"
...> }

iex> ExShopify.CustomerSavedSearch.create(session, params)
{:ok, customer_saved_search, meta}
customers(session, customer_saved_search_id)
customers(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, integer | String.t) ::
  ExShopify.Customer.customer_plural |
  ExShopify.Resource.error
customers(session, customer_saved_search_id, params)
customers(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, integer | String.t, map) ::
  ExShopify.Customer.customer_plural |
  ExShopify.Resource.error

Get all customers who match the criteria for the specified customer saved search.

Examples

iex> ExShopify.CustomerSavedSearch.customers(session, 789629109)
{:ok, customers, meta}
delete(session, id)
delete(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, integer | String.t) ::
  ExShopify.Resource.only_meta |
  ExShopify.Resource.error

Delete an existing Customer Saved Search

Examples

iex> ExShopify.CustomerSavedSearch.delete(session, 789629109)
{:ok, meta}
find(session, id)
find(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, integer | String.t) ::
  customer_saved_search_singular |
  ExShopify.Resource.error
find(session, id, params)
find(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, integer | String.t, map) ::
  customer_saved_search_singular |
  ExShopify.Resource.error

Get a single customer saved search.

Examples

iex> ExShopify.CustomerSavedSearch.find(session, 789629109)
{:ok, customer_saved_search, meta}
list(session)
list(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}) ::
  customer_saved_search_plural |
  ExShopify.Resource.error
list(session, params)
list(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, map) ::
  customer_saved_search_plural |
  ExShopify.Resource.error

Get a list of all customer saved searches.

Examples

Get all customer saved searches for a shop

iex> ExShopify.CustomerSavedSearch.list(session)
{:ok, customer_saved_searches, meta}

Get all customer saved searches for a shop after a specified id

iex> ExShopify.CustomerSavedSearch.list(session, %{since_id: 20610973})
{:ok, customer_saved_searches, meta}
update(session, id, params)
update(%ExShopify.Session{access_token: term, api_key: term, domain: term, port: term, protocol: term, secret: term, shop_name: term, shop_url: term}, integer | String.t, map) ::
  customer_saved_search_singular |
  ExShopify.Resource.error

Update an existing Customer Saved Search.

Examples

iex> params = %{name: "This Name Has Been Changed"}

iex> ExShopify.CustomerSavedSearch.update(session, 789629109, params)
{:ok, customer_saved_search, meta}