   Returns the configured currency code. Raises an error if an invalid code was
   used.
 
-      config :shippex, :currency, :can
-
-      Shippex.currency_code() #=> "CAN"
-  """
-  @spec currency_code() :: String.t()
+      iex> Application.put_env(:shippex, :currency, :mxn)
+      iex> Shippex.currency_code
+      "MXN"
+
+      iex> Application.put_env(:shippex, :currency, :can)
+      iex> Shippex.currency_code
+      "CAN"
+
+      iex> Application.put_env(:shippex, :currency, :usd)
+      iex> Shippex.currency_code
+      "USD"
+  """
+  @spec currency_code() :: String.t() | none()
   def currency_code() do
     case Application.get_env(:shippex, :currency, :usd) do
       code when code in [:usd, :can, :mxn] ->

  Fetches the env atom for the config. Must be either `:dev` or `:prod`, or an
  exception will be thrown.

      config :shippex, :env, :dev

      Shippex.env #=> :dev
  """
  @spec env() :: atom
  def env() do
    case Application.get_env(:shippex, :env, :dev) do
      e when e in [:dev, :prod] -> e

    defexception [:message]

    def exception(message) do
      %InvalidConfigError{message: message}
    end
  end

