diff --git a/odins_spear/methods/put.py b/odins_spear/methods/put.py index 5bbd722..33c9b6b 100644 --- a/odins_spear/methods/put.py +++ b/odins_spear/methods/put.py @@ -91,10 +91,7 @@ def auto_attendants_status(self, auto_attendant_user_ids: list, return self.requester.put(endpoint, data=data) - - - def auto_attendant(self, service_provider_id: str, group_id, - auto_attendant_user_id: str, updates: dict): + def auto_attendant(self, service_provider_id: str, group_id, auto_attendant_user_id: str, updates: dict): """Updates a single target Auto Attendant. Note: Needs the service instance profile to use this method. @@ -111,12 +108,15 @@ def auto_attendant(self, service_provider_id: str, group_id, endpoint = "/groups/auto-attendants" + if 'serviceInstanceProfile' not in updates: + updates.setdefault('serviceInstanceProfile', {}) + updates["serviceProviderId"] = service_provider_id updates["groupId"] = group_id updates["serviceUserId"] = auto_attendant_user_id return self.requester.put(endpoint, data=updates) - + def auto_attendant_submenu(self, auto_attendant_user_id: str, submenu_id: str, updates: dict):