ExPhaxio v0.2.1 ExPhaxio View Source

ExPhaxio is a simple wrapper around the Phaxio API, which allows the sending and management of faxes.

Link to this section Summary

Functions

Get your account status

Cancel a fax

Create and send a fax

List all faxes

List all countries that Phaxio supports

Show info for a previously created fax

Show the attached content of a fax

Link to this section Functions

Get your account status.

Examples

iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.account_status(), do: :passed
:passed

Cancel a fax.

Examples

iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.cancel("id"), do: :passed
:passed

Create and send a fax.

Examples

iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.create(%ExPhaxio.Requests.FaxRequest{}), do: :passed
:passed

iex> ExPhaxio.create(%{})
{:error, "Parameter must be a FaxRequest."}

List all faxes.

It also accepts filtering parameters. For more, see docs.

Examples

iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.list(), do: :passed
:passed
Link to this function list_countries(opts \\ []) View Source

List all countries that Phaxio supports.

Examples

iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.list_countries(), do: :passed
:passed
Link to this function provision_phone(country, area, cb_url \\ nil) View Source

Provision a phone number.

Examples

iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.provision_phone("1", "469"), do: :passed
:passed
Link to this function resend(id, cb_url \\ nil) View Source

Resend a fax.

Examples

iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.resend("id", "https://my.domain.com/callback"), do: :passed
:passed

Show info for a previously created fax.

Examples

iex> result = ExPhaxio.show("invalid_id")
...> with {:ok, %HTTPoison.Response{}} <- result, do: :passed
:passed
Link to this function show_content(id, size \\ nil) View Source

Show the attached content of a fax.

Fax must be created with a content_url.

Examples

iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.show_content("id"), do: :passed
:passed