Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any, cast
from urllib.parse import quote

import httpx
import httpx2

from ... import errors
from ...client import AuthenticatedClient, Client
Expand Down Expand Up @@ -35,7 +35,7 @@ def _get_kwargs(


def _parse_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> Any | BillingGrantResult | Error | None:
if response.status_code == 200:
response_200 = BillingGrantResult.from_dict(response.json())
Expand Down Expand Up @@ -67,7 +67,7 @@ def _parse_response(


def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> Response[Any | BillingGrantResult | Error]:
return Response(
status_code=HTTPStatus(response.status_code),
Expand All @@ -91,7 +91,7 @@ def sync_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[Any | BillingGrantResult | Error]
Expand Down Expand Up @@ -123,7 +123,7 @@ def sync(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Any | BillingGrantResult | Error
Expand All @@ -150,7 +150,7 @@ async def asyncio_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[Any | BillingGrantResult | Error]
Expand Down Expand Up @@ -180,7 +180,7 @@ async def asyncio(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Any | BillingGrantResult | Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any, cast
from urllib.parse import quote

import httpx
import httpx2

from ... import errors
from ...client import AuthenticatedClient, Client
Expand Down Expand Up @@ -35,7 +35,7 @@ def _get_kwargs(


def _parse_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> AdminInvoiceCreateResponse | Any | Error | None:
if response.status_code == 200:
response_200 = AdminInvoiceCreateResponse.from_dict(response.json())
Expand Down Expand Up @@ -67,7 +67,7 @@ def _parse_response(


def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> Response[AdminInvoiceCreateResponse | Any | Error]:
return Response(
status_code=HTTPStatus(response.status_code),
Expand All @@ -91,7 +91,7 @@ def sync_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminInvoiceCreateResponse | Any | Error]
Expand Down Expand Up @@ -123,7 +123,7 @@ def sync(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminInvoiceCreateResponse | Any | Error
Expand All @@ -150,7 +150,7 @@ async def asyncio_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminInvoiceCreateResponse | Any | Error]
Expand Down Expand Up @@ -180,7 +180,7 @@ async def asyncio(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminInvoiceCreateResponse | Any | Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any, cast
from urllib.parse import quote

import httpx
import httpx2

from ... import errors
from ...client import AuthenticatedClient, Client
Expand Down Expand Up @@ -37,7 +37,7 @@ def _get_kwargs(


def _parse_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> AdminInvoiceDiscountResponse | Any | Error | None:
if response.status_code == 200:
response_200 = AdminInvoiceDiscountResponse.from_dict(response.json())
Expand Down Expand Up @@ -69,7 +69,7 @@ def _parse_response(


def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> Response[AdminInvoiceDiscountResponse | Any | Error]:
return Response(
status_code=HTTPStatus(response.status_code),
Expand All @@ -95,7 +95,7 @@ def sync_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminInvoiceDiscountResponse | Any | Error]
Expand Down Expand Up @@ -130,7 +130,7 @@ def sync(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminInvoiceDiscountResponse | Any | Error
Expand Down Expand Up @@ -160,7 +160,7 @@ async def asyncio_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminInvoiceDiscountResponse | Any | Error]
Expand Down Expand Up @@ -193,7 +193,7 @@ async def asyncio(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminInvoiceDiscountResponse | Any | Error
Expand Down
14 changes: 7 additions & 7 deletions src/graphn/_generated/api/admin_billing/admin_get_billing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any, cast
from urllib.parse import quote

import httpx
import httpx2

from ... import errors
from ...client import AuthenticatedClient, Client
Expand All @@ -25,7 +25,7 @@ def _get_kwargs(


def _parse_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> AdminBillingState | Any | None:
if response.status_code == 200:
response_200 = AdminBillingState.from_dict(response.json())
Expand All @@ -43,7 +43,7 @@ def _parse_response(


def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> Response[AdminBillingState | Any]:
return Response(
status_code=HTTPStatus(response.status_code),
Expand All @@ -65,7 +65,7 @@ def sync_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminBillingState | Any]
Expand Down Expand Up @@ -94,7 +94,7 @@ def sync(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminBillingState | Any
Expand All @@ -118,7 +118,7 @@ async def asyncio_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminBillingState | Any]
Expand All @@ -145,7 +145,7 @@ async def asyncio(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminBillingState | Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any, cast
from urllib.parse import quote

import httpx
import httpx2

from ... import errors
from ...client import AuthenticatedClient, Client
Expand All @@ -28,7 +28,7 @@ def _get_kwargs(


def _parse_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> AdminInvoiceResponse | Any | Error | None:
if response.status_code == 200:
response_200 = AdminInvoiceResponse.from_dict(response.json())
Expand Down Expand Up @@ -56,7 +56,7 @@ def _parse_response(


def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> Response[AdminInvoiceResponse | Any | Error]:
return Response(
status_code=HTTPStatus(response.status_code),
Expand All @@ -80,7 +80,7 @@ def sync_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminInvoiceResponse | Any | Error]
Expand Down Expand Up @@ -112,7 +112,7 @@ def sync(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminInvoiceResponse | Any | Error
Expand All @@ -139,7 +139,7 @@ async def asyncio_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminInvoiceResponse | Any | Error]
Expand Down Expand Up @@ -169,7 +169,7 @@ async def asyncio(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminInvoiceResponse | Any | Error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Any, cast
from urllib.parse import quote

import httpx
import httpx2

from ... import errors
from ...client import AuthenticatedClient, Client
Expand Down Expand Up @@ -41,7 +41,7 @@ def _get_kwargs(


def _parse_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> AdminInvoiceRevisionsResponse | Any | Error | None:
if response.status_code == 200:
response_200 = AdminInvoiceRevisionsResponse.from_dict(response.json())
Expand Down Expand Up @@ -73,7 +73,7 @@ def _parse_response(


def _build_response(
*, client: AuthenticatedClient | Client, response: httpx.Response
*, client: AuthenticatedClient | Client, response: httpx2.Response
) -> Response[AdminInvoiceRevisionsResponse | Any | Error]:
return Response(
status_code=HTTPStatus(response.status_code),
Expand All @@ -99,7 +99,7 @@ def sync_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminInvoiceRevisionsResponse | Any | Error]
Expand Down Expand Up @@ -134,7 +134,7 @@ def sync(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminInvoiceRevisionsResponse | Any | Error
Expand Down Expand Up @@ -164,7 +164,7 @@ async def asyncio_detailed(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AdminInvoiceRevisionsResponse | Any | Error]
Expand Down Expand Up @@ -197,7 +197,7 @@ async def asyncio(

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException: If the request takes longer than Client.timeout.
httpx2.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AdminInvoiceRevisionsResponse | Any | Error
Expand Down
Loading
Loading