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
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"client_class_name": "CloudPDFClient",
"environment_class_name": "CloudPDFEnvironment"
},
"originGitCommit": "622018abaf6e4578d1f4d8377982c48b92c9ced3",
"originGitCommit": "3283147ded32fc15c426768f75557a4d95943d84",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0a20",
"requestedVersion": "3.0.0a21",
"ciProvider": "github"
}
8 changes: 4 additions & 4 deletions cloudpdf-generation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"language": "python",
"canonicalVersion": "3.0.0-next.20",
"sdkVersion": "3.0.0a20",
"canonicalVersion": "3.0.0-next.21",
"sdkVersion": "3.0.0a21",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "47d739acb956ce8ba0c3990117e505be2e9406038d9e0cd1729608921a40b2d9",
"gitCommit": "622018abaf6e4578d1f4d8377982c48b92c9ced3",
"openapiSha256": "f85648401f5c683a32e2b50acc3d753df9f4ce06df8492e5d2b599beceb0e788",
"gitCommit": "3283147ded32fc15c426768f75557a4d95943d84",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "cloudpdf"
version = "3.0.0a20"
version = "3.0.0a21"
description = "The official Python SDK for the CloudPDF API."
readme = "README.md"
authors = ["CloudPDF <hello@cloudpdf.com>"]
Expand Down
86 changes: 86 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,92 @@ client.tenants.delete(
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.tenants.<a href="src/cloudpdf/tenants/client.py">update</a>(...) -> TenantsUpdate200Response</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from cloudpdf import CloudPDFClient, TenantFeature
from cloudpdf.environment import CloudPDFEnvironment

client = CloudPDFClient(
token="<token>",
environment=CloudPDFEnvironment.SAAS,
)

client.tenants.update(
tenant_id="tenantId",
features=[
TenantFeature(
id="id",
)
],
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**tenant_id:** `str`

</dd>
</dl>

<dl>
<dd>

**features:** `typing.List[TenantFeature]`

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down
21 changes: 21 additions & 0 deletions src/cloudpdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,8 @@
PdfLinkTarget_Uri,
PdfPageActions,
ResolvedFontRun,
TenantFeature,
TenantFeatureStopped,
TenantsCreate200Response,
TenantsCreate200ResponseTenant,
TenantsCreate200ResponseTenantStatus,
Expand All @@ -2129,6 +2131,11 @@
TenantsList400Response,
TenantsResumeResponse,
TenantsSuspendResponse,
TenantsUpdate200Response,
TenantsUpdate200ResponseTenant,
TenantsUpdate200ResponseTenantStatus,
TenantsUpdate400Response,
TenantsUpdate404Response,
TenantsUsage200Response,
TenantsUsage200ResponseMetrics,
TenantsUsage400Response,
Expand Down Expand Up @@ -4382,6 +4389,8 @@
"PdfLinkTarget_Uri": ".types",
"PdfPageActions": ".types",
"ResolvedFontRun": ".types",
"TenantFeature": ".types",
"TenantFeatureStopped": ".types",
"TenantsCreate200Response": ".types",
"TenantsCreate200ResponseTenant": ".types",
"TenantsCreate200ResponseTenantStatus": ".types",
Expand All @@ -4397,6 +4406,11 @@
"TenantsList400Response": ".types",
"TenantsResumeResponse": ".types",
"TenantsSuspendResponse": ".types",
"TenantsUpdate200Response": ".types",
"TenantsUpdate200ResponseTenant": ".types",
"TenantsUpdate200ResponseTenantStatus": ".types",
"TenantsUpdate400Response": ".types",
"TenantsUpdate404Response": ".types",
"TenantsUsage200Response": ".types",
"TenantsUsage200ResponseMetrics": ".types",
"TenantsUsage400Response": ".types",
Expand Down Expand Up @@ -6629,6 +6643,8 @@ def __dir__():
"PdfLinkTarget_Uri",
"PdfPageActions",
"ResolvedFontRun",
"TenantFeature",
"TenantFeatureStopped",
"TenantsCreate200Response",
"TenantsCreate200ResponseTenant",
"TenantsCreate200ResponseTenantStatus",
Expand All @@ -6644,6 +6660,11 @@ def __dir__():
"TenantsList400Response",
"TenantsResumeResponse",
"TenantsSuspendResponse",
"TenantsUpdate200Response",
"TenantsUpdate200ResponseTenant",
"TenantsUpdate200ResponseTenantStatus",
"TenantsUpdate400Response",
"TenantsUpdate404Response",
"TenantsUsage200Response",
"TenantsUsage200ResponseMetrics",
"TenantsUsage400Response",
Expand Down
4 changes: 2 additions & 2 deletions src/cloudpdf/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "cloudpdf/3.0.0a20",
"User-Agent": "cloudpdf/3.0.0a21",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "cloudpdf",
"X-Fern-SDK-Version": "3.0.0a20",
"X-Fern-SDK-Version": "3.0.0a21",
**(self.get_custom_headers() or {}),
}
token = self._get_token()
Expand Down
96 changes: 96 additions & 0 deletions src/cloudpdf/tenants/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.tenant_feature import TenantFeature
from ..types.tenants_create200response import TenantsCreate200Response
from ..types.tenants_get200response import TenantsGet200Response
from ..types.tenants_list200response import TenantsList200Response
from ..types.tenants_update200response import TenantsUpdate200Response
from ..types.tenants_usage200response import TenantsUsage200Response
from .raw_client import AsyncRawTenantsClient, RawTenantsClient

Expand Down Expand Up @@ -152,6 +154,49 @@ def delete(self, tenant_id: str, *, request_options: typing.Optional[RequestOpti
_response = self._raw_client.delete(tenant_id, request_options=request_options)
return _response.data

def update(
self,
tenant_id: str,
*,
features: typing.Sequence[TenantFeature],
request_options: typing.Optional[RequestOptions] = None,
) -> TenantsUpdate200Response:
"""
A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds.

Parameters
----------
tenant_id : str

features : typing.Sequence[TenantFeature]

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
TenantsUpdate200Response
OK

Examples
--------
from cloudpdf import CloudPDFClient, TenantFeature

client = CloudPDFClient(
token="YOUR_TOKEN",
)
client.tenants.update(
tenant_id="tenantId",
features=[
TenantFeature(
id="id",
)
],
)
"""
_response = self._raw_client.update(tenant_id, features=features, request_options=request_options)
return _response.data

def resume(self, tenant_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
"""
Parameters
Expand Down Expand Up @@ -427,6 +472,57 @@ async def main() -> None:
_response = await self._raw_client.delete(tenant_id, request_options=request_options)
return _response.data

async def update(
self,
tenant_id: str,
*,
features: typing.Sequence[TenantFeature],
request_options: typing.Optional[RequestOptions] = None,
) -> TenantsUpdate200Response:
"""
A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds.

Parameters
----------
tenant_id : str

features : typing.Sequence[TenantFeature]

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
TenantsUpdate200Response
OK

Examples
--------
import asyncio

from cloudpdf import AsyncCloudPDFClient, TenantFeature

client = AsyncCloudPDFClient(
token="YOUR_TOKEN",
)


async def main() -> None:
await client.tenants.update(
tenant_id="tenantId",
features=[
TenantFeature(
id="id",
)
],
)


asyncio.run(main())
"""
_response = await self._raw_client.update(tenant_id, features=features, request_options=request_options)
return _response.data

async def resume(self, tenant_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
"""
Parameters
Expand Down
Loading
Loading