ExShopify v0.2.0 ExShopify.Province

The sub-regions of a country.

Summary

Types

province_plural()
province_plural() :: {:ok, [%ExShopify.Province{code: term, country_id: term, id: term, name: term, shipping_zone_id: term, tax: term, tax_name: term, tax_percentage: term, tax_type: term}], %ExShopify.Meta{api_call_limit: term}}
province_singular()
province_singular() :: {:ok, %ExShopify.Province{code: term, country_id: term, id: term, name: term, shipping_zone_id: term, tax: term, tax_name: term, tax_percentage: term, tax_type: term}, %ExShopify.Meta{api_call_limit: term}}

Functions

count(session, country_id)
count(%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.count |
  ExShopify.Resource.error

Receive a count of all provinces.

Examples

iex> ExShopify.Province.count(session, 879921427)
{:ok, count, meta}
find(session, id, country_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, integer | String.t) ::
  province_singular |
  ExShopify.Resource.error
find(session, id, country_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, integer | String.t, map) ::
  province_singular |
  ExShopify.Resource.error

Receive a single province.

Examples

iex> ExShopify.Province.find(session, 224293623, 879921427)
{:ok, province, meta}
list(session, country_id)
list(%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) ::
  province_plural |
  ExShopify.Resource.error
list(session, country_id, params)
list(%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) ::
  province_plural |
  ExShopify.Resource.error

Receive a list of all provinces.

Examples

iex> ExShopify.Province.list(session, 879921427)
{:ok, provinces, meta}
update(session, id, country_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, integer | String.t, map) ::
  province_singular |
  ExShopify.Resource.error

Modify an exsiting province.

Examples

iex> params = %{
...>   tax: 0.15
...> }

iex> ExShopify.Province.update(session, 224293623, 879921427, params)
{:ok, province, meta}