Skip to content

Commit

Permalink
Finished get.py
Browse files Browse the repository at this point in the history
Updated rest of call forwarding functions
  • Loading branch information
malkin0xb8 committed Jul 5, 2024
1 parent 268c7c9 commit ca8d8ad
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion odins_spear/methods/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def group_call_centers(self, service_provider_id: str, group_id: str):
group_id (str): Target Group ID
Returns:
Dict: List of Call Centres and their settings.
Dict: List of Call Centers and their settings.
"""

endpoint = f"/groups/call-centers?serviceProviderId={service_provider_id}&groupId={group_id}"
Expand Down Expand Up @@ -335,20 +335,45 @@ def bulk_call_forwarding_not_reachable(self, service_provider_id: str, group_id:
# CALL FORWARDING SELECTIVE

def user_call_forwarding_selective(self, user_id: str):
"""Retrieves the Forwarding Selective status for a specified User, alongside the criteria.
Args:
user_id (str): Target User ID
Returns:
Dict: Forwarding enabled status and the Forwarding criteria.
"""

endpoint = f"/users/call-forwarding-selective?userId={user_id}"

return self.requester.get(endpoint)


def user_call_forwarding_selective_criterias(self, user_id: str):
"""Retrieves the Forwarding Selective status for a specified User, alongside the criteria's assigned.
Args:
user_id (str): Target User ID
Returns:
Dict: Forwarding enabled status and the Forwarding criteria's names and settings.
"""

endpoint = f"/users/call-forwarding-selective/criteria?userId={user_id}"

return self.requester.get(endpoint)


def user_call_forwarding_selective_criteria(self, user_id: str, criteria_name: str):
"""Retrieves the Forwarding Selective status for a specified User, alongside the specified Criteria
Args:
user_id (str): Target User ID
criteria_name (str): Target Criteria Name
Returns:
Dict: Forwarding enabled status and the specified Criterias Settings.
"""

endpoint = f"/users/call-forwarding-selective/criteria?criteriaName={criteria_name}&userId={user_id}"

Expand All @@ -359,6 +384,16 @@ def user_call_forwarding_selective_criteria(self, user_id: str, criteria_name: s
# CALL PICKUP

def call_pickup_group_user(self, service_provider_id, group_id, user_id):
"""Retrieves Pickup Group information for the specified user.
Args:
service_provider_id (str): Target Service Provider ID
group_id (str): The Target Group ID the user is apart of.
user_id (str): Target User ID
Returns:
Dict: Specified users pickup group, and the users within that group.
"""

endpoint = f"/groups/call-pickup/user?serviceProviderId={service_provider_id}&groupId={group_id}&userId={user_id}"

Expand Down

1 comment on commit ca8d8ad

@malkin0xb8
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im sorry, I lied.

Please sign in to comment.