ExShopify v0.2.0 ExShopify.CarrierService

Provide real-time shipping rates to Shopify.

Summary

Functions

Create a carrier service

Destroy a carrier service

Get a single carrier service

List carrier services

Update a carrier service

Types

carrier_service_plural()
carrier_service_plural() :: {:ok, [%ExShopify.CarrierService{active: term, carrier_service_type: term, format: term, id: term, name: term, service_discovery: term}], %ExShopify.Meta{api_call_limit: term}}
carrier_service_singular()
carrier_service_singular() :: {:ok, %ExShopify.CarrierService{active: term, carrier_service_type: term, format: term, id: term, name: term, service_discovery: term}, %ExShopify.Meta{api_call_limit: term}}

Functions

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) ::
  carrier_service_singular |
  ExShopify.Resource.error
create(%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

Create a carrier service.

Examples

iex> params = %ExShopify.CarrierService{
...>   name: "Shipping Rate Provider",
...>   callback_url: "http://shippingrateprovider.com",
...>   service_discovery: true
...> }

iex> ExShopify.CarrierService.create(session, params)
{:ok, carrier_service, meta}
delete(session, id)

Destroy a carrier service.

Examples

iex> ExShopify.CarrierService.delete(session, 1006327370)
{:ok, meta}
find(session, id)

Get a single carrier service.

Examples

iex> ExShopify.CarrierService.find(session, 1006327375)
{:ok, carrier_service, meta}
list(session)

List carrier services.

Examples

iex> ExShopify.CarrierService.list(session)
{:ok, carrier_services, meta}
update(session, id, params)

Update a carrier service.

Examples

iex> params = %ExShopify.CarrierService{
...>   name: "Some new name",
...>   active: false,
...>   service_discovery: true,
...>   carrier_service_type: "api",
...>   format: "json"
...> }

iex> ExShopify.CarrierService.update(session, 1006327369, params)
{:ok, carrier_service, meta}