| 1 |
|
defmodule WalletJourney.StubTransfers do |
| 2 |
|
@moduledoc "Test stub for WalletTransfers. Returns predictable success responses." |
| 3 |
|
|
| 4 |
11 |
def initiate(_user_id, _from_account_id, _to_account_id, _amount, _currency, _opts \\ []) do |
| 5 |
11 |
{:ok, %{transfer_id: "trf_test_#{:erlang.unique_integer([:positive])}"}} |
| 6 |
|
end |
| 7 |
|
|
| 8 |
11 |
def reserve(_transfer_id, _opts \\ []) do |
| 9 |
|
{:ok, %{status: :reserved}} |
| 10 |
|
end |
| 11 |
|
|
| 12 |
11 |
def complete(_transfer_id, _opts \\ []) do |
| 13 |
|
{:ok, %{status: :completed}} |
| 14 |
|
end |
| 15 |
|
|
| 16 |
:-( |
def cancel(_transfer_id, _reason, _opts \\ []) do |
| 17 |
|
{:ok, %{status: :canceled}} |
| 18 |
|
end |
| 19 |
|
end |