You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/test/support/paddle_api_mock.ex

25 lines
462 B
Elixir

defmodule Plausible.PaddleApi.Mock do
def get_subscription(_) do
{:ok,
%{
"next_payment" => %{
"date" => "2019-07-10",
"amount" => 6
}
}}
end
def update_subscription(_, %{plan_id: new_plan_id}) do
new_plan_id = String.to_integer(new_plan_id)
{:ok,
%{
"plan_id" => new_plan_id,
"next_payment" => %{
"date" => "2019-07-10",
"amount" => 6
}
}}
end
end