Skip to content

Commit

Permalink
[4.3] expand summary to include other service sections (#6150)
Browse files Browse the repository at this point in the history
* expand summary to include other service sections

* in lieu of module
  • Loading branch information
k-anderson authored and icehess committed Nov 15, 2019
1 parent d786367 commit 41d839a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion core/kazoo_services/src/kz_services.erl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
]).

%%------------------------------------------------------------------------------
%% @doc Returns the account id of the kz_services:services()
%% @doc Returns the account id of the {@link services()}.
%% @end
%%------------------------------------------------------------------------------
-spec account_id(services()) -> kz_term:api_ne_binary().
Expand Down Expand Up @@ -748,10 +748,14 @@ summary(?NE_BINARY=Account) ->
],
summary(fetch(Account, FetchOptions));
summary(Services) ->
ServicesJObj = services_jobj(Services),
kz_json:from_list(
[{<<"plans">>
,kz_services_plans:assigned(Services)
}
,{<<"overrides">>
,kzd_services:overrides(ServicesJObj)
}
,{<<"invoices">>
,kz_services_invoices:public_json(invoices(Services))
}
Expand All @@ -764,6 +768,17 @@ summary(Services) ->
,{<<"ratedeck">>
,kz_services_ratedecks:fetch(Services)
}
,{<<"applications">>
,kz_services_applications:fetch(Services)
}
,{<<"limits">>
,kz_doc:public_fields(
kz_services_limits:fetch(Services)
)
}
,{<<"payment_tokens">>
,kz_services_payment_tokens:fetch(Services)
}
,{<<"billing_cycle">>
,summary_billing_cycle(Services)
}
Expand Down

0 comments on commit 41d839a

Please sign in to comment.