Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.
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": "ac37b50", "specHash": "c27c421", "version": "1.15.0" }
{ "engineHash": "c34d8bf", "specHash": "c27c421", "version": "1.15.0" }
18 changes: 15 additions & 3 deletions docs/archives.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ This operation is performed by calling function `get_archives_v2025_r0`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/get-archives/).

_Currently we don't have an example for calling `get_archives_v2025_r0` in integration tests_
<!-- sample get_archives_v2025.0 -->

```python
client.archives.get_archives_v2025_r0(limit=100)
```

### Arguments

Expand Down Expand Up @@ -41,7 +45,11 @@ This operation is performed by calling function `create_archive_v2025_r0`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/post-archives/).

_Currently we don't have an example for calling `create_archive_v2025_r0` in integration tests_
<!-- sample post_archives_v2025.0 -->

```python
client.archives.create_archive_v2025_r0(archive_name)
```

### Arguments

Expand All @@ -67,7 +75,11 @@ This operation is performed by calling function `delete_archive_by_id_v2025_r0`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/delete-archives-id/).

_Currently we don't have an example for calling `delete_archive_by_id_v2025_r0` in integration tests_
<!-- sample delete_archives_id_v2025.0 -->

```python
client.archives.delete_archive_by_id_v2025_r0(archive.id)
```

### Arguments

Expand Down
31 changes: 31 additions & 0 deletions test/archives.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from box_sdk_gen.internal.utils import to_string

import pytest

from box_sdk_gen.client import BoxClient

from box_sdk_gen.schemas.v2025_r0.archive_v2025_r0 import ArchiveV2025R0

from box_sdk_gen.schemas.v2025_r0.archives_v2025_r0 import ArchivesV2025R0

from box_sdk_gen.internal.utils import get_uuid

from box_sdk_gen.internal.utils import get_env_var

from test.commons import get_default_client_with_user_subject

user_id: str = get_env_var('USER_ID')

client: BoxClient = get_default_client_with_user_subject(user_id)


def testArchivesCreateListDelete():
archive_name: str = get_uuid()
archive: ArchiveV2025R0 = client.archives.create_archive_v2025_r0(archive_name)
assert to_string(archive.type) == 'archive'
assert archive.name == archive_name
archives: ArchivesV2025R0 = client.archives.get_archives_v2025_r0(limit=100)
assert len(archives.entries) > 0
client.archives.delete_archive_by_id_v2025_r0(archive.id)
with pytest.raises(Exception):
client.archives.delete_archive_by_id_v2025_r0(archive.id)