From 275d28aa0b3f6b040a9dd1fd99343730feaf727e Mon Sep 17 00:00:00 2001 From: API Engineering Date: Mon, 28 Oct 2024 14:17:54 +0000 Subject: [PATCH] [bot] Updated client based on openapi-8f2debe/clientgen --- DO_OPENAPI_COMMIT_SHA.txt | 2 +- src/pydo/aio/operations/_operations.py | 10 +++++++++- src/pydo/operations/_operations.py | 27 +++++++++++++++++++++++--- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/DO_OPENAPI_COMMIT_SHA.txt b/DO_OPENAPI_COMMIT_SHA.txt index 5fd5e7e..8a90810 100644 --- a/DO_OPENAPI_COMMIT_SHA.txt +++ b/DO_OPENAPI_COMMIT_SHA.txt @@ -1 +1 @@ -e19c610 +8f2debe diff --git a/src/pydo/aio/operations/_operations.py b/src/pydo/aio/operations/_operations.py index 9662580..b222f31 100644 --- a/src/pydo/aio/operations/_operations.py +++ b/src/pydo/aio/operations/_operations.py @@ -89908,7 +89908,9 @@ async def list(self, *, per_page: int = 20, page: int = 1, **kwargs: Any) -> JSO return cast(JSON, deserialized) # type: ignore @distributed_trace_async - async def get_by_uuid(self, invoice_uuid: str, **kwargs: Any) -> JSON: + async def get_by_uuid( + self, invoice_uuid: str, *, per_page: int = 20, page: int = 1, **kwargs: Any + ) -> JSON: # pylint: disable=line-too-long """Retrieve an Invoice by UUID. @@ -89917,6 +89919,10 @@ async def get_by_uuid(self, invoice_uuid: str, **kwargs: Any) -> JSON: :param invoice_uuid: UUID of the invoice. Required. :type invoice_uuid: str + :keyword per_page: Number of items returned per page. Default value is 20. + :paramtype per_page: int + :keyword page: Which 'page' of paginated results to return. Default value is 1. + :paramtype page: int :return: JSON object :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: @@ -89992,6 +89998,8 @@ async def get_by_uuid(self, invoice_uuid: str, **kwargs: Any) -> JSON: _request = build_invoices_get_by_uuid_request( invoice_uuid=invoice_uuid, + per_page=per_page, + page=page, headers=_headers, params=_params, ) diff --git a/src/pydo/operations/_operations.py b/src/pydo/operations/_operations.py index d6b8830..ba9ffdf 100644 --- a/src/pydo/operations/_operations.py +++ b/src/pydo/operations/_operations.py @@ -1211,8 +1211,11 @@ def build_invoices_list_request( ) -def build_invoices_get_by_uuid_request(invoice_uuid: str, **kwargs: Any) -> HttpRequest: +def build_invoices_get_by_uuid_request( + invoice_uuid: str, *, per_page: int = 20, page: int = 1, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -1224,10 +1227,20 @@ def build_invoices_get_by_uuid_request(invoice_uuid: str, **kwargs: Any) -> Http _url: str = _url.format(**path_format_arguments) # type: ignore + # Construct parameters + if per_page is not None: + _params["per_page"] = _SERIALIZER.query( + "per_page", per_page, "int", maximum=200, minimum=1 + ) + if page is not None: + _params["page"] = _SERIALIZER.query("page", page, "int", minimum=1) + # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + return HttpRequest( + method="GET", url=_url, params=_params, headers=_headers, **kwargs + ) def build_invoices_get_csv_by_uuid_request( @@ -97929,7 +97942,9 @@ def list(self, *, per_page: int = 20, page: int = 1, **kwargs: Any) -> JSON: return cast(JSON, deserialized) # type: ignore @distributed_trace - def get_by_uuid(self, invoice_uuid: str, **kwargs: Any) -> JSON: + def get_by_uuid( + self, invoice_uuid: str, *, per_page: int = 20, page: int = 1, **kwargs: Any + ) -> JSON: # pylint: disable=line-too-long """Retrieve an Invoice by UUID. @@ -97938,6 +97953,10 @@ def get_by_uuid(self, invoice_uuid: str, **kwargs: Any) -> JSON: :param invoice_uuid: UUID of the invoice. Required. :type invoice_uuid: str + :keyword per_page: Number of items returned per page. Default value is 20. + :paramtype per_page: int + :keyword page: Which 'page' of paginated results to return. Default value is 1. + :paramtype page: int :return: JSON object :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: @@ -98013,6 +98032,8 @@ def get_by_uuid(self, invoice_uuid: str, **kwargs: Any) -> JSON: _request = build_invoices_get_by_uuid_request( invoice_uuid=invoice_uuid, + per_page=per_page, + page=page, headers=_headers, params=_params, )