diff --git a/lib/api.ex b/lib/api.ex index 48daa00..b2a1f7e 100644 --- a/lib/api.ex +++ b/lib/api.ex @@ -2,8 +2,11 @@ defmodule PayPal.API do @moduledoc """ Documentation for PayPal.API. This module is about the base HTTP functionality """ - @base_url_sandbox "https://api.sandbox.paypal.com/v1/" - @base_url_live "https://api.paypal.com/v1/" + require Logger + @base_url_sandbox_version_one "https://api.sandbox.paypal.com/v1/" + @base_url_live_version_one "https://api.paypal.com/v1/" + @base_url_sandbox_version_two "https://api.sandbox.paypal.com/v2/" + @base_url_live_version_two "https://api.paypal.com/v2/" @doc """ Requests an OAuth token from PayPal, returns a tuple containing the token and seconds till expiry. @@ -25,16 +28,22 @@ defmodule PayPal.API do @spec get_oauth_token :: {atom, any} def get_oauth_token do headers = %{"Content-Type" => "application/x-www-form-urlencoded"} - options = [hackney: [basic_auth: {PayPal.Config.get.client_id, PayPal.Config.get.client_secret}]] + + options = [ + hackney: [basic_auth: {PayPal.Config.get().client_id, PayPal.Config.get().client_secret}] + ] + form = {:form, [grant_type: "client_credentials"]} case HTTPoison.post(base_url() <> "oauth2/token", form, headers, options) do {:ok, %{status_code: 401}} -> {:error, :unauthorised} + {:ok, %{body: body, status_code: 200}} -> %{access_token: access_token, expires_in: expires_in} = Poison.decode!(body, keys: :atoms) {:ok, {access_token, expires_in}} - _-> + + _ -> {:error, :bad_network} end end @@ -58,21 +67,27 @@ defmodule PayPal.API do {:ok, {"XXXXXXXXXXXXXX", 32000}} """ - @spec get(String.t) :: {atom, any} + @spec get(String.t()) :: {atom, any} def get(url) do case HTTPoison.get(base_url() <> url, headers()) do {:ok, %{status_code: 401}} -> {:error, :unauthorised} + {:ok, %{body: body, status_code: 200}} -> {:ok, Poison.decode!(body, keys: :atoms)} + {:ok, %{status_code: 404}} -> {:ok, :not_found} + {:ok, %{status_code: 400}} -> {:ok, :not_found} + {:ok, %{status_code: 204}} -> {:ok, :no_content} - {:ok, %{body: body}}-> + + {:ok, %{body: body}} -> {:error, body} + _ -> {:error, :bad_network} end @@ -97,25 +112,33 @@ defmodule PayPal.API do {:ok, {"XXXXXXXXXXXXXX", 32000}} """ - @spec post(String.t, map) :: {atom, any} + @spec post(String.t(), map) :: {atom, any} def post(url, data) do {:ok, data} = Poison.encode(data) + case HTTPoison.post(base_url() <> url, data, headers()) do {:ok, %{status_code: 401}} -> {:error, :unauthorised} + {:ok, %{body: body, status_code: 200}} -> {:ok, Poison.decode!(body, keys: :atoms)} + {:ok, %{body: body, status_code: 201}} -> {:ok, Poison.decode!(body, keys: :atoms)} + {:ok, %{status_code: 404}} -> {:ok, :not_found} + {:ok, %{status_code: 204}} -> {:ok, nil} + {:ok, %{status_code: 400}} -> {:error, :malformed_request} + {:ok, %{body: body}} = resp -> - IO.inspect resp + IO.inspect(resp) {:error, body} + _ -> {:error, :bad_network} end @@ -140,25 +163,32 @@ defmodule PayPal.API do {:ok, {"XXXXXXXXXXXXXX", 32000}} """ - @spec patch(String.t, map) :: {atom, any} + @spec patch(String.t(), map) :: {atom, any} def patch(url, data) do {:ok, data} = Poison.encode(data) + case HTTPoison.patch(base_url() <> url, data, headers()) do {:ok, %{status_code: 401}} -> {:error, :unauthorised} + {:ok, %{status_code: 200}} -> {:ok, nil} + {:ok, %{body: body, status_code: 201}} -> {:ok, Poison.decode!(body, keys: :atoms)} + {:ok, %{status_code: 404}} -> {:ok, :not_found} + {:ok, %{status_code: 204}} -> {:ok, :no_content} + {:ok, %{status_code: 400}} -> {:error, :malformed_request} + {:ok, %{body: body}} = resp -> - IO.inspect resp {:error, body} + _ -> {:error, :bad_network} end @@ -166,19 +196,51 @@ defmodule PayPal.API do @spec headers :: map defp headers do - %{"Authorization" => "Bearer #{Application.get_env(:pay_pal, :access_token)}", "Content-Type" => "application/json"} + %{ + "Authorization" => "Bearer #{Application.get_env(:pay_pal, :access_token)}", + "Content-Type" => "application/json" + } end - @spec base_url :: String.t + @spec base_url :: String.t() defp base_url do case Application.get_env(:pay_pal, :environment) do - :sandbox -> @base_url_sandbox - :live -> @base_url_live - :prod -> @base_url_live + :sandbox -> + base_url_sandbox_version + + :live -> + base_url_live_version + + :prod -> + base_url_live_version + + _ -> + Logger.warn("[PayPal] No `env` found in config, use `sandbox` as default.") + base_url_sandbox_version + end + end + + defp base_url_sandbox_version do + case Application.get_env(:pay_pal, :version) do + :v2 -> + Logger.info("[PayPal] is using version_2 sandbox url.") + @base_url_sandbox_version_two + + _ -> + Logger.info("[PayPal] is using version_1 sandbox url.") + @base_url_sandbox_version_one + end + end + + defp base_url_live_version do + case Application.get_env(:pay_pal, :version) do + :v2 -> + Logger.info("[PayPal] is using version_2 live url.") + @base_url_live_version_two + _ -> - require Logger - Logger.warn "[PayPal] No `env` found in config, use `sandbox` as default." - @base_url_sandbox + Logger.info("[PayPal] is using version_1 live url.") + @base_url_live_version_one end end end diff --git a/lib/config.ex b/lib/config.ex index 8a3e69f..b494915 100644 --- a/lib/config.ex +++ b/lib/config.ex @@ -29,13 +29,21 @@ defmodule PayPal.Config do iex(1)> PayPal.Config.get %{client_id: "CLIENT_ID", client_secret: "CLIENT_SECRET"} """ - @spec get :: %{client_id: String.t, client_secret: String.t} + @spec get :: %{client_id: String.t(), client_secret: String.t()} def get do - case !is_nil(System.get_env("PAYPAL_CLIENT_ID")) && !is_nil(System.get_env("PAYPAL_CLIENT_SECRET")) do + case !is_nil(System.get_env("PAYPAL_CLIENT_ID")) && + !is_nil(System.get_env("PAYPAL_CLIENT_SECRET")) do true -> - %{client_id: System.get_env("PAYPAL_CLIENT_ID"), client_secret: System.get_env("PAYPAL_CLIENT_SECRET")} + %{ + client_id: System.get_env("PAYPAL_CLIENT_ID"), + client_secret: System.get_env("PAYPAL_CLIENT_SECRET") + } + _ -> - %{client_id: Application.get_env(:pay_pal, :client_id), client_secret: Application.get_env(:pay_pal, :client_secret)} + %{ + client_id: Application.get_env(:pay_pal, :client_id), + client_secret: Application.get_env(:pay_pal, :client_secret) + } end end end diff --git a/lib/payments/authorizations.ex b/lib/payments/authorizations.ex index 8fa8d84..5b4921c 100644 --- a/lib/payments/authorizations.ex +++ b/lib/payments/authorizations.ex @@ -20,7 +20,7 @@ defmodule PayPal.Payments.Authorizations do iex> PayPal.Payments.Authorizations.show(authorization_id) {:ok, authorization} """ - @spec show(String.t) :: {atom, any} + @spec show(String.t()) :: {atom, any} def show(authorization_id) do PayPal.API.get("payments/authorization/#{authorization_id}") end @@ -46,7 +46,7 @@ defmodule PayPal.Payments.Authorizations do }) {:ok, capture} """ - @spec capture(String.t, map) :: {atom, any} + @spec capture(String.t(), map) :: {atom, any} def capture(authorization_id, params) do PayPal.API.post("payments/authorization/#{authorization_id}/capture", params) end @@ -66,7 +66,7 @@ defmodule PayPal.Payments.Authorizations do iex> PayPal.Payments.Authorizations.void(authorization_id) {:ok, authorization} """ - @spec void(String.t) :: {atom, any} + @spec void(String.t()) :: {atom, any} def void(authorization_id) do PayPal.API.post("payments/authorization/#{authorization_id}/void", nil) end @@ -91,7 +91,7 @@ defmodule PayPal.Payments.Authorizations do }) {:ok, authorization} """ - @spec reauthorize(String.t, map) :: {atom, any} + @spec reauthorize(String.t(), map) :: {atom, any} def reauthorize(authorization_id, params) do PayPal.API.post("payments/authorization/#{authorization_id}/reauthorize", params) end diff --git a/lib/payments/captures.ex b/lib/payments/captures.ex index 46e2e62..a546dcd 100644 --- a/lib/payments/captures.ex +++ b/lib/payments/captures.ex @@ -20,7 +20,7 @@ defmodule PayPal.Payments.Captures do iex> PayPal.Payments.Captures.show(capture_id) {:ok, capture} """ - @spec show(String.t) :: {atom, any} + @spec show(String.t()) :: {atom, any} def show(capture_id) do PayPal.API.get("payments/capture/#{capture_id}") end @@ -45,7 +45,7 @@ defmodule PayPal.Payments.Captures do }) {:ok, refund} """ - @spec refund(String.t, map) :: {atom, any} + @spec refund(String.t(), map) :: {atom, any} def refund(payment_id, params) do PayPal.API.post("payments/capture/#{payment_id}/refund", params) end diff --git a/lib/payments/orders.ex b/lib/payments/orders.ex index 69ea372..cbf73dc 100644 --- a/lib/payments/orders.ex +++ b/lib/payments/orders.ex @@ -20,7 +20,7 @@ defmodule PayPal.Payments.Orders do iex> PayPal.Payments.Orders.show(order_id) {:ok, order} """ - @spec show(String.t) :: {atom, any} + @spec show(String.t()) :: {atom, any} def show(order_id) do PayPal.API.get("payments/order/#{order_id}") end @@ -45,7 +45,7 @@ defmodule PayPal.Payments.Orders do }) {:ok, refund} """ - @spec authorize(String.t, map) :: {atom, any} + @spec authorize(String.t(), map) :: {atom, any} def authorize(payment_id, params) do PayPal.API.post("payments/orders/#{payment_id}/authorize", params) end @@ -71,7 +71,7 @@ defmodule PayPal.Payments.Orders do }) {:ok, capture} """ - @spec capture(String.t, map) :: {atom, any} + @spec capture(String.t(), map) :: {atom, any} def capture(order_id, params) do PayPal.API.post("payments/orders/#{order_id}/capture", params) end @@ -91,7 +91,7 @@ defmodule PayPal.Payments.Orders do iex> PayPal.Payments.Orders.void(order_id) {:ok, order} """ - @spec void(String.t) :: {atom, any} + @spec void(String.t()) :: {atom, any} def void(order_id) do PayPal.API.post("payments/order/#{order_id}/void", nil) end diff --git a/lib/payments/payments.ex b/lib/payments/payments.ex index cf050b9..c79876f 100644 --- a/lib/payments/payments.ex +++ b/lib/payments/payments.ex @@ -180,7 +180,7 @@ defmodule PayPal.Payments.Payments do iex> PayPal.Payments.Payments.execute(payment_id, payer_id) {:ok, payment} """ - @spec execute(String.t, String.t) :: {atom, any} + @spec execute(String.t(), String.t()) :: {atom, any} def execute(payment_id, payer_id) do PayPal.API.post("payments/payment/#{payment_id}/execute", %{payer_id: payer_id}) end @@ -200,7 +200,7 @@ defmodule PayPal.Payments.Payments do iex> PayPal.Payments.Payments.show(payment_id) {:ok, payment} """ - @spec show(String.t) :: {atom, any} + @spec show(String.t()) :: {atom, any} def show(payment_id) do PayPal.API.get("payments/payment/#{payment_id}") end @@ -247,7 +247,7 @@ defmodule PayPal.Payments.Payments do {:ok, payment} """ - @spec update(String.t, list) :: {atom, any} + @spec update(String.t(), list) :: {atom, any} def update(payment_id, changes) do PayPal.API.patch("payments/payment/#{payment_id}", changes) end @@ -272,6 +272,7 @@ defmodule PayPal.Payments.Payments do case PayPal.API.get("payments/payment?#{URI.encode_query(query)}") do {:ok, %{payments: payments}} -> {:ok, payments} + error -> error end diff --git a/lib/payments/payouts.ex b/lib/payments/payouts.ex index 191d464..25c54cb 100644 --- a/lib/payments/payouts.ex +++ b/lib/payments/payouts.ex @@ -127,7 +127,7 @@ defmodule PayPal.Payments.Payouts do ] } """ - @spec get_payouts_batch(binary) :: { :ok, map } | { :error, any} + @spec get_payouts_batch(binary) :: {:ok, map} | {:error, any} def get_payouts_batch(payout_batch_id) when is_binary(payout_batch_id) do PayPal.API.get("payments/payouts/#{payout_batch_id}") end @@ -183,7 +183,7 @@ defmodule PayPal.Payments.Payouts do } } """ - @spec get_payout(binary) :: { :ok, map } | { :error, any } + @spec get_payout(binary) :: {:ok, map} | {:error, any} def get_payout(payout_id) when is_binary(payout_id) do PayPal.API.get("payments/payouts-item/#{payout_id}") end @@ -245,8 +245,8 @@ defmodule PayPal.Payments.Payouts do } } """ - @spec cancel(binary) :: { :ok, map } | { :error, any} + @spec cancel(binary) :: {:ok, map} | {:error, any} def cancel(payout_id) when is_binary(payout_id) do PayPal.API.post("payments/payouts-item/#{payout_id}/cancel", %{}) end -end \ No newline at end of file +end diff --git a/lib/payments/refunds.ex b/lib/payments/refunds.ex index 7018238..c2a3d41 100644 --- a/lib/payments/refunds.ex +++ b/lib/payments/refunds.ex @@ -20,9 +20,8 @@ defmodule PayPal.Payments.Refunds do iex> PayPal.Payments.Refunds.show(refund_id) {:ok, refund} """ - @spec show(String.t) :: {atom, any} + @spec show(String.t()) :: {atom, any} def show(refund_id) do PayPal.API.get("payments/refund/#{refund_id}") end - end diff --git a/lib/payments/sales.ex b/lib/payments/sales.ex index 5de72d1..54ec114 100644 --- a/lib/payments/sales.ex +++ b/lib/payments/sales.ex @@ -22,7 +22,7 @@ defmodule PayPal.Payments.Sales do iex> PayPal.Payments.Sales.show(sale_id) {:ok, payment} """ - @spec show(String.t) :: {atom, any} + @spec show(String.t()) :: {atom, any} def show(sale_id) do PayPal.API.get("payments/sale/#{sale_id}") end @@ -47,7 +47,7 @@ defmodule PayPal.Payments.Sales do }) {:ok, payment} """ - @spec refund(String.t, map) :: {atom, any} + @spec refund(String.t(), map) :: {atom, any} def refund(sale_id, params) do PayPal.API.post("payments/sale/#{sale_id}/refund", params) end diff --git a/lib/supervisor.ex b/lib/supervisor.ex index 6e62c46..7c2f19e 100644 --- a/lib/supervisor.ex +++ b/lib/supervisor.ex @@ -10,7 +10,10 @@ defmodule PayPal.Application do # children = if Mix.env == :test, do: [], else: [worker(Task, [&refresh_token/0], [restart: :permanent])] # children = [worker(Task, [&refresh_token/0], [restart: :permanent])] - children = if Application.get_env(:pay_pal, :environment) == :test, do: [], else: [worker(Task, [&refresh_token/0], [restart: :permanent])] + children = + if Application.get_env(:pay_pal, :environment) == :test, + do: [], + else: [worker(Task, [&refresh_token/0], restart: :permanent)] opts = [strategy: :one_for_one, name: PayPal.Supervisor] Supervisor.start_link(children, opts) @@ -20,11 +23,15 @@ defmodule PayPal.Application do case PayPal.API.get_oauth_token() do {:ok, {token, seconds}} -> Application.put_env(:pay_pal, :access_token, token) - Logger.info "[PayPal] Refreshed access token, expires in #{seconds} seconds" + Logger.info("[PayPal] Refreshed access token, expires in #{seconds} seconds") :timer.sleep(seconds * 1000) refresh_token(seconds) + {:error, reason} -> - Logger.error "[PayPal] Refreshing access token failed with reason: #{reason}, retrying in 1 second" + Logger.error( + "[PayPal] Refreshing access token failed with reason: #{reason}, retrying in 1 second" + ) + :timer.sleep(1000) refresh_token() end diff --git a/mix.exs b/mix.exs index 80c9b2a..bb30e6d 100644 --- a/mix.exs +++ b/mix.exs @@ -5,7 +5,7 @@ defmodule PayPal.Mixfile do [ app: :pay_pal, version: "0.0.2", - elixir: "~> 1.4", + elixir: "~> 1.5", build_embedded: Application.get_env(:pay_pal, :environment) == :prod, start_permanent: Application.get_env(:pay_pal, :environment) == :prod, description: description(), @@ -13,7 +13,7 @@ defmodule PayPal.Mixfile do test_coverage: [tool: ExCoveralls], deps: deps(), docs: [extras: ["README.md"], main: "readme"], - dialyzer: [plt_add_deps: :true] + dialyzer: [plt_add_deps: true] ] end @@ -26,15 +26,15 @@ defmodule PayPal.Mixfile do defp deps do [ - {:httpoison, "~> 0.13"}, + {:httpoison, "~> 1.7"}, {:poison, "~> 3.1"}, - {:oauth2, "~> 0.9"}, - {:exvcr, "~> 0.8", only: [:dev, :test]}, - {:ex_doc, "~> 0.15", only: [:dev, :docs]}, - {:excoveralls, "~> 0.6", only: [:dev, :test]}, - {:inch_ex, "~> 0.5", only: [:dev, :docs]}, - {:credo, "~> 0.7", only: :dev}, - {:dialyxir, "~> 0.5", only: [:dev, :test], runtime: false} + {:oauth2, "~> 2.0"}, + {:exvcr, "~> 0.11", only: [:dev, :test]}, + {:ex_doc, "~> 0.23", only: [:dev, :docs]}, + {:excoveralls, "~> 0.10", only: [:dev, :test]}, + {:inch_ex, github: "rrrene/inch_ex", only: [:dev, :test]}, + {:credo, "~> 1.5", only: [:dev, :test], runtime: false}, + {:dialyxir, "~> 1.0", only: [:dev], runtime: false} ] end @@ -49,8 +49,10 @@ defmodule PayPal.Mixfile do licenses: ["MIT"], keywords: ["Elixir", "PayPal", "REST", "Payments", "API"], maintainers: ["Zen Savona"], - links: %{"GitHub" => "https://github.com/zensavona/paypal", - "Docs" => "https://hexdocs.pm/paypal"} + links: %{ + "GitHub" => "https://github.com/zensavona/paypal", + "Docs" => "https://hexdocs.pm/paypal" + } ] end end diff --git a/mix.lock b/mix.lock index fcba209..ee8aa23 100644 --- a/mix.lock +++ b/mix.lock @@ -1,28 +1,32 @@ %{ "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, - "certifi": {:hex, :certifi, "2.0.0", "a0c0e475107135f76b8c1d5bc7efb33cd3815cb3cf3dea7aefdd174dabead064", [:rebar3], [], "hexpm", "fdc6066ceeccb3aa14049ab6edf0b9af3b64ae1b0db2a92d5c52146f373bbb1c"}, - "credo": {:hex, :credo, "0.8.10", "261862bb7363247762e1063713bb85df2bbd84af8d8610d1272cd9c1943bba63", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}], "hexpm", "f3fe29f8de6be431c7736a933a3897fe9aa45533b1d1358b3691ac8ec4371e8f"}, - "dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], [], "hexpm", "6c32a70ed5d452c6650916555b1f96c79af5fc4bf286997f8b15f213de786f73"}, + "certifi": {:hex, :certifi, "2.5.2", "b7cfeae9d2ed395695dd8201c57a2d019c0c43ecaf8b8bcb9320b40d6662f340", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "3b3b5f36493004ac3455966991eaf6e768ce9884693d9968055aeeeb1e575040"}, + "credo": {:hex, :credo, "1.5.0", "bf6af2ae803575376d6f6fae5470557706718503b677ef2ef7ba1ea15428ddb6", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "0bcedaa097dfb4d20d6b4bee05da40b0b07f0a21e2fda60d7ef81797591c7575"}, + "dialyxir": {:hex, :dialyxir, "1.0.0", "6a1fa629f7881a9f5aaf3a78f094b2a51a0357c843871b8bc98824e7342d00a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "aeb06588145fac14ca08d8061a142d52753dbc2cf7f0d00fc1013f53f8654654"}, "earmark": {:hex, :earmark, "1.2.4", "99b637c62a4d65a20a9fb674b8cffb8baa771c04605a80c911c4418c69b75439", [:mix], [], "hexpm", "1b34655872366414f69dd987cb121c049f76984b6ac69f52fff6d8fd64d29cfd"}, "earmark_parser": {:hex, :earmark_parser, "1.4.10", "6603d7a603b9c18d3d20db69921527f82ef09990885ed7525003c7fe7dc86c56", [:mix], [], "hexpm", "8e2d5370b732385db2c9b22215c3f59c84ac7dda7ed7e544d7c459496ae519c0"}, - "ex_doc": {:hex, :ex_doc, "0.22.2", "03a2a58bdd2ba0d83d004507c4ee113b9c521956938298eba16e55cc4aba4a6c", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "cf60e1b3e2efe317095b6bb79651f83a2c1b3edcb4d319c421d7fcda8b3aff26"}, + "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, + "ex_doc": {:hex, :ex_doc, "0.23.0", "a069bc9b0bf8efe323ecde8c0d62afc13d308b1fa3d228b65bca5cf8703a529d", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "f5e2c4702468b2fd11b10d39416ddadd2fcdd173ba2a0285ebd92c39827a5a16"}, "exactor": {:hex, :exactor, "2.2.4", "5efb4ddeb2c48d9a1d7c9b465a6fffdd82300eb9618ece5d34c3334d5d7245b1", [:mix], [], "hexpm", "1222419f706e01bfa1095aec9acf6421367dcfab798a6f67c54cf784733cd6b5"}, - "excoveralls": {:hex, :excoveralls, "0.8.0", "99d2691d3edf8612f128be3f9869c4d44b91c67cec92186ce49470ae7a7404cf", [:mix], [{:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:hackney, ">= 0.12.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "74bdeec4a69d4b41f2099c73e25d3b210685702ed52ccc31df66a3597ebe6675"}, + "excoveralls": {:hex, :excoveralls, "0.13.3", "edc5f69218f84c2bf61b3609a22ddf1cec0fbf7d1ba79e59f4c16d42ea4347ed", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cc26f48d2f68666380b83d8aafda0fffc65dafcc8d8650358e0b61f6a99b1154"}, "exjsx": {:hex, :exjsx, "4.0.0", "60548841e0212df401e38e63c0078ec57b33e7ea49b032c796ccad8cde794b5c", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm", "32e95820a97cffea67830e91514a2ad53b888850442d6d395f53a1ac60c82e07"}, - "exvcr": {:hex, :exvcr, "0.9.1", "31e3936a790a14bf56b31b6b276577076a5ef8afd9b2d53ba3ff8bb647d45613", [:mix], [{:exactor, "~> 2.2", [hex: :exactor, repo: "hexpm", optional: false]}, {:exjsx, "~> 4.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:httpoison, "~> 0.13", [hex: :httpoison, repo: "hexpm", optional: true]}, {:httpotion, "~> 3.0", [hex: :httpotion, repo: "hexpm", optional: true]}, {:ibrowse, "~> 4.4", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:meck, "~> 0.8.8", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "383f630db88caa29f8ee3dc2d2188e7e0f0a96d236b7217680ba2d1ad176c7fb"}, - "hackney": {:hex, :hackney, "1.10.1", "c38d0ca52ea80254936a32c45bb7eb414e7a96a521b4ce76d00a69753b157f21", [:rebar3], [{:certifi, "2.0.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "6b1980a33628824ec829239b6f9bfc455f60eebc19d3096a215f5f6170d675cf"}, - "httpoison": {:hex, :httpoison, "0.13.0", "bfaf44d9f133a6599886720f3937a7699466d23bb0cd7a88b6ba011f53c6f562", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "4846958172d6401c4f34ecc5c2c4607b5b0d90b8eec8f6df137ca4907942ed0f"}, - "idna": {:hex, :idna, "5.1.0", "d72b4effeb324ad5da3cab1767cb16b17939004e789d8c0ad5b70f3cea20c89a", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fc1a2f7340c422650504b1662f28fdf381f34cbd30664e8491744e52c9511d40"}, - "inch_ex": {:hex, :inch_ex, "0.5.6", "418357418a553baa6d04eccd1b44171936817db61f4c0840112b420b8e378e67", [:mix], [{:poison, "~> 1.5 or ~> 2.0 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm", "7123ca0450686a61416a06cd38e26af18fd0f8c1cff5214770a957c6e0724338"}, + "exvcr": {:hex, :exvcr, "0.12.1", "d2ca956c1e321c64cffbc452db90fd2477d0a2f9fc740d85e8245794cf1dc7c1", [:mix], [{:exactor, "~> 2.2", [hex: :exactor, repo: "hexpm", optional: false]}, {:exjsx, "~> 4.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: true]}, {:httpotion, "~> 3.1", [hex: :httpotion, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:meck, "~> 0.8", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "1c4ed21dfbaa32055ac65b4f76df06a2ee1c8d655877f9c65f5c667316bc5978"}, + "file_system": {:hex, :file_system, "0.2.9", "545b9c9d502e8bfa71a5315fac2a923bd060fd9acb797fe6595f54b0f975fd32", [:mix], [], "hexpm", "3cf87a377fe1d93043adeec4889feacf594957226b4f19d5897096d6f61345d8"}, + "hackney": {:hex, :hackney, "1.16.0", "5096ac8e823e3a441477b2d187e30dd3fff1a82991a806b2003845ce72ce2d84", [:rebar3], [{:certifi, "2.5.2", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.1", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.0", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.6", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "3bf0bebbd5d3092a3543b783bf065165fa5d3ad4b899b836810e513064134e18"}, + "httpoison": {:hex, :httpoison, "1.7.0", "abba7d086233c2d8574726227b6c2c4f6e53c4deae7fe5f6de531162ce9929a0", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "975cc87c845a103d3d1ea1ccfd68a2700c211a434d8428b10c323dc95dc5b980"}, + "idna": {:hex, :idna, "6.0.1", "1d038fb2e7668ce41fbf681d2c45902e52b3cb9e9c77b55334353b222c2ee50c", [:rebar3], [{:unicode_util_compat, "0.5.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a02c8a1c4fd601215bb0b0324c8a6986749f807ce35f25449ec9e69758708122"}, + "inch_ex": {:git, "https://github.com/rrrene/inch_ex.git", "c8eeaa65312df3ce150e91d7dddb50e2983b3209", []}, + "jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"}, "jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], [], "hexpm", "fc3499fed7a726995aa659143a248534adc754ebd16ccd437cd93b649a95091f"}, - "makeup": {:hex, :makeup, "1.0.3", "e339e2f766d12e7260e6672dd4047405963c5ec99661abdc432e6ec67d29ef95", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2e9b4996d11832947731f7608fed7ad2f9443011b3b479ae288011265cdd3dad"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"}, - "meck": {:hex, :meck, "0.8.9", "64c5c0bd8bcca3a180b44196265c8ed7594e16bcc845d0698ec6b4e577f48188", [:rebar3], [], "hexpm", "5eb607516f4a644324f130d2ad8893d4097020e8d6097193d9f7be55ee8d00d6"}, + "makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.15.0", "98312c9f0d3730fde4049985a1105da5155bfe5c11e47bdc7406d88e01e4219b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "75ffa34ab1056b7e24844c90bfc62aaf6f3a37a15faa76b07bc5eba27e4a8b4a"}, + "meck": {:hex, :meck, "0.9.0", "cb40c223cf403db2d09def59d32d3682074ebecceb64f3e6f6c4477458df124d", [:rebar3], [], "hexpm", "f813e90dd0b89b2516a0201a355e84b1abc78b5751aa0cbf669a9d85a810ac63"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, - "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm", "7a4c8e1115a2732a67d7624e28cf6c9f30c66711a9e92928e745c255887ba465"}, - "nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"}, - "oauth2": {:hex, :oauth2, "0.9.2", "db2f1c5a2c01a21f14a7527c3c31b87c9b156532d8a3761428bf6ff710b119b6", [:mix], [{:hackney, "~> 1.7", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "e489a3cd819dddb71b3a9bbb95ff8b53c64fd7cb1990a89d5da6820dfed233a3"}, + "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"}, + "oauth2": {:hex, :oauth2, "2.0.0", "338382079fe16c514420fa218b0903f8ad2d4bfc0ad0c9f988867dfa246731b0", [:mix], [{:hackney, "~> 1.13", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "881b8364ac7385f9fddc7949379cbe3f7081da37233a1aa7aab844670a91e7e7"}, + "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"}, "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"}, - "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.1", "28a4d65b7f59893bc2c7de786dec1e1555bd742d336043fe644ae956c3497fbe", [:make, :rebar], [], "hexpm", "4f8805eb5c8a939cf2359367cb651a3180b27dfb48444846be2613d79355d65e"}, - "unicode_util_compat": {:hex, :unicode_util_compat, "0.3.1", "a1f612a7b512638634a603c8f401892afbf99b8ce93a45041f8aaca99cadb85e", [:rebar3], [], "hexpm", "da1d9bef8a092cc7e1e51f1298037a5ddfb0f657fe862dfe7ba4c5807b551c29"}, + "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, + "unicode_util_compat": {:hex, :unicode_util_compat, "0.5.0", "8516502659002cec19e244ebd90d312183064be95025a319a6c7e89f4bccd65b", [:rebar3], [], "hexpm", "d48d002e15f5cc105a696cf2f1bbb3fc72b4b770a184d8420c8db20da2674b38"}, }