Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatted SDK & added NCW endpoints #125

Merged
merged 8 commits into from
Oct 18, 2023
Merged

formatted SDK & added NCW endpoints #125

merged 8 commits into from
Oct 18, 2023

Conversation

yanlevi
Copy link
Contributor

@yanlevi yanlevi commented Sep 10, 2023

No description provided.

fireblocks_sdk/sdk.py Outdated Show resolved Hide resolved
fireblocks_sdk/sdk.py Outdated Show resolved Hide resolved
@idanya idanya merged commit b06374c into fireblocks:master Oct 18, 2023
2 checks passed
Comment on lines -1726 to -1787
def get_users_groups(self) -> List[Dict[str, Any]]:
"""
Gets all Users Groups for your tenant
"""

url = "/v1/users_groups"

return self._get_request(url)

def get_users_group(self, id: str) -> Dict[str, Any]:
"""
Gets a Users Group by ID
@param id: The ID of the User
"""

url = f"/v1/users_groups/{id}"

return self._get_request(url)

def create_user_group(self, group_name: str, member_ids: Optional[List[str]] = None) -> Dict[str, Any]:
"""
Creates a new Users Group
@param group_name: The name of the Users Group
@param member_ids: The ids of the Users Group members
"""

url = "/v1/users_groups"

body = {
"groupName": group_name,
"memberIds": member_ids
}

return self._post_request(url, body)

def update_user_group(self, id: str, group_name: Optional[str] = None, member_ids: Optional[List[str]] = None) -> Dict[str, Any]:
"""
Updates a Users Group
@param id: The ID of the Users Group
@param group_name: The name of the Users Group
@param member_ids: The ids of the Users Group members
"""

url = f"/v1/users_groups/{id}"

body = {
"groupName": group_name,
"memberIds": member_ids
}

return self._put_request(url, body)

def delete_user_group(self, id: str) -> None:
"""
Deletes a Users Group
@param id: The ID of the Users Group
"""

url = f"/v1/users_groups/{id}"

return self._delete_request(url)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you remove the /users_groups methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a mistake, due to the PR existing for a long time, we should put them back

Copy link
Collaborator

Choose a reason for hiding this comment

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

@yanlevi @idanya Please do that as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants