diff --git a/src/hz_grids.erl b/src/hz_grids.erl index 4fc9381..17482c7 100644 --- a/src/hz_grids.erl +++ b/src/hz_grids.erl @@ -44,8 +44,8 @@ -spec url(Instruction, HTTP) -> Result when Instruction :: spend | transfer | sign, HTTP :: uri_string:uri_string(), - GRIDS :: uri_string:uri_string(), - Result :: {ok, GRIDS} | uri_string:uri_error(). + Result :: {ok, GRIDS} | uri_string:uri_error(), + GRIDS :: uri_string:uri_string(). %% @doc %% Takes @@ -66,6 +66,19 @@ url2(Instruction, URL = #{path := Path}) -> {ok, uri_string:recompose(GRIDS)}. +-spec url(Instruction, Context, Recipient, Payload, Amount) -> Result + when Instruction :: spend | transfer, + Context :: uri_string:uri_string() | string(), % + Recipient :: string(), + Payload :: binary(), + Amount :: non_neg_integer(), + Result :: {ok, GRIDS} | error | uri_string:uri_error(). + +url(spend, Context, Recipient, Payload, Amount) -> + url(spend, +url(transfer, Context, Recipient, Payload, Amount) -> + + -spec parse(GRIDS) -> Result when GRIDS :: string(), Result :: {ok, Instruction} | uri_string:error(),