From e4b35de9b7db9716903b4816a7d329c32baa5ce9 Mon Sep 17 00:00:00 2001 From: LivCurtis <133100222+LivCurtis@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:41:33 +0100 Subject: [PATCH 1/3] Added service_providers_trunk_group_call_capacity method --- odins_spear/methods/put.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/odins_spear/methods/put.py b/odins_spear/methods/put.py index 19b07f9..7532f91 100644 --- a/odins_spear/methods/put.py +++ b/odins_spear/methods/put.py @@ -1027,6 +1027,19 @@ def user_services(self, user_id: str, services: list =None, service_packs: list #THIRD PARTY EMERGENCY CALLING #TIME ZONES #TRUNK GROUPS + + def service_providers_trunk_group_call_capacity(self, service_provider_id: str, max_active_calls: int, bursting_max_active_calls: int): + + endpoint = "/service-providers/trunk-groups/call-capacity" + + data = { + "serviceProviderId": service_provider_id, + "maxActiveCalls": max_active_calls, + "burstingMaxActiveCalls": bursting_max_active_calls + } + + return self.requester.put(endpoint, data=data) + #TWO STAGE DIALING #USERS From 64fe6d9b14e3dc575016eacf2d4cde92370e5290 Mon Sep 17 00:00:00 2001 From: LivCurtis <133100222+LivCurtis@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:38:49 +0100 Subject: [PATCH 2/3] Added doc strings Added doc strings for service_providers_trunk_group_call_capacirty method --- odins_spear/methods/put.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/odins_spear/methods/put.py b/odins_spear/methods/put.py index 7532f91..d17047f 100644 --- a/odins_spear/methods/put.py +++ b/odins_spear/methods/put.py @@ -1029,6 +1029,15 @@ def user_services(self, user_id: str, services: list =None, service_packs: list #TRUNK GROUPS def service_providers_trunk_group_call_capacity(self, service_provider_id: str, max_active_calls: int, bursting_max_active_calls: int): + """ + Updates the max active calls and the bursting max active calls for the given service provider. + + Args: + service_provider_id (str): service provider id for which the max active calls needs to be updated + max_active_calls (int): the updated number of max active calls + bursting_max_active_calls: the updated number of bursting max active calls + + """ endpoint = "/service-providers/trunk-groups/call-capacity" From 726fad15c721def8f8527932ac29e020f6822262 Mon Sep 17 00:00:00 2001 From: LivCurtis <133100222+LivCurtis@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:02:27 +0100 Subject: [PATCH 3/3] Updated doc string Updated doc string to include '(int)' --- odins_spear/methods/put.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odins_spear/methods/put.py b/odins_spear/methods/put.py index d17047f..93477f3 100644 --- a/odins_spear/methods/put.py +++ b/odins_spear/methods/put.py @@ -1035,7 +1035,7 @@ def service_providers_trunk_group_call_capacity(self, service_provider_id: str, Args: service_provider_id (str): service provider id for which the max active calls needs to be updated max_active_calls (int): the updated number of max active calls - bursting_max_active_calls: the updated number of bursting max active calls + bursting_max_active_calls (int): the updated number of bursting max active calls """