From f20307d04fd5755216b775f50467b8a89feab765 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 31 Oct 2024 13:32:13 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.423.5 --- .speakeasy/workflow.lock | 10 +++---- sync-for-payables/.speakeasy/gen.lock | 30 +++++++++++++++---- sync-for-payables/.speakeasy/gen.yaml | 2 +- sync-for-payables/README.md | 6 ++-- sync-for-payables/RELEASES.md | 12 +++++++- sync-for-payables/docs/sdks/bills/README.md | 12 ++++++-- sync-for-payables/poetry.lock | 2 +- sync-for-payables/pyproject.toml | 4 +-- .../src/codat_sync_for_payables/_version.py | 2 +- .../src/codat_sync_for_payables/bills.py | 26 ++++++++-------- .../sdkconfiguration.py | 8 ++--- 11 files changed, 74 insertions(+), 40 deletions(-) diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ae1f0b4fc..392196e44 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.423.3 +speakeasyVersion: 1.423.5 sources: accounting-source: sourceNamespace: accounting-source @@ -65,8 +65,8 @@ sources: - main sync-for-payables-source: sourceNamespace: sync-for-payables-source - sourceRevisionDigest: sha256:666b91d3454006f19097463c442428b273b95d632e0bc0099b6db10194f7284e - sourceBlobDigest: sha256:1ffa6da669abbf5bb7fef62b991e1c237af95f876b930288b8ab14994e0ab0b5 + sourceRevisionDigest: sha256:9b7390685375f6bb8f444cfdaef0cf211fe30a63abac80c98d441203bd76d654 + sourceBlobDigest: sha256:f472244dc98845d90f55da060a2cc4acee05c771a89a0ff55bc5db04108e5693 tags: - latest - main @@ -126,8 +126,8 @@ targets: sync-for-payables-library: source: sync-for-payables-source sourceNamespace: sync-for-payables-source - sourceRevisionDigest: sha256:666b91d3454006f19097463c442428b273b95d632e0bc0099b6db10194f7284e - sourceBlobDigest: sha256:1ffa6da669abbf5bb7fef62b991e1c237af95f876b930288b8ab14994e0ab0b5 + sourceRevisionDigest: sha256:9b7390685375f6bb8f444cfdaef0cf211fe30a63abac80c98d441203bd76d654 + sourceBlobDigest: sha256:f472244dc98845d90f55da060a2cc4acee05c771a89a0ff55bc5db04108e5693 sync-for-payables-version-1-library: source: sync-for-payables-version-1-source sourceNamespace: sync-for-payables-version-1-source diff --git a/sync-for-payables/.speakeasy/gen.lock b/sync-for-payables/.speakeasy/gen.lock index 51c862881..d38758a53 100644 --- a/sync-for-payables/.speakeasy/gen.lock +++ b/sync-for-payables/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 0722f07c-657c-4062-93f1-39ee3fe757d0 management: - docChecksum: 16c2aba5060738f14671556b6526c400 + docChecksum: c0f4a56a46c488781ea9be7def894f8c docVersion: 3.0.0 - speakeasyVersion: 1.423.3 - generationVersion: 2.442.11 - releaseVersion: 6.0.0 - configChecksum: 969122e26723670a0043a6789d53d844 + speakeasyVersion: 1.423.5 + generationVersion: 2.445.1 + releaseVersion: 7.0.0 + configChecksum: cac49a7fdde1648960a7e91570796611 repoURL: https://github.com/codatio/client-sdk-python.git repoSubDirectory: sync-for-payables installationURL: https://github.com/codatio/client-sdk-python.git#subdirectory=sync-for-payables @@ -15,7 +15,7 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.4 - core: 5.6.0 + core: 5.6.1 decimal: 1.0.0 defaultEnabledRetries: 0.2.0 deprecations: 3.0.0 @@ -680,6 +680,15 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + Attachment metadata: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "EILBDVJVNUAGVKRQ" + responses: + "201": + application/json: {"id": "422f093f-e556-4bf3-91c0-93af70c3e850", "name": "receipt.png", "contentType": "image/png", "dateCreated": "2022-10-23T00:00:00.000Z", "fileSize": 100, "includeWhenSent": true, "sourceModifiedDate": "2022-05-26T10:34:10Z"} list-bill-attachments: Info: parameters: @@ -699,6 +708,15 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + Attachments: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "EILBDVJVNUAGVKRQ" + responses: + "200": + application/json: [{"id": "422f093f-e556-4bf3-91c0-93af70c3e850", "name": "receipt.png", "contentType": "image/png", "dateCreated": "2022-10-23T00:00:00.000Z", "fileSize": 100, "includeWhenSent": true, "sourceModifiedDate": "2022-05-26T10:34:10Z"}, {"id": "20cfd269-2f0f-44ef-a28c-7b5f725cf1aa", "name": "another_receipt.png", "contentType": "image/png", "dateCreated": "2022-10-24T00:00:00.000Z", "fileSize": 98, "includeWhenSent": true, "sourceModifiedDate": "2022-05-27T12:38:10Z"}] download-bill-attachment: Unauthorized: parameters: diff --git a/sync-for-payables/.speakeasy/gen.yaml b/sync-for-payables/.speakeasy/gen.yaml index 8da063cde..bf56f6276 100644 --- a/sync-for-payables/.speakeasy/gen.yaml +++ b/sync-for-payables/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false python: - version: 6.0.0 + version: 7.0.0 additionalDependencies: dev: {} main: {} diff --git a/sync-for-payables/README.md b/sync-for-payables/README.md index 056b5e849..c9e04556e 100644 --- a/sync-for-payables/README.md +++ b/sync-for-payables/README.md @@ -218,13 +218,15 @@ s = CodatSyncPayables( ), ) -s.bills.upload_attachment(request={ +res = s.bills.upload_attachment(request={ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002", "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "bill_id": "EILBDVJVNUAGVKRQ", }) -# Use the SDK ... +if res is not None: + # handle response + pass ``` diff --git a/sync-for-payables/RELEASES.md b/sync-for-payables/RELEASES.md index a32c652bc..144edeeb7 100644 --- a/sync-for-payables/RELEASES.md +++ b/sync-for-payables/RELEASES.md @@ -28,4 +28,14 @@ Based on: ### Generated - [python v6.0.0] sync-for-payables ### Releases -- [PyPI v6.0.0] https://pypi.org/project/codat-sync-for-payables/6.0.0 - sync-for-payables \ No newline at end of file +- [PyPI v6.0.0] https://pypi.org/project/codat-sync-for-payables/6.0.0 - sync-for-payables + +## 2024-10-31 13:31:23 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.423.5 (2.445.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v7.0.0] sync-for-payables +### Releases +- [PyPI v7.0.0] https://pypi.org/project/codat-sync-for-payables/7.0.0 - sync-for-payables \ No newline at end of file diff --git a/sync-for-payables/docs/sdks/bills/README.md b/sync-for-payables/docs/sdks/bills/README.md index 971fdbfa6..07186ea71 100644 --- a/sync-for-payables/docs/sdks/bills/README.md +++ b/sync-for-payables/docs/sdks/bills/README.md @@ -235,13 +235,15 @@ s = CodatSyncPayables( ), ) -s.bills.upload_attachment(request={ +res = s.bills.upload_attachment(request={ "company_id": "8a210b68-6988-11ed-a1eb-0242ac120002", "connection_id": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "bill_id": "EILBDVJVNUAGVKRQ", }) -# Use the SDK ... +if res is not None: + # handle response + pass ``` @@ -252,6 +254,10 @@ s.bills.upload_attachment(request={ | `request` | [operations.UploadBillAttachmentRequest](../../models/operations/uploadbillattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +### Response + +**[shared.Attachment](../../models/shared/attachment.md)** + ### Errors | Error Type | Status Code | Content Type | @@ -298,7 +304,7 @@ if res is not None: ### Response -**[shared.Attachment](../../models/shared/attachment.md)** +**[List[shared.Attachment]](../../models/.md)** ### Errors diff --git a/sync-for-payables/poetry.lock b/sync-for-payables/poetry.lock index 2b38ecfe5..fa5aa672a 100644 --- a/sync-for-payables/poetry.lock +++ b/sync-for-payables/poetry.lock @@ -548,4 +548,4 @@ typing-extensions = ">=3.7.4" [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "6bb5f77afb8fcbe7327ccd1fcc33f5c279c6a2582d43be73b69c2a94b836b85d" +content-hash = "9e57d395164aeb8637702f9d37b29cff9bdc5ebcbd44305b91808c122428bacb" diff --git a/sync-for-payables/pyproject.toml b/sync-for-payables/pyproject.toml index 0dd271e22..cff8e8957 100644 --- a/sync-for-payables/pyproject.toml +++ b/sync-for-payables/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "codat-sync-for-payables" -version = "6.0.0" +version = "7.0.0" description = "Streamline your customers' accounts payable workflow." authors = ["Speakeasy",] readme = "README-PYPI.md" @@ -21,7 +21,7 @@ python = "^3.8" eval-type-backport = "^0.2.0" httpx = "^0.27.0" jsonpath-python = "^1.0.6" -pydantic = "~2.9.0" +pydantic = "~2.9.2" python-dateutil = "2.8.2" typing-inspect = "^0.9.0" diff --git a/sync-for-payables/src/codat_sync_for_payables/_version.py b/sync-for-payables/src/codat_sync_for_payables/_version.py index b89d66b6d..9c4aa0520 100644 --- a/sync-for-payables/src/codat_sync_for_payables/_version.py +++ b/sync-for-payables/src/codat_sync_for_payables/_version.py @@ -3,7 +3,7 @@ import importlib.metadata __title__: str = "codat-sync-for-payables" -__version__: str = "6.0.0" +__version__: str = "7.0.0" try: if __package__ is not None: diff --git a/sync-for-payables/src/codat_sync_for_payables/bills.py b/sync-for-payables/src/codat_sync_for_payables/bills.py index 872ed0441..dd7572751 100644 --- a/sync-for-payables/src/codat_sync_for_payables/bills.py +++ b/sync-for-payables/src/codat_sync_for_payables/bills.py @@ -6,7 +6,7 @@ from codat_sync_for_payables.models import errors, operations, shared from codat_sync_for_payables.types import BaseModel, OptionalNullable, UNSET import httpx -from typing import Any, Optional, Union, cast +from typing import Any, List, Optional, Union, cast class Bills(BaseSDK): @@ -692,7 +692,7 @@ def upload_attachment( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ): + ) -> shared.Attachment: r"""Upload bill attachment The *Upload bill attachment* endpoint uploads an attachment and assigns it against a specific `billId`. @@ -773,8 +773,8 @@ def upload_attachment( ) data: Any = None - if utils.match_response(http_res, "201", "*"): - return + if utils.match_response(http_res, "201", "application/json"): + return utils.unmarshal_json(http_res.text, shared.Attachment) if utils.match_response( http_res, ["400", "401", "402", "403", "404", "429", "500", "503"], @@ -807,7 +807,7 @@ async def upload_attachment_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ): + ) -> shared.Attachment: r"""Upload bill attachment The *Upload bill attachment* endpoint uploads an attachment and assigns it against a specific `billId`. @@ -888,8 +888,8 @@ async def upload_attachment_async( ) data: Any = None - if utils.match_response(http_res, "201", "*"): - return + if utils.match_response(http_res, "201", "application/json"): + return utils.unmarshal_json(http_res.text, shared.Attachment) if utils.match_response( http_res, ["400", "401", "402", "403", "404", "429", "500", "503"], @@ -922,7 +922,7 @@ def list_attachments( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> shared.Attachment: + ) -> List[shared.Attachment]: r"""List bill attachments The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. @@ -948,7 +948,7 @@ def list_attachments( req = self.build_request( method="GET", - path="/companies/{companyId}/connections/{connectionId}/bills/{billId}/attachments", + path="/companies/{companyId}/connections/{connectionId}/payables/bills/{billId}/attachments", base_url=base_url, url_variables=url_variables, request=request, @@ -997,7 +997,7 @@ def list_attachments( data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, shared.Attachment) + return utils.unmarshal_json(http_res.text, List[shared.Attachment]) if utils.match_response( http_res, ["401", "402", "403", "404", "409", "429", "500", "503"], @@ -1030,7 +1030,7 @@ async def list_attachments_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - ) -> shared.Attachment: + ) -> List[shared.Attachment]: r"""List bill attachments The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. @@ -1056,7 +1056,7 @@ async def list_attachments_async( req = self.build_request_async( method="GET", - path="/companies/{companyId}/connections/{connectionId}/bills/{billId}/attachments", + path="/companies/{companyId}/connections/{connectionId}/payables/bills/{billId}/attachments", base_url=base_url, url_variables=url_variables, request=request, @@ -1105,7 +1105,7 @@ async def list_attachments_async( data: Any = None if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, shared.Attachment) + return utils.unmarshal_json(http_res.text, List[shared.Attachment]) if utils.match_response( http_res, ["401", "402", "403", "404", "409", "429", "500", "503"], diff --git a/sync-for-payables/src/codat_sync_for_payables/sdkconfiguration.py b/sync-for-payables/src/codat_sync_for_payables/sdkconfiguration.py index f0edbca09..f9203295f 100644 --- a/sync-for-payables/src/codat_sync_for_payables/sdkconfiguration.py +++ b/sync-for-payables/src/codat_sync_for_payables/sdkconfiguration.py @@ -27,11 +27,9 @@ class SDKConfiguration: server_idx: Optional[int] = 0 language: str = "python" openapi_doc_version: str = "3.0.0" - sdk_version: str = "6.0.0" - gen_version: str = "2.442.11" - user_agent: str = ( - "speakeasy-sdk/python 6.0.0 2.442.11 3.0.0 codat-sync-for-payables" - ) + sdk_version: str = "7.0.0" + gen_version: str = "2.445.1" + user_agent: str = "speakeasy-sdk/python 7.0.0 2.445.1 3.0.0 codat-sync-for-payables" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None