Skip to content

Commit

Permalink
Term conversion (2600hz#3151)
Browse files Browse the repository at this point in the history
* adding the new files and conversion script

* convert all the modules

* remove functions from kz_util

* run checks on builds

* formatting fixes

* fix kapps_config_usage to use new modules

* fix test-only export
  • Loading branch information
jamesaimonetti authored and lazedo committed Jan 27, 2017
1 parent 1107fd0 commit 8407afa
Show file tree
Hide file tree
Showing 535 changed files with 3,537 additions and 3,397 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ fmt: $(FMT)

code_checks:
@ERL_LIBS=deps/:core/:applications/ $(ROOT)/scripts/no_raw_json.escript
@$(ROOT)/scripts/kz_util_diaspora.bash

apis:
@ERL_LIBS=deps/:core/:applications/ $(ROOT)/scripts/generate-schemas.escript
Expand Down
10 changes: 5 additions & 5 deletions applications/acdc/src/acdc_agent_fsm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ sync({'sync_req', JObj}, #state{agent_listener=AgentListener
sync({'sync_resp', JObj}, #state{sync_ref=Ref
,agent_listener=AgentListener
}=State) ->
case catch kz_util:to_atom(kz_json:get_value(<<"Status">>, JObj)) of
case catch kz_term:to_atom(kz_json:get_value(<<"Status">>, JObj)) of
'sync' ->
lager:debug("other agent is in sync too"),
{'next_state', 'sync', State};
Expand Down Expand Up @@ -1620,7 +1620,7 @@ current_call(Call, AgentState, QueueId, Start) ->
,{<<"caller_id_number">>, kapps_call:caller_id_name(Call)}
,{<<"to">>, kapps_call:to_user(Call)}
,{<<"from">>, kapps_call:from_user(Call)}
,{<<"agent_state">>, kz_util:to_binary(AgentState)}
,{<<"agent_state">>, kz_term:to_binary(AgentState)}
,{<<"duration">>, elapsed(Start)}
,{<<"queue_id">>, QueueId}
]).
Expand Down Expand Up @@ -1841,7 +1841,7 @@ maybe_notify(Ns, Key, State) ->
get_method(Ns) ->
case kz_json:get_value(<<"method">>, Ns) of
'undefined' -> 'get';
M -> standardize_method(kz_util:to_lower_binary(M))
M -> standardize_method(kz_term:to_lower_binary(M))
end.

-spec standardize_method(ne_binary()) -> 'get' | 'post'.
Expand Down Expand Up @@ -1886,7 +1886,7 @@ notify(Uri, Headers, Method, Body, Opts) ->
,{'timeout', 1000}
| Opts
],
URI = kz_util:to_list(Uri),
URI = kz_term:to_list(Uri),
case kz_http:req(Method, URI, Headers, Body, Options) of
{'ok', _Status, _ResponseHeaders, _ResponseBody} ->
lager:debug("~s req to ~s: ~p", [Method, Uri, _Status]);
Expand Down Expand Up @@ -1914,7 +1914,7 @@ uri(URI, QueryString) ->
{Scheme, Host, Path, <<>>, Fragment} ->
kz_http_util:urlunsplit({Scheme, Host, Path, QueryString, Fragment});
{Scheme, Host, Path, QS, Fragment} ->
kz_http_util:urlunsplit({Scheme, Host, Path, <<QS/binary, "&", (kz_util:to_binary(QueryString))/binary>>, Fragment})
kz_http_util:urlunsplit({Scheme, Host, Path, <<QS/binary, "&", (kz_term:to_binary(QueryString))/binary>>, Fragment})
end.

