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
Provision a phone number
Resend a fax
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
List all countries that Phaxio supports.
Examples
iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.list_countries(), do: :passed
:passed
Provision a phone number.
Examples
iex> with {:ok, %HTTPoison.Response{}} <- ExPhaxio.provision_phone("1", "469"), do: :passed
:passed
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