Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "10c68c7", "specHash": "62fdfd1", "version": "0.1.0" }
{ "engineHash": "9334953", "specHash": "c7acada", "version": "0.1.0" }
8 changes: 4 additions & 4 deletions box_sdk_gen/managers/user_collaborations.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def get_collaboration_by_id(
def update_collaboration_by_id(
self,
collaboration_id: str,
role: UpdateCollaborationByIdRole,
*,
role: Optional[UpdateCollaborationByIdRole] = None,
status: Optional[UpdateCollaborationByIdStatus] = None,
expires_at: Optional[DateTime] = None,
can_view_path: Optional[bool] = None,
Expand All @@ -208,13 +208,13 @@ def update_collaboration_by_id(
Can be used to change the owner of an item, or to


accept collaboration invites.
accept collaboration invites. In case of accepting collaboration invite, role is not required.

:param collaboration_id: The ID of the collaboration.
Example: "1234"
:type collaboration_id: str
:param role: The level of access granted.
:type role: UpdateCollaborationByIdRole
:param role: The level of access granted., defaults to None
:type role: Optional[UpdateCollaborationByIdRole], optional
:param status: Set the status of a `pending` collaboration invitation,
effectively accepting, or rejecting the invite., defaults to None
:type status: Optional[UpdateCollaborationByIdStatus], optional
Expand Down
6 changes: 3 additions & 3 deletions docs/box_sdk_gen/user_collaborations.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Returns a collaboration object.

Updates a collaboration.
Can be used to change the owner of an item, or to
accept collaboration invites.
accept collaboration invites. In case of accepting collaboration invite, role is not required.

This operation is performed by calling function `update_collaboration_by_id`.

Expand All @@ -49,14 +49,14 @@ See the endpoint docs at
<!-- sample put_collaborations_id -->

```python
client.user_collaborations.update_collaboration_by_id(collaboration_id, UpdateCollaborationByIdRole.VIEWER)
client.user_collaborations.update_collaboration_by_id(collaboration_id, role=UpdateCollaborationByIdRole.VIEWER)
```

### Arguments

- collaboration_id `str`
- The ID of the collaboration. Example: "1234"
- role `UpdateCollaborationByIdRole`
- role `Optional[UpdateCollaborationByIdRole]`
- The level of access granted.
- status `Optional[UpdateCollaborationByIdStatus]`
- Set the status of a `pending` collaboration invitation, effectively accepting, or rejecting the invite.
Expand Down
6 changes: 3 additions & 3 deletions test/box_sdk_gen/test/user_collaborations.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def testUserCollaborations():
assert collaboration_from_api.invite_email == None
updated_collaboration: Optional[Collaboration] = (
client.user_collaborations.update_collaboration_by_id(
collaboration_id, UpdateCollaborationByIdRole.VIEWER
collaboration_id, role=UpdateCollaborationByIdRole.VIEWER
)
)
assert to_string(updated_collaboration.role) == 'viewer'
Expand Down Expand Up @@ -94,7 +94,7 @@ def testConvertingUserCollaborationToOwnership():
assert to_string(collaboration.role) == 'editor'
owner_collaboration: Optional[Collaboration] = (
client.user_collaborations.update_collaboration_by_id(
collaboration.id, UpdateCollaborationByIdRole.OWNER
collaboration.id, role=UpdateCollaborationByIdRole.OWNER
)
)
assert owner_collaboration == None
Expand Down Expand Up @@ -133,7 +133,7 @@ def testExternalUserCollaborations():
assert collaboration_from_api.invite_email == user_login
updated_collaboration: Optional[Collaboration] = (
client.user_collaborations.update_collaboration_by_id(
collaboration_id, UpdateCollaborationByIdRole.VIEWER
collaboration_id, role=UpdateCollaborationByIdRole.VIEWER
)
)
assert to_string(updated_collaboration.role) == 'viewer'
Expand Down