-spec apply_state_updates(state()) -> handle_fsm_ret(state()).
Expand Down
2 changes: 1 addition & 1 deletion applications/acdc/src/acdc_agent_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ send_probe(JObj, State) ->
PresenceUpdate =
[{<<"State">>, State}
,{<<"Presence-ID">>, To}
,{<<"Call-ID">>, kz_util:to_hex_binary(crypto:hash(md5, To))}
,{<<"Call-ID">>, kz_term:to_hex_binary(crypto:hash(md5, To))}
| kz_api:default_headers(?APP_NAME, ?APP_VERSION)
],
kapi_presence:publish_update(PresenceUpdate).
Expand Down
14 changes: 7 additions & 7 deletions applications/acdc/src/acdc_agent_listener.erl
Original file line number Diff line number Diff line change
Expand Up @@ -876,15 +876,15 @@ handle_cast({'presence_update', PresenceState}, #state{acct_id=AcctId
}=State) ->
lager:debug("no custom presence id, using ~s for ~s", [AgentId, PresenceState]),
acdc_util:presence_update(AcctId, AgentId, PresenceState
,kz_util:to_hex_binary(crypto:hash(md5, AgentId))
,kz_term:to_hex_binary(crypto:hash(md5, AgentId))
),
{'noreply', State};
handle_cast({'presence_update', PresenceState}, #state{acct_id=AcctId
,agent_presence_id=PresenceId
}=State) ->
lager:debug("custom presence id, using ~s for ~s", [PresenceId, PresenceState]),
acdc_util:presence_update(AcctId, PresenceId, PresenceState
,kz_util:to_hex_binary(crypto:hash(md5, PresenceId))
,kz_term:to_hex_binary(crypto:hash(md5, PresenceId))
),
{'noreply', State};

Expand Down Expand Up @@ -1046,7 +1046,7 @@ send_sync_response(ReqJObj, AcctId, AgentId, MyId, MyQ, Status, Options) ->
Prop = [{<<"Account-ID">>, AcctId}
,{<<"Agent-ID">>, AgentId}
,{<<"Process-ID">>, MyId}
,{<<"Status">>, kz_util:to_binary(Status)}
,{<<"Status">>, kz_term:to_binary(Status)}
,{<<"Msg-ID">>, kz_json:get_value(<<"Msg-ID">>, ReqJObj)}
| Options ++ kz_api:default_headers(MyQ, ?APP_NAME, ?APP_VERSION)
],
Expand Down Expand Up @@ -1089,7 +1089,7 @@ maybe_connect_to_agent(MyQ, EPs, Call, Timeout, AgentId, _CdrUrl) ->
MCallId = kapps_call:call_id(Call),
kz_util:put_callid(MCallId),

ReqId = kz_util:rand_hex_binary(6),
ReqId = kz_binary:rand_hex(6),
AcctId = kapps_call:account_id(Call),

CCVs = props:filter_undefined([{<<"Account-ID">>, AcctId}
Expand All @@ -1114,7 +1114,7 @@ maybe_connect_to_agent(MyQ, EPs, Call, Timeout, AgentId, _CdrUrl) ->
end, {[], []}, EPs),

Prop = props:filter_undefined(
[{<<"Msg-ID">>, kz_util:rand_hex_binary(6)}
[{<<"Msg-ID">>, kz_binary:rand_hex(6)}
,{<<"Custom-Channel-Vars">>, kz_json:from_list(CCVs)}
,{<<"Timeout">>, Timeout}
,{<<"Endpoints">>, Endpoints}
Expand Down Expand Up @@ -1142,8 +1142,8 @@ maybe_connect_to_agent(MyQ, EPs, Call, Timeout, AgentId, _CdrUrl) ->

-spec outbound_call_id(kapps_call:call() | ne_binary(), ne_binary()) -> ne_binary().
outbound_call_id(CallId, AgentId) when is_binary(CallId) ->
Hash = kz_util:to_hex_binary(erlang:md5(CallId)),
Rnd = kz_util:rand_hex_binary(4),
Hash = kz_term:to_hex_binary(erlang:md5(CallId)),
Rnd = kz_binary:rand_hex(4),
<<Hash/binary, "-", AgentId/binary, "-", Rnd/binary>>;
outbound_call_id(Call, AgentId) ->
outbound_call_id(kapps_call:call_id(Call), AgentId).
Expand Down
8 changes: 4 additions & 4 deletions applications/acdc/src/acdc_agent_maintenance.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ status() -> acdc_agents_sup:status().

-spec acct_status(text()) -> 'ok'.
acct_status(AcctId) when not is_binary(AcctId) ->
acct_status(kz_util:to_binary(AcctId));
acct_status(kz_term:to_binary(AcctId));
acct_status(AcctId) ->
case acdc_agents_sup:find_acct_supervisors(AcctId) of
[] -> lager:info("no agents with account id ~s available", [AcctId]);
Expand All @@ -36,7 +36,7 @@ acct_status(AcctId) ->
-spec agent_status(text(), text()) -> 'ok'.
agent_status(AcctId, AgentId) when not is_binary(AcctId);
not is_binary(AgentId) ->
agent_status(kz_util:to_binary(AcctId), kz_util:to_binary(AgentId));
agent_status(kz_term:to_binary(AcctId), kz_term:to_binary(AgentId));
agent_status(AcctId, AgentId) ->
case acdc_agents_sup:find_agent_supervisor(AcctId, AgentId) of
'undefined' -> lager:info("no agent ~s in account ~s available", [AgentId, AcctId]);
Expand All @@ -45,7 +45,7 @@ agent_status(AcctId, AgentId) ->

-spec acct_restart(text()) -> 'ok'.
acct_restart(AcctId) when not is_binary(AcctId) ->
acct_restart(kz_util:to_binary(AcctId));
acct_restart(kz_term:to_binary(AcctId));
acct_restart(AcctId) ->
case acdc_agents_sup:find_acct_supervisors(AcctId) of
[] -> lager:info("no agents with account id ~s available", [AcctId]);
Expand All @@ -60,7 +60,7 @@ acct_restart(AcctId) ->
-spec agent_restart(text(), text()) -> 'ok'.
agent_restart(AcctId, AgentId) when not is_binary(AcctId);
not is_binary(AgentId) ->
agent_restart(kz_util:to_binary(AcctId), kz_util:to_binary(AgentId));
agent_restart(kz_term:to_binary(AcctId), kz_term:to_binary(AgentId));
agent_restart(AcctId, AgentId) ->
case acdc_agents_sup:find_agent_supervisor(AcctId, AgentId) of
'undefined' -> lager:info("no agent ~s in account ~s available", [AgentId, AcctId]);
Expand Down
10 changes: 5 additions & 5 deletions applications/acdc/src/acdc_agent_stats.erl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ handle_status_stat(JObj, Props) ->

-spec status_stat_id(ne_binary(), pos_integer(), any()) -> ne_binary().
status_stat_id(AgentId, Timestamp, _EventName) ->
<<AgentId/binary, "::", (kz_util:to_binary(Timestamp))/binary>>.
<<AgentId/binary, "::", (kz_term:to_binary(Timestamp))/binary>>.

-spec handle_status_query(kz_json:object(), kz_proplist()) -> 'ok'.
handle_status_query(JObj, _Prop) ->
Expand Down Expand Up @@ -273,7 +273,7 @@ status_match_builder_fold(<<"Start-Range">>, Start, {StatusStat, Contstraints})
Now = kz_util:current_tstamp(),
Past = Now - ?CLEANUP_WINDOW,

try kz_util:to_integer(Start) of
try kz_term:to_integer(Start) of
N when N < Past ->
{'error', kz_json:from_list([{<<"Start-Range">>, <<"supplied value is too far in the past">>}
,{<<"Window-Size">>, ?CLEANUP_WINDOW}
Expand All @@ -297,7 +297,7 @@ status_match_builder_fold(<<"End-Range">>, End, {StatusStat, Contstraints}) ->
Now = kz_util:current_tstamp(),
Past = Now - ?CLEANUP_WINDOW,

try kz_util:to_integer(End) of
try kz_term:to_integer(End) of
N when N < Past ->
{'error', kz_json:from_list([{<<"End-Range">>, <<"supplied value is too far in the past">>}
,{<<"Window-Size">>, ?CLEANUP_WINDOW}
Expand Down Expand Up @@ -353,7 +353,7 @@ trim_query_statuses(A, Statuses, Limit) ->
{A, Trimmed}.

trim_query_statuses_fold(TBin, Datum, {Ks, Data}=Acc) ->
T = kz_util:to_integer(TBin),
T = kz_term:to_integer(TBin),
case lists:min(Ks) of
N when N < T ->
{[T | lists:delete(N, Ks)]
Expand All @@ -369,7 +369,7 @@ query_status_fold(#status_stat{agent_id=AgentId
,timestamp=T
}=Stat, Acc) ->
Doc = status_stat_to_doc(Stat),
kz_json:set_value([AgentId, kz_util:to_binary(T)], Doc, Acc).
kz_json:set_value([AgentId, kz_term:to_binary(T)], Doc, Acc).

-spec status_stat_to_doc(status_stat()) -> kz_json:object().
status_stat_to_doc(#status_stat{id=Id
Expand Down
4 changes: 2 additions & 2 deletions applications/acdc/src/acdc_agent_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ map_reduce_agent_statuses(AgentId, Statuses) ->

reduce_agent_statuses(_, Data, {T, _}=Acc) ->
StatT = kz_json:get_value(<<"timestamp">>, Data),
try kz_util:to_integer(StatT) of
try kz_term:to_integer(StatT) of
Timestamp when Timestamp > T ->
{Timestamp, Data};
_ -> Acc
Expand Down Expand Up @@ -369,7 +369,7 @@ build_agent_view_options(AgentId, [_| ReqOptions], ViewOptions) ->
-spec find_most_recent_fold(integer() | ne_binary(), kz_json:object(), {integer(), kz_json:object()}) ->
{integer(), kz_json:object()}.
find_most_recent_fold(K, V, {T, _V}=Acc) ->
try kz_util:to_integer(K) of
try kz_term:to_integer(K) of
N when N > T ->
{N, kz_doc:public_fields(V)};
_ -> Acc
Expand Down
6 changes: 3 additions & 3 deletions applications/acdc/src/acdc_maintenance.erl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ log_current_queues(Agents) ->
log_current_queue(AgentSup) ->
AgentL = acdc_agent_sup:listener(AgentSup),
io:format(" ~35s | ~s~n", [acdc_agent_listener:id(AgentL)
,kz_util:join_binary(acdc_agent_listener:queues(AgentL))
,kz_binary:join(acdc_agent_listener:queues(AgentL))
]).

-spec current_agents(ne_binary()) -> 'ok'.
Expand All @@ -110,7 +110,7 @@ log_current_agent(QueueSup) ->
QueueM = acdc_queue_sup:manager(QueueSup),
{_AccountId, QueueId} = acdc_queue_manager:config(QueueM),
io:format(" ~35s | ~s~n", [QueueId
,kz_util:join_binary(acdc_queue_manager:current_agents(QueueM))
,kz_binary:join(acdc_queue_manager:current_agents(QueueM))
]).

-spec current_calls(ne_binary()) -> 'ok'.
Expand Down Expand Up @@ -463,7 +463,7 @@ agent_pause(AcctId, AgentId, Timeout) ->
Update = props:filter_undefined(
[{<<"Account-ID">>, AcctId}
,{<<"Agent-ID">>, AgentId}
,{<<"Timeout">>, kz_util:to_integer(Timeout)}
,{<<"Timeout">>, kz_term:to_integer(Timeout)}
| kz_api:default_headers(?APP_NAME, ?APP_VERSION)
]),
kapps_util:amqp_pool_send(Update, fun kapi_acdc_agent:publish_pause/1),
Expand Down
2 changes: 1 addition & 1 deletion applications/acdc/src/acdc_queue_fsm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ cdr_url(FSM) ->
-spec init(list()) -> {'ok', atom(), state()}.
init([MgrPid, ListenerPid, QueueJObj]) ->
QueueId = kz_doc:id(QueueJObj),
kz_util:put_callid(<<"fsm_", QueueId/binary, "_", (kz_util:to_binary(self()))/binary>>),
kz_util:put_callid(<<"fsm_", QueueId/binary, "_", (kz_term:to_binary(self()))/binary>>),

webseq:start(?WSD_ID),
webseq:reg_who(?WSD_ID, self(), iolist_to_binary([<<"qFSM">>, pid_to_list(self())])),
Expand Down
2 changes: 1 addition & 1 deletion applications/acdc/src/acdc_queue_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ send_probe(JObj, State) ->
PresenceUpdate =
[{<<"State">>, State}
,{<<"Presence-ID">>, To}
,{<<"Call-ID">>, kz_util:to_hex_binary(crypto:hash(md5, To))}
,{<<"Call-ID">>, kz_term:to_hex_binary(crypto:hash(md5, To))}
| kz_api:default_headers(?APP_NAME, ?APP_VERSION)
],
kapi_presence:publish_update(PresenceUpdate).
2 changes: 1 addition & 1 deletion applications/acdc/src/acdc_queue_listener.erl
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ publish_sync_resp(Strategy, StrategyState, ReqJObj, Id) ->
[{<<"Account-ID">>, kz_json:get_value(<<"Account-ID">>, ReqJObj)}
,{<<"Queue-ID">>, kz_json:get_value(<<"Queue-ID">>, ReqJObj)}
,{<<"Msg-ID">>, kz_json:get_value(<<"Msg-ID">>, ReqJObj)}
,{<<"Current-Strategy">>, kz_util:to_binary(Strategy)}
,{<<"Current-Strategy">>, kz_term:to_binary(Strategy)}
,{<<"Strategy-State">>, StrategyState}
,{<<"Process-ID">>, Id}
| kz_api:default_headers(?APP_NAME, ?APP_VERSION)
Expand Down
6 changes: 3 additions & 3 deletions applications/acdc/src/acdc_stats.erl
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ call_match_builder_fold(<<"Start-Range">>, Start, {CallStat, Contstraints}) ->
Now = kz_util:current_tstamp(),
Past = Now - ?CLEANUP_WINDOW,

try kz_util:to_integer(Start) of
try kz_term:to_integer(Start) of
N when N < Past ->
{'error', kz_json:from_list([{<<"Start-Range">>, <<"supplied value is too far in the past">>}
,{<<"Window-Size">>, ?CLEANUP_WINDOW}
Expand All @@ -510,7 +510,7 @@ call_match_builder_fold(<<"End-Range">>, End, {CallStat, Contstraints}) ->
Now = kz_util:current_tstamp(),
Past = Now - ?CLEANUP_WINDOW,

try kz_util:to_integer(End) of
try kz_term:to_integer(End) of
N when N < Past ->
{'error', kz_json:from_list([{<<"End-Range">>, <<"supplied value is too far in the past">>}
,{<<"Window-Size">>, ?CLEANUP_WINDOW}
Expand All @@ -531,7 +531,7 @@ call_match_builder_fold(<<"End-Range">>, End, {CallStat, Contstraints}) ->
call_match_builder_fold(_, _, Acc) -> Acc.

is_valid_call_status(S) ->
Status = kz_util:to_lower_binary(S),
Status = kz_term:to_lower_binary(S),
case lists:member(Status, ?VALID_STATUSES) of
'true' -> {'true', Status};
'false' -> 'false'
Expand Down
6 changes: 3 additions & 3 deletions applications/acdc/src/acdc_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ send_cdr('undefined', _JObj, _Retries) ->
send_cdr(Url, _JObj, 0) ->
lager:debug("trying to send cdr to ~s failed retry count", [Url]);
send_cdr(Url, JObj, Retries) ->
case kz_http:post(kz_util:to_list(Url)
case kz_http:post(kz_term:to_list(Url)
,[{"Content-Type", "application/json"}]
, kz_json:encode(JObj)
,[{'timeout', 1000}]
Expand Down Expand Up @@ -101,7 +101,7 @@ agent_devices(AcctDb, AgentId) ->
-spec get_endpoints(kapps_call:call(), ne_binary() | kazoo_data:get_results_return()) ->
kz_json:objects().
get_endpoints(Call, ?NE_BINARY = AgentId) ->
Params = kz_json:from_list([{<<"source">>, kz_util:to_binary(?MODULE)}]),
Params = kz_json:from_list([{<<"source">>, kz_term:to_binary(?MODULE)}]),
kz_endpoints:by_owner_id(AgentId, Params, Call).

%% Handles subscribing/unsubscribing from call events
Expand Down Expand Up @@ -132,4 +132,4 @@ unbind_from_call_events(Call, Pid) -> unbind_from_call_events(kapps_call:call_id
-spec proc_id(pid(), atom() | ne_binary()) -> ne_binary().
proc_id() -> proc_id(self()).
proc_id(Pid) -> proc_id(Pid, node()).
proc_id(Pid, Node) -> list_to_binary([kz_util:to_binary(Node), "-", pid_to_list(Pid)]).
proc_id(Pid, Node) -> list_to_binary([kz_term:to_binary(Node), "-", pid_to_list(Pid)]).
2 changes: 1 addition & 1 deletion applications/acdc/src/kapi_acdc_queue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ member_connect_resp_v(JObj) ->
-define(MEMBER_CONNECT_WIN_VALUES, [{<<"Event-Category">>, <<"member">>}
,{<<"Event-Name">>, <<"connect_win">>}
]).
-define(MEMBER_CONNECT_WIN_TYPES, [{<<"Record-Caller">>, fun kz_util:is_boolean/1}]).
-define(MEMBER_CONNECT_WIN_TYPES, [{<<"Record-Caller">>, fun kz_term:is_boolean/1}]).

-spec member_connect_win(api_terms()) ->
{'ok', iolist()} |
Expand Down
16 changes: 8 additions & 8 deletions applications/ananke/src/ananke_listener.erl
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ parse_time_token(TokenName, Schedule, Default) ->
case kz_json:get_value(TokenName, Schedule, Default) of
<<"all">> -> 'all';
'all' -> 'all';
Tokens when is_list(Tokens) -> [kz_util:to_integer(X) || X <- Tokens];
Token -> kz_util:to_integer(Token)
Tokens when is_list(Tokens) -> [kz_term:to_integer(X) || X <- Tokens];
Token -> kz_term:to_integer(Token)
end.

-spec action_fun(ne_binary(), kz_json:object()) -> amqp_cron_callback().
Expand All @@ -266,7 +266,7 @@ action_fun(Type, _JObj) ->
-spec action_name(ne_binary(), kz_json:object(), time()) -> ne_binary().
action_name(ActionType, Action, Times) ->
ActionSuffix = action_suffixes(ActionType, Action),
kz_util:join_binary([ActionType | ActionSuffix] ++ [time_suffix(Times)], "-").
kz_binary:join([ActionType | ActionSuffix] ++ [time_suffix(Times)], "-").

-spec action_suffixes(ne_binary(), kz_json:object()) -> ne_binaries().
action_suffixes(<<"check_voicemail">>, JObj) ->
Expand All @@ -276,17 +276,17 @@ action_suffixes(_Type, _JObj) -> [].
-spec time_suffix(time()) -> ne_binary().
time_suffix({'cron', {Minutes, Hours, MDays, Months, Weekdays}}) ->
Time = [time_tokens_to_binary(T) || T <- [Minutes, Hours, MDays, Months, Weekdays]],
kz_util:join_binary(Time, "-");
kz_binary:join(Time, "-");
time_suffix({'oneshot', {{Year, Month, Day}, {Hour, Minute, Second}}}) ->
Time = [kz_util:to_binary(B) || B <- [Year, Month, Day, Hour, Minute, Second]],
kz_util:join_binary(Time, "-");
Time = [kz_term:to_binary(B) || B <- [Year, Month, Day, Hour, Minute, Second]],
kz_binary:join(Time, "-");
time_suffix({'sleeper', MilliSeconds}) ->
kz_util:to_binary(MilliSeconds).
kz_term:to_binary(MilliSeconds).

-spec time_tokens_to_binary(time_token_value()) -> ne_binary().
time_tokens_to_binary('all') -> <<"all">>;
time_tokens_to_binary(Tokens) when is_list(Tokens) ->
kz_util:join_binary([kz_util:to_binary(X) || X <- Tokens], ",").
kz_binary:join([kz_term:to_binary(X) || X <- Tokens], ",").

-spec unknown_type(api_binary()) -> 'ok'.
unknown_type(Type) ->
Expand Down
Loading

0 comments on commit 8407afa

Please sign in to comment.