Skip to content

Commit

Permalink
[bot] Updated client based on openapi-8f2debe/clientgen (#375)
Browse files Browse the repository at this point in the history
Co-authored-by: API Engineering <[email protected]>
  • Loading branch information
digitalocean-engineering and API Engineering authored Oct 28, 2024
1 parent e31da4a commit a4aa6a1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DO_OPENAPI_COMMIT_SHA.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e19c610
8f2debe
10 changes: 9 additions & 1 deletion src/pydo/aio/operations/_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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:
Expand Down Expand Up @@ -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,
)
Expand Down
27 changes: 24 additions & 3 deletions src/pydo/operations/_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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(
Expand Down Expand Up @@ -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.

Expand All @@ -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:
Expand Down Expand Up @@ -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,
)
Expand Down

0 comments on commit a4aa6a1

Please sign in to comment.