fix(pg): new wallet api
new wallet api
This commit is contained in:
parent
66771a56f5
commit
91ba2a7edf
33 changed files with 651 additions and 2416 deletions
|
|
@ -1 +0,0 @@
|
||||||
"""Contains endpoint functions for accessing the API"""
|
|
||||||
|
|
@ -1,151 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.charge import Charge
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
*,
|
|
||||||
body: Charge,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
headers: dict[str, Any] = {}
|
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "post",
|
|
||||||
"url": "/api/charge_create",
|
|
||||||
}
|
|
||||||
|
|
||||||
_kwargs["json"] = body.to_dict()
|
|
||||||
|
|
||||||
headers["Content-Type"] = "application/json"
|
|
||||||
|
|
||||||
_kwargs["headers"] = headers
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Charge]:
|
|
||||||
if response.status_code == 201:
|
|
||||||
response_201 = Charge.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_201
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Charge]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: Charge,
|
|
||||||
) -> Response[Charge]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
body (Charge):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[Charge]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: Charge,
|
|
||||||
) -> Optional[Charge]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
body (Charge):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Charge
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
body=body,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: Charge,
|
|
||||||
) -> Response[Charge]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
body (Charge):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[Charge]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: Charge,
|
|
||||||
) -> Optional[Charge]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
body (Charge):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Charge
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.application_balance import ApplicationBalance
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs() -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": "/wallet/api/application/balance",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Optional[ApplicationBalance]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = ApplicationBalance.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Response[ApplicationBalance]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationBalance]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationBalance]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs()
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationBalance]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationBalance
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationBalance]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationBalance]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs()
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationBalance]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationBalance
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -1,151 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.application_balance import ApplicationBalance
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
category_uuid: str,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": f"/wallet/api/application/{category_uuid}/balance",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Optional[ApplicationBalance]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = ApplicationBalance.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Response[ApplicationBalance]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationBalance]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationBalance]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationBalance]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationBalance
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationBalance]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationBalance]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationBalance]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationBalance
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -10,6 +10,7 @@ from ...types import Response
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
payer_wallet: str,
|
||||||
*,
|
*,
|
||||||
body: ApplicationDeposit,
|
body: ApplicationDeposit,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
|
|
@ -17,7 +18,7 @@ def _get_kwargs(
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
"method": "post",
|
"method": "post",
|
||||||
"url": "/wallet/api/application/deposit/",
|
"url": f"/wallet/api/application/{payer_wallet}/deposit/",
|
||||||
}
|
}
|
||||||
|
|
||||||
_kwargs["json"] = body.to_dict()
|
_kwargs["json"] = body.to_dict()
|
||||||
|
|
@ -54,12 +55,14 @@ def _build_response(
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
payer_wallet: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
body: ApplicationDeposit,
|
body: ApplicationDeposit,
|
||||||
) -> Response[ApplicationDeposit]:
|
) -> Response[ApplicationDeposit]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payer_wallet (str):
|
||||||
body (ApplicationDeposit):
|
body (ApplicationDeposit):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -71,6 +74,7 @@ def sync_detailed(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
payer_wallet=payer_wallet,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -82,12 +86,14 @@ def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
payer_wallet: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
body: ApplicationDeposit,
|
body: ApplicationDeposit,
|
||||||
) -> Optional[ApplicationDeposit]:
|
) -> Optional[ApplicationDeposit]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payer_wallet (str):
|
||||||
body (ApplicationDeposit):
|
body (ApplicationDeposit):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -99,18 +105,21 @@ def sync(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
payer_wallet=payer_wallet,
|
||||||
client=client,
|
client=client,
|
||||||
body=body,
|
body=body,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
payer_wallet: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
body: ApplicationDeposit,
|
body: ApplicationDeposit,
|
||||||
) -> Response[ApplicationDeposit]:
|
) -> Response[ApplicationDeposit]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payer_wallet (str):
|
||||||
body (ApplicationDeposit):
|
body (ApplicationDeposit):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -122,6 +131,7 @@ async def asyncio_detailed(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
payer_wallet=payer_wallet,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -131,12 +141,14 @@ async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
payer_wallet: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
body: ApplicationDeposit,
|
body: ApplicationDeposit,
|
||||||
) -> Optional[ApplicationDeposit]:
|
) -> Optional[ApplicationDeposit]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payer_wallet (str):
|
||||||
body (ApplicationDeposit):
|
body (ApplicationDeposit):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -149,6 +161,7 @@ async def asyncio(
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
payer_wallet=payer_wallet,
|
||||||
client=client,
|
client=client,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,168 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.application_deposit import ApplicationDeposit
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
body: ApplicationDeposit,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
headers: dict[str, Any] = {}
|
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "post",
|
|
||||||
"url": f"/wallet/api/application/{category_uuid}/deposit/",
|
|
||||||
}
|
|
||||||
|
|
||||||
_kwargs["json"] = body.to_dict()
|
|
||||||
|
|
||||||
headers["Content-Type"] = "application/json"
|
|
||||||
|
|
||||||
_kwargs["headers"] = headers
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Optional[ApplicationDeposit]:
|
|
||||||
if response.status_code == 201:
|
|
||||||
response_201 = ApplicationDeposit.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_201
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Response[ApplicationDeposit]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: ApplicationDeposit,
|
|
||||||
) -> Response[ApplicationDeposit]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
body (ApplicationDeposit):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationDeposit]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: ApplicationDeposit,
|
|
||||||
) -> Optional[ApplicationDeposit]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
body (ApplicationDeposit):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationDeposit
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
|
||||||
body=body,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: ApplicationDeposit,
|
|
||||||
) -> Response[ApplicationDeposit]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
body (ApplicationDeposit):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationDeposit]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: ApplicationDeposit,
|
|
||||||
) -> Optional[ApplicationDeposit]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
body (ApplicationDeposit):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationDeposit
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -10,11 +10,12 @@ from ...types import Response
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
payer_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
"method": "get",
|
"method": "get",
|
||||||
"url": f"/wallet/api/application/deposit/{uuid}/verify",
|
"url": f"/wallet/api/application/{payer_wallet}/deposit/{uuid}/verify",
|
||||||
}
|
}
|
||||||
|
|
||||||
return _kwargs
|
return _kwargs
|
||||||
|
|
@ -46,12 +47,14 @@ def _build_response(
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
payer_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Response[ApplicationDeposit]:
|
) -> Response[ApplicationDeposit]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payer_wallet (str):
|
||||||
uuid (str):
|
uuid (str):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -63,6 +66,7 @@ def sync_detailed(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
payer_wallet=payer_wallet,
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -74,12 +78,14 @@ def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
payer_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Optional[ApplicationDeposit]:
|
) -> Optional[ApplicationDeposit]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payer_wallet (str):
|
||||||
uuid (str):
|
uuid (str):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -91,18 +97,21 @@ def sync(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
payer_wallet=payer_wallet,
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
payer_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Response[ApplicationDeposit]:
|
) -> Response[ApplicationDeposit]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payer_wallet (str):
|
||||||
uuid (str):
|
uuid (str):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -114,6 +123,7 @@ async def asyncio_detailed(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
payer_wallet=payer_wallet,
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -123,12 +133,14 @@ async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
payer_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Optional[ApplicationDeposit]:
|
) -> Optional[ApplicationDeposit]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payer_wallet (str):
|
||||||
uuid (str):
|
uuid (str):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -141,6 +153,7 @@ async def asyncio(
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
payer_wallet=payer_wallet,
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,160 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.application_deposit import ApplicationDeposit
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": f"/wallet/api/application/{category_uuid}/deposit/{uuid}/verify",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Optional[ApplicationDeposit]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = ApplicationDeposit.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Response[ApplicationDeposit]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationDeposit]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationDeposit]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationDeposit]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationDeposit
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationDeposit]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationDeposit]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationDeposit]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationDeposit
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -1,160 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.application_transaction import ApplicationTransaction
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": f"/wallet/api/application/{category_uuid}/{uuid}/",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Optional[ApplicationTransaction]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = ApplicationTransaction.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Response[ApplicationTransaction]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationTransaction]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationTransaction]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationTransaction]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationTransaction
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationTransaction]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationTransaction]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationTransaction]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationTransaction
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -1,147 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.application_transaction import ApplicationTransaction
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
uuid: str,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": f"/wallet/api/application/{uuid}/",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Optional[ApplicationTransaction]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = ApplicationTransaction.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Response[ApplicationTransaction]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationTransaction]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationTransaction]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationTransaction]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationTransaction
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationTransaction]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationTransaction]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationTransaction]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationTransaction
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -0,0 +1,227 @@
|
||||||
|
from http import HTTPStatus
|
||||||
|
from typing import Any, Optional, Union
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ... import errors
|
||||||
|
from ...client import AuthenticatedClient, Client
|
||||||
|
from ...models.paginated_transaction_list import PaginatedTransactionList
|
||||||
|
from ...types import UNSET, Response, Unset
|
||||||
|
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
*,
|
||||||
|
limit: Union[Unset, int] = UNSET,
|
||||||
|
offset: Union[Unset, int] = UNSET,
|
||||||
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> dict[str, Any]:
|
||||||
|
params: dict[str, Any] = {}
|
||||||
|
|
||||||
|
params["limit"] = limit
|
||||||
|
|
||||||
|
params["offset"] = offset
|
||||||
|
|
||||||
|
json_payee: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(payee, Unset):
|
||||||
|
json_payee = str(payee)
|
||||||
|
params["payee"] = json_payee
|
||||||
|
|
||||||
|
json_payer: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(payer, Unset):
|
||||||
|
json_payer = str(payer)
|
||||||
|
params["payer"] = json_payer
|
||||||
|
|
||||||
|
json_wallets = []
|
||||||
|
for wallets_item_data in wallets:
|
||||||
|
wallets_item = str(wallets_item_data)
|
||||||
|
json_wallets.append(wallets_item)
|
||||||
|
|
||||||
|
params["wallets"] = json_wallets
|
||||||
|
|
||||||
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
||||||
|
|
||||||
|
_kwargs: dict[str, Any] = {
|
||||||
|
"method": "get",
|
||||||
|
"url": "/wallet/api/application/transactions/",
|
||||||
|
"params": params,
|
||||||
|
}
|
||||||
|
|
||||||
|
return _kwargs
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_response(
|
||||||
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
|
) -> Optional[PaginatedTransactionList]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = PaginatedTransactionList.from_dict(response.json())
|
||||||
|
|
||||||
|
return response_200
|
||||||
|
|
||||||
|
if client.raise_on_unexpected_status:
|
||||||
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _build_response(
|
||||||
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
|
) -> Response[PaginatedTransactionList]:
|
||||||
|
return Response(
|
||||||
|
status_code=HTTPStatus(response.status_code),
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(client=client, response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
*,
|
||||||
|
client: AuthenticatedClient,
|
||||||
|
limit: Union[Unset, int] = UNSET,
|
||||||
|
offset: Union[Unset, int] = UNSET,
|
||||||
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> Response[PaginatedTransactionList]:
|
||||||
|
"""
|
||||||
|
Args:
|
||||||
|
limit (Union[Unset, int]):
|
||||||
|
offset (Union[Unset, int]):
|
||||||
|
payee (Union[Unset, UUID]):
|
||||||
|
payer (Union[Unset, UUID]):
|
||||||
|
wallets (list[UUID]):
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Response[PaginatedTransactionList]
|
||||||
|
"""
|
||||||
|
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
limit=limit,
|
||||||
|
offset=offset,
|
||||||
|
payee=payee,
|
||||||
|
payer=payer,
|
||||||
|
wallets=wallets,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = client.get_httpx_client().request(
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(client=client, response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
*,
|
||||||
|
client: AuthenticatedClient,
|
||||||
|
limit: Union[Unset, int] = UNSET,
|
||||||
|
offset: Union[Unset, int] = UNSET,
|
||||||
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> Optional[PaginatedTransactionList]:
|
||||||
|
"""
|
||||||
|
Args:
|
||||||
|
limit (Union[Unset, int]):
|
||||||
|
offset (Union[Unset, int]):
|
||||||
|
payee (Union[Unset, UUID]):
|
||||||
|
payer (Union[Unset, UUID]):
|
||||||
|
wallets (list[UUID]):
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
PaginatedTransactionList
|
||||||
|
"""
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
client=client,
|
||||||
|
limit=limit,
|
||||||
|
offset=offset,
|
||||||
|
payee=payee,
|
||||||
|
payer=payer,
|
||||||
|
wallets=wallets,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
*,
|
||||||
|
client: AuthenticatedClient,
|
||||||
|
limit: Union[Unset, int] = UNSET,
|
||||||
|
offset: Union[Unset, int] = UNSET,
|
||||||
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> Response[PaginatedTransactionList]:
|
||||||
|
"""
|
||||||
|
Args:
|
||||||
|
limit (Union[Unset, int]):
|
||||||
|
offset (Union[Unset, int]):
|
||||||
|
payee (Union[Unset, UUID]):
|
||||||
|
payer (Union[Unset, UUID]):
|
||||||
|
wallets (list[UUID]):
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Response[PaginatedTransactionList]
|
||||||
|
"""
|
||||||
|
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
limit=limit,
|
||||||
|
offset=offset,
|
||||||
|
payee=payee,
|
||||||
|
payer=payer,
|
||||||
|
wallets=wallets,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = await client.get_async_httpx_client().request(**kwargs)
|
||||||
|
|
||||||
|
return _build_response(client=client, response=response)
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio(
|
||||||
|
*,
|
||||||
|
client: AuthenticatedClient,
|
||||||
|
limit: Union[Unset, int] = UNSET,
|
||||||
|
offset: Union[Unset, int] = UNSET,
|
||||||
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> Optional[PaginatedTransactionList]:
|
||||||
|
"""
|
||||||
|
Args:
|
||||||
|
limit (Union[Unset, int]):
|
||||||
|
offset (Union[Unset, int]):
|
||||||
|
payee (Union[Unset, UUID]):
|
||||||
|
payer (Union[Unset, UUID]):
|
||||||
|
wallets (list[UUID]):
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
PaginatedTransactionList
|
||||||
|
"""
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
client=client,
|
||||||
|
limit=limit,
|
||||||
|
offset=offset,
|
||||||
|
payee=payee,
|
||||||
|
payer=payer,
|
||||||
|
wallets=wallets,
|
||||||
|
)
|
||||||
|
).parsed
|
||||||
|
|
@ -1,28 +1,29 @@
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any, Optional, Union
|
from typing import Any, Optional, Union
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ... import errors
|
from ... import errors
|
||||||
from ...client import AuthenticatedClient, Client
|
from ...client import AuthenticatedClient, Client
|
||||||
from ...models.my_wallet import MyWallet
|
from ...models.transaction import Transaction
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
uuid: str,
|
uuid: UUID,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
"method": "get",
|
"method": "get",
|
||||||
"url": f"/wallet/api/application/user_balance/{uuid}",
|
"url": f"/wallet/api/application/transactions/{uuid}/",
|
||||||
}
|
}
|
||||||
|
|
||||||
return _kwargs
|
return _kwargs
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[MyWallet]:
|
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Transaction]:
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = MyWallet.from_dict(response.json())
|
response_200 = Transaction.from_dict(response.json())
|
||||||
|
|
||||||
return response_200
|
return response_200
|
||||||
|
|
||||||
|
|
@ -32,7 +33,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[MyWallet]:
|
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Transaction]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=HTTPStatus(response.status_code),
|
status_code=HTTPStatus(response.status_code),
|
||||||
content=response.content,
|
content=response.content,
|
||||||
|
|
@ -42,21 +43,20 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
uuid: str,
|
uuid: UUID,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Response[MyWallet]:
|
) -> Response[Transaction]:
|
||||||
"""API for getting specified user or application balance.
|
"""
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
uuid (str):
|
uuid (UUID):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[MyWallet]
|
Response[Transaction]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
@ -71,21 +71,20 @@ def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
uuid: str,
|
uuid: UUID,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Optional[MyWallet]:
|
) -> Optional[Transaction]:
|
||||||
"""API for getting specified user or application balance.
|
"""
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
uuid (str):
|
uuid (UUID):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
MyWallet
|
Transaction
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
@ -95,21 +94,20 @@ def sync(
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
uuid: str,
|
uuid: UUID,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Response[MyWallet]:
|
) -> Response[Transaction]:
|
||||||
"""API for getting specified user or application balance.
|
"""
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
uuid (str):
|
uuid (UUID):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[MyWallet]
|
Response[Transaction]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
@ -122,21 +120,20 @@ async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
uuid: str,
|
uuid: UUID,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Optional[MyWallet]:
|
) -> Optional[Transaction]:
|
||||||
"""API for getting specified user or application balance.
|
"""
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
uuid (str):
|
uuid (UUID):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
MyWallet
|
Transaction
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -1,160 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.my_wallet import MyWallet
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": f"/wallet/api/application/{category_uuid}/user/{uuid}/balance",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[MyWallet]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = MyWallet.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[MyWallet]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[MyWallet]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[MyWallet]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[MyWallet]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
MyWallet
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[MyWallet]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[MyWallet]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[MyWallet]:
|
|
||||||
"""API for getting specified user or application balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
MyWallet
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -5,7 +5,7 @@ import httpx
|
||||||
|
|
||||||
from ... import errors
|
from ... import errors
|
||||||
from ...client import AuthenticatedClient, Client
|
from ...client import AuthenticatedClient, Client
|
||||||
from ...models.paginated_application_transaction_list import PaginatedApplicationTransactionList
|
from ...models.paginated_account_list import PaginatedAccountList
|
||||||
from ...types import UNSET, Response, Unset
|
from ...types import UNSET, Response, Unset
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ def _get_kwargs(
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
"method": "get",
|
"method": "get",
|
||||||
"url": "/wallet/api/application/",
|
"url": "/wallet/api/application/wallets/",
|
||||||
"params": params,
|
"params": params,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -33,9 +33,9 @@ def _get_kwargs(
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
) -> Optional[PaginatedApplicationTransactionList]:
|
) -> Optional[PaginatedAccountList]:
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = PaginatedApplicationTransactionList.from_dict(response.json())
|
response_200 = PaginatedAccountList.from_dict(response.json())
|
||||||
|
|
||||||
return response_200
|
return response_200
|
||||||
|
|
||||||
|
|
@ -47,7 +47,7 @@ def _parse_response(
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
) -> Response[PaginatedApplicationTransactionList]:
|
) -> Response[PaginatedAccountList]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=HTTPStatus(response.status_code),
|
status_code=HTTPStatus(response.status_code),
|
||||||
content=response.content,
|
content=response.content,
|
||||||
|
|
@ -61,8 +61,9 @@ def sync_detailed(
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Response[PaginatedApplicationTransactionList]:
|
) -> Response[PaginatedAccountList]:
|
||||||
"""
|
"""API for getting specified user or application balance.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
|
@ -72,7 +73,7 @@ def sync_detailed(
|
||||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[PaginatedApplicationTransactionList]
|
Response[PaginatedAccountList]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
@ -92,8 +93,9 @@ def sync(
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Optional[PaginatedApplicationTransactionList]:
|
) -> Optional[PaginatedAccountList]:
|
||||||
"""
|
"""API for getting specified user or application balance.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
|
@ -103,7 +105,7 @@ def sync(
|
||||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
PaginatedApplicationTransactionList
|
PaginatedAccountList
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
|
@ -118,8 +120,9 @@ async def asyncio_detailed(
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Response[PaginatedApplicationTransactionList]:
|
) -> Response[PaginatedAccountList]:
|
||||||
"""
|
"""API for getting specified user or application balance.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
|
@ -129,7 +132,7 @@ async def asyncio_detailed(
|
||||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[PaginatedApplicationTransactionList]
|
Response[PaginatedAccountList]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
|
@ -147,8 +150,9 @@ async def asyncio(
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Optional[PaginatedApplicationTransactionList]:
|
) -> Optional[PaginatedAccountList]:
|
||||||
"""
|
"""API for getting specified user or application balance.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
|
@ -158,7 +162,7 @@ async def asyncio(
|
||||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
PaginatedApplicationTransactionList
|
PaginatedAccountList
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -1,19 +1,21 @@
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any, Optional, Union
|
from typing import Any, Optional, Union
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ... import errors
|
from ... import errors
|
||||||
from ...client import AuthenticatedClient, Client
|
from ...client import AuthenticatedClient, Client
|
||||||
from ...models.paginated_user_transaction_list import PaginatedUserTransactionList
|
from ...models.paginated_account_list import PaginatedAccountList
|
||||||
from ...types import UNSET, Response, Unset
|
from ...types import UNSET, Response, Unset
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
category_uuid: str,
|
owner: str,
|
||||||
*,
|
*,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
|
wallet: list[UUID],
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
params: dict[str, Any] = {}
|
params: dict[str, Any] = {}
|
||||||
|
|
||||||
|
|
@ -21,11 +23,18 @@ def _get_kwargs(
|
||||||
|
|
||||||
params["offset"] = offset
|
params["offset"] = offset
|
||||||
|
|
||||||
|
json_wallet = []
|
||||||
|
for wallet_item_data in wallet:
|
||||||
|
wallet_item = str(wallet_item_data)
|
||||||
|
json_wallet.append(wallet_item)
|
||||||
|
|
||||||
|
params["wallet"] = json_wallet
|
||||||
|
|
||||||
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
"method": "get",
|
"method": "get",
|
||||||
"url": f"/wallet/api/user/{category_uuid}/transactions/",
|
"url": f"/wallet/api/application/wallets/user/{owner}/",
|
||||||
"params": params,
|
"params": params,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,9 +43,9 @@ def _get_kwargs(
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
) -> Optional[PaginatedUserTransactionList]:
|
) -> Optional[PaginatedAccountList]:
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = PaginatedUserTransactionList.from_dict(response.json())
|
response_200 = PaginatedAccountList.from_dict(response.json())
|
||||||
|
|
||||||
return response_200
|
return response_200
|
||||||
|
|
||||||
|
|
@ -48,7 +57,7 @@ def _parse_response(
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
) -> Response[PaginatedUserTransactionList]:
|
) -> Response[PaginatedAccountList]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=HTTPStatus(response.status_code),
|
status_code=HTTPStatus(response.status_code),
|
||||||
content=response.content,
|
content=response.content,
|
||||||
|
|
@ -58,35 +67,34 @@ def _build_response(
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
category_uuid: str,
|
owner: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Response[PaginatedUserTransactionList]:
|
wallet: list[UUID],
|
||||||
"""GET: API for getting list of transactions for authenticated user
|
) -> Response[PaginatedAccountList]:
|
||||||
POST: API for creating transaction for transferring funds from authenticated user to application
|
"""API for getting specified user wallet.
|
||||||
owner. (deprecated)
|
|
||||||
args:
|
|
||||||
- user: authenticated user
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
category_uuid (str):
|
owner (str):
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
wallet (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[PaginatedUserTransactionList]
|
Response[PaginatedAccountList]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
category_uuid=category_uuid,
|
owner=owner,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
wallet=wallet,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
response = client.get_httpx_client().request(
|
||||||
|
|
@ -97,69 +105,67 @@ def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
category_uuid: str,
|
owner: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Optional[PaginatedUserTransactionList]:
|
wallet: list[UUID],
|
||||||
"""GET: API for getting list of transactions for authenticated user
|
) -> Optional[PaginatedAccountList]:
|
||||||
POST: API for creating transaction for transferring funds from authenticated user to application
|
"""API for getting specified user wallet.
|
||||||
owner. (deprecated)
|
|
||||||
args:
|
|
||||||
- user: authenticated user
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
category_uuid (str):
|
owner (str):
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
wallet (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
PaginatedUserTransactionList
|
PaginatedAccountList
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
category_uuid=category_uuid,
|
owner=owner,
|
||||||
client=client,
|
client=client,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
wallet=wallet,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
category_uuid: str,
|
owner: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Response[PaginatedUserTransactionList]:
|
wallet: list[UUID],
|
||||||
"""GET: API for getting list of transactions for authenticated user
|
) -> Response[PaginatedAccountList]:
|
||||||
POST: API for creating transaction for transferring funds from authenticated user to application
|
"""API for getting specified user wallet.
|
||||||
owner. (deprecated)
|
|
||||||
args:
|
|
||||||
- user: authenticated user
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
category_uuid (str):
|
owner (str):
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
wallet (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[PaginatedUserTransactionList]
|
Response[PaginatedAccountList]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
category_uuid=category_uuid,
|
owner=owner,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
wallet=wallet,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
response = await client.get_async_httpx_client().request(**kwargs)
|
||||||
|
|
@ -168,36 +174,35 @@ async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
category_uuid: str,
|
owner: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Optional[PaginatedUserTransactionList]:
|
wallet: list[UUID],
|
||||||
"""GET: API for getting list of transactions for authenticated user
|
) -> Optional[PaginatedAccountList]:
|
||||||
POST: API for creating transaction for transferring funds from authenticated user to application
|
"""API for getting specified user wallet.
|
||||||
owner. (deprecated)
|
|
||||||
args:
|
|
||||||
- user: authenticated user
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
category_uuid (str):
|
owner (str):
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
wallet (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
PaginatedUserTransactionList
|
PaginatedAccountList
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
category_uuid=category_uuid,
|
owner=owner,
|
||||||
client=client,
|
client=client,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
wallet=wallet,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|
@ -10,6 +10,7 @@ from ...types import Response
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
payee_wallet: str,
|
||||||
*,
|
*,
|
||||||
body: ApplicationWithdraw,
|
body: ApplicationWithdraw,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
|
|
@ -17,7 +18,7 @@ def _get_kwargs(
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
"method": "post",
|
"method": "post",
|
||||||
"url": "/wallet/api/application/withdraw/",
|
"url": f"/wallet/api/application/{payee_wallet}/withdraw/",
|
||||||
}
|
}
|
||||||
|
|
||||||
_kwargs["json"] = body.to_dict()
|
_kwargs["json"] = body.to_dict()
|
||||||
|
|
@ -54,12 +55,14 @@ def _build_response(
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
payee_wallet: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
body: ApplicationWithdraw,
|
body: ApplicationWithdraw,
|
||||||
) -> Response[ApplicationWithdraw]:
|
) -> Response[ApplicationWithdraw]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payee_wallet (str):
|
||||||
body (ApplicationWithdraw):
|
body (ApplicationWithdraw):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -71,6 +74,7 @@ def sync_detailed(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -82,12 +86,14 @@ def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
payee_wallet: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
body: ApplicationWithdraw,
|
body: ApplicationWithdraw,
|
||||||
) -> Optional[ApplicationWithdraw]:
|
) -> Optional[ApplicationWithdraw]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payee_wallet (str):
|
||||||
body (ApplicationWithdraw):
|
body (ApplicationWithdraw):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -99,18 +105,21 @@ def sync(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
client=client,
|
client=client,
|
||||||
body=body,
|
body=body,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
payee_wallet: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
body: ApplicationWithdraw,
|
body: ApplicationWithdraw,
|
||||||
) -> Response[ApplicationWithdraw]:
|
) -> Response[ApplicationWithdraw]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payee_wallet (str):
|
||||||
body (ApplicationWithdraw):
|
body (ApplicationWithdraw):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -122,6 +131,7 @@ async def asyncio_detailed(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -131,12 +141,14 @@ async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
payee_wallet: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
body: ApplicationWithdraw,
|
body: ApplicationWithdraw,
|
||||||
) -> Optional[ApplicationWithdraw]:
|
) -> Optional[ApplicationWithdraw]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payee_wallet (str):
|
||||||
body (ApplicationWithdraw):
|
body (ApplicationWithdraw):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -149,6 +161,7 @@ async def asyncio(
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
client=client,
|
client=client,
|
||||||
body=body,
|
body=body,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,168 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.application_withdraw import ApplicationWithdraw
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
body: ApplicationWithdraw,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
headers: dict[str, Any] = {}
|
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "post",
|
|
||||||
"url": f"/wallet/api/application/{category_uuid}/withdraw/",
|
|
||||||
}
|
|
||||||
|
|
||||||
_kwargs["json"] = body.to_dict()
|
|
||||||
|
|
||||||
headers["Content-Type"] = "application/json"
|
|
||||||
|
|
||||||
_kwargs["headers"] = headers
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Optional[ApplicationWithdraw]:
|
|
||||||
if response.status_code == 201:
|
|
||||||
response_201 = ApplicationWithdraw.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_201
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Response[ApplicationWithdraw]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: ApplicationWithdraw,
|
|
||||||
) -> Response[ApplicationWithdraw]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
body (ApplicationWithdraw):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationWithdraw]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: ApplicationWithdraw,
|
|
||||||
) -> Optional[ApplicationWithdraw]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
body (ApplicationWithdraw):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationWithdraw
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
|
||||||
body=body,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: ApplicationWithdraw,
|
|
||||||
) -> Response[ApplicationWithdraw]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
body (ApplicationWithdraw):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationWithdraw]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
body: ApplicationWithdraw,
|
|
||||||
) -> Optional[ApplicationWithdraw]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
body (ApplicationWithdraw):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationWithdraw
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
|
||||||
body=body,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -10,11 +10,12 @@ from ...types import Response
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
|
payee_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
"method": "get",
|
"method": "get",
|
||||||
"url": f"/wallet/api/application/withdraw/{uuid}/verify",
|
"url": f"/wallet/api/application/{payee_wallet}/withdraw/{uuid}/verify",
|
||||||
}
|
}
|
||||||
|
|
||||||
return _kwargs
|
return _kwargs
|
||||||
|
|
@ -46,12 +47,14 @@ def _build_response(
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
|
payee_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Response[ApplicationWithdraw]:
|
) -> Response[ApplicationWithdraw]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payee_wallet (str):
|
||||||
uuid (str):
|
uuid (str):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -63,6 +66,7 @@ def sync_detailed(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -74,12 +78,14 @@ def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
|
payee_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Optional[ApplicationWithdraw]:
|
) -> Optional[ApplicationWithdraw]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payee_wallet (str):
|
||||||
uuid (str):
|
uuid (str):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -91,18 +97,21 @@ def sync(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
|
payee_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Response[ApplicationWithdraw]:
|
) -> Response[ApplicationWithdraw]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payee_wallet (str):
|
||||||
uuid (str):
|
uuid (str):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -114,6 +123,7 @@ async def asyncio_detailed(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -123,12 +133,14 @@ async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
|
payee_wallet: str,
|
||||||
uuid: str,
|
uuid: str,
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
) -> Optional[ApplicationWithdraw]:
|
) -> Optional[ApplicationWithdraw]:
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
payee_wallet (str):
|
||||||
uuid (str):
|
uuid (str):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
|
|
@ -141,6 +153,7 @@ async def asyncio(
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,160 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.application_withdraw import ApplicationWithdraw
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": f"/wallet/api/application/{category_uuid}/withdraw/{uuid}/verify",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Optional[ApplicationWithdraw]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = ApplicationWithdraw.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
||||||
) -> Response[ApplicationWithdraw]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationWithdraw]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationWithdraw]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationWithdraw]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationWithdraw
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[ApplicationWithdraw]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[ApplicationWithdraw]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
category_uuid: str,
|
|
||||||
uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[ApplicationWithdraw]:
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
ApplicationWithdraw
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
uuid=uuid,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any, Optional, Union
|
from typing import Any, Optional, Union
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ... import errors
|
from ... import errors
|
||||||
from ...client import AuthenticatedClient, Client
|
from ...client import AuthenticatedClient, Client
|
||||||
from ...models.paginated_user_transaction_list import PaginatedUserTransactionList
|
from ...models.paginated_transaction_list import PaginatedTransactionList
|
||||||
from ...types import UNSET, Response, Unset
|
from ...types import UNSET, Response, Unset
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -13,6 +14,9 @@ def _get_kwargs(
|
||||||
*,
|
*,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
params: dict[str, Any] = {}
|
params: dict[str, Any] = {}
|
||||||
|
|
||||||
|
|
@ -20,6 +24,23 @@ def _get_kwargs(
|
||||||
|
|
||||||
params["offset"] = offset
|
params["offset"] = offset
|
||||||
|
|
||||||
|
json_payee: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(payee, Unset):
|
||||||
|
json_payee = str(payee)
|
||||||
|
params["payee"] = json_payee
|
||||||
|
|
||||||
|
json_payer: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(payer, Unset):
|
||||||
|
json_payer = str(payer)
|
||||||
|
params["payer"] = json_payer
|
||||||
|
|
||||||
|
json_wallets = []
|
||||||
|
for wallets_item_data in wallets:
|
||||||
|
wallets_item = str(wallets_item_data)
|
||||||
|
json_wallets.append(wallets_item)
|
||||||
|
|
||||||
|
params["wallets"] = json_wallets
|
||||||
|
|
||||||
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
|
|
@ -33,9 +54,9 @@ def _get_kwargs(
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
) -> Optional[PaginatedUserTransactionList]:
|
) -> Optional[PaginatedTransactionList]:
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = PaginatedUserTransactionList.from_dict(response.json())
|
response_200 = PaginatedTransactionList.from_dict(response.json())
|
||||||
|
|
||||||
return response_200
|
return response_200
|
||||||
|
|
||||||
|
|
@ -47,7 +68,7 @@ def _parse_response(
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
) -> Response[PaginatedUserTransactionList]:
|
) -> Response[PaginatedTransactionList]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=HTTPStatus(response.status_code),
|
status_code=HTTPStatus(response.status_code),
|
||||||
content=response.content,
|
content=response.content,
|
||||||
|
|
@ -61,7 +82,10 @@ def sync_detailed(
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Response[PaginatedUserTransactionList]:
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> Response[PaginatedTransactionList]:
|
||||||
"""GET: API for getting list of transactions for authenticated user
|
"""GET: API for getting list of transactions for authenticated user
|
||||||
POST: API for creating transaction for transferring funds from authenticated user to application
|
POST: API for creating transaction for transferring funds from authenticated user to application
|
||||||
owner. (deprecated)
|
owner. (deprecated)
|
||||||
|
|
@ -71,18 +95,24 @@ def sync_detailed(
|
||||||
Args:
|
Args:
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
payee (Union[Unset, UUID]):
|
||||||
|
payer (Union[Unset, UUID]):
|
||||||
|
wallets (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[PaginatedUserTransactionList]
|
Response[PaginatedTransactionList]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
payee=payee,
|
||||||
|
payer=payer,
|
||||||
|
wallets=wallets,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
response = client.get_httpx_client().request(
|
||||||
|
|
@ -97,7 +127,10 @@ def sync(
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Optional[PaginatedUserTransactionList]:
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> Optional[PaginatedTransactionList]:
|
||||||
"""GET: API for getting list of transactions for authenticated user
|
"""GET: API for getting list of transactions for authenticated user
|
||||||
POST: API for creating transaction for transferring funds from authenticated user to application
|
POST: API for creating transaction for transferring funds from authenticated user to application
|
||||||
owner. (deprecated)
|
owner. (deprecated)
|
||||||
|
|
@ -107,19 +140,25 @@ def sync(
|
||||||
Args:
|
Args:
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
payee (Union[Unset, UUID]):
|
||||||
|
payer (Union[Unset, UUID]):
|
||||||
|
wallets (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
PaginatedUserTransactionList
|
PaginatedTransactionList
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
payee=payee,
|
||||||
|
payer=payer,
|
||||||
|
wallets=wallets,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -128,7 +167,10 @@ async def asyncio_detailed(
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Response[PaginatedUserTransactionList]:
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> Response[PaginatedTransactionList]:
|
||||||
"""GET: API for getting list of transactions for authenticated user
|
"""GET: API for getting list of transactions for authenticated user
|
||||||
POST: API for creating transaction for transferring funds from authenticated user to application
|
POST: API for creating transaction for transferring funds from authenticated user to application
|
||||||
owner. (deprecated)
|
owner. (deprecated)
|
||||||
|
|
@ -138,18 +180,24 @@ async def asyncio_detailed(
|
||||||
Args:
|
Args:
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
payee (Union[Unset, UUID]):
|
||||||
|
payer (Union[Unset, UUID]):
|
||||||
|
wallets (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[PaginatedUserTransactionList]
|
Response[PaginatedTransactionList]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
payee=payee,
|
||||||
|
payer=payer,
|
||||||
|
wallets=wallets,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
response = await client.get_async_httpx_client().request(**kwargs)
|
||||||
|
|
@ -162,7 +210,10 @@ async def asyncio(
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Optional[PaginatedUserTransactionList]:
|
payee: Union[Unset, UUID] = UNSET,
|
||||||
|
payer: Union[Unset, UUID] = UNSET,
|
||||||
|
wallets: list[UUID],
|
||||||
|
) -> Optional[PaginatedTransactionList]:
|
||||||
"""GET: API for getting list of transactions for authenticated user
|
"""GET: API for getting list of transactions for authenticated user
|
||||||
POST: API for creating transaction for transferring funds from authenticated user to application
|
POST: API for creating transaction for transferring funds from authenticated user to application
|
||||||
owner. (deprecated)
|
owner. (deprecated)
|
||||||
|
|
@ -172,13 +223,16 @@ async def asyncio(
|
||||||
Args:
|
Args:
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
payee (Union[Unset, UUID]):
|
||||||
|
payer (Union[Unset, UUID]):
|
||||||
|
wallets (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
PaginatedUserTransactionList
|
PaginatedTransactionList
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -186,5 +240,8 @@ async def asyncio(
|
||||||
client=client,
|
client=client,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
payee=payee,
|
||||||
|
payer=payer,
|
||||||
|
wallets=wallets,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|
|
||||||
|
|
@ -1,147 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.my_wallet import MyWallet
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
category_uuid: str,
|
|
||||||
) -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": f"/wallet/api/user/{category_uuid}/balance",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[MyWallet]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = MyWallet.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[MyWallet]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[MyWallet]:
|
|
||||||
"""API for getting authenticated user balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[MyWallet]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[MyWallet]:
|
|
||||||
"""API for getting authenticated user balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
MyWallet
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[MyWallet]:
|
|
||||||
"""API for getting authenticated user balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[MyWallet]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
category_uuid: str,
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[MyWallet]:
|
|
||||||
"""API for getting authenticated user balance.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
category_uuid (str):
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
MyWallet
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -1,123 +0,0 @@
|
||||||
from http import HTTPStatus
|
|
||||||
from typing import Any, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ... import errors
|
|
||||||
from ...client import AuthenticatedClient, Client
|
|
||||||
from ...models.my_wallet import MyWallet
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs() -> dict[str, Any]:
|
|
||||||
_kwargs: dict[str, Any] = {
|
|
||||||
"method": "get",
|
|
||||||
"url": "/wallet/api/wallet/balance",
|
|
||||||
}
|
|
||||||
|
|
||||||
return _kwargs
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[MyWallet]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = MyWallet.from_dict(response.json())
|
|
||||||
|
|
||||||
return response_200
|
|
||||||
|
|
||||||
if client.raise_on_unexpected_status:
|
|
||||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[MyWallet]:
|
|
||||||
return Response(
|
|
||||||
status_code=HTTPStatus(response.status_code),
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(client=client, response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[MyWallet]:
|
|
||||||
"""API for getting authenticated user balance.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[MyWallet]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs()
|
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[MyWallet]:
|
|
||||||
"""API for getting authenticated user balance.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
MyWallet
|
|
||||||
"""
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Response[MyWallet]:
|
|
||||||
"""API for getting authenticated user balance.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Response[MyWallet]
|
|
||||||
"""
|
|
||||||
|
|
||||||
kwargs = _get_kwargs()
|
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(client=client, response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: AuthenticatedClient,
|
|
||||||
) -> Optional[MyWallet]:
|
|
||||||
"""API for getting authenticated user balance.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
MyWallet
|
|
||||||
"""
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any, Optional, Union
|
from typing import Any, Optional, Union
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ... import errors
|
from ... import errors
|
||||||
from ...client import AuthenticatedClient, Client
|
from ...client import AuthenticatedClient, Client
|
||||||
from ...models.paginated_application_transaction_list import PaginatedApplicationTransactionList
|
from ...models.paginated_account_list import PaginatedAccountList
|
||||||
from ...types import UNSET, Response, Unset
|
from ...types import UNSET, Response, Unset
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
category_uuid: str,
|
|
||||||
*,
|
*,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
|
wallet: list[UUID],
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
params: dict[str, Any] = {}
|
params: dict[str, Any] = {}
|
||||||
|
|
||||||
|
|
@ -21,11 +22,18 @@ def _get_kwargs(
|
||||||
|
|
||||||
params["offset"] = offset
|
params["offset"] = offset
|
||||||
|
|
||||||
|
json_wallet = []
|
||||||
|
for wallet_item_data in wallet:
|
||||||
|
wallet_item = str(wallet_item_data)
|
||||||
|
json_wallet.append(wallet_item)
|
||||||
|
|
||||||
|
params["wallet"] = json_wallet
|
||||||
|
|
||||||
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
||||||
|
|
||||||
_kwargs: dict[str, Any] = {
|
_kwargs: dict[str, Any] = {
|
||||||
"method": "get",
|
"method": "get",
|
||||||
"url": f"/wallet/api/application/{category_uuid}/",
|
"url": "/wallet/api/wallets/",
|
||||||
"params": params,
|
"params": params,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,9 +42,9 @@ def _get_kwargs(
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
) -> Optional[PaginatedApplicationTransactionList]:
|
) -> Optional[PaginatedAccountList]:
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
response_200 = PaginatedApplicationTransactionList.from_dict(response.json())
|
response_200 = PaginatedAccountList.from_dict(response.json())
|
||||||
|
|
||||||
return response_200
|
return response_200
|
||||||
|
|
||||||
|
|
@ -48,7 +56,7 @@ def _parse_response(
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(
|
||||||
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
||||||
) -> Response[PaginatedApplicationTransactionList]:
|
) -> Response[PaginatedAccountList]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=HTTPStatus(response.status_code),
|
status_code=HTTPStatus(response.status_code),
|
||||||
content=response.content,
|
content=response.content,
|
||||||
|
|
@ -58,30 +66,31 @@ def _build_response(
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
category_uuid: str,
|
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Response[PaginatedApplicationTransactionList]:
|
wallet: list[UUID],
|
||||||
"""
|
) -> Response[PaginatedAccountList]:
|
||||||
|
"""API for getting authenticated user balance.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
category_uuid (str):
|
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
wallet (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[PaginatedApplicationTransactionList]
|
Response[PaginatedAccountList]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
category_uuid=category_uuid,
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
wallet=wallet,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = client.get_httpx_client().request(
|
response = client.get_httpx_client().request(
|
||||||
|
|
@ -92,59 +101,61 @@ def sync_detailed(
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
category_uuid: str,
|
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Optional[PaginatedApplicationTransactionList]:
|
wallet: list[UUID],
|
||||||
"""
|
) -> Optional[PaginatedAccountList]:
|
||||||
|
"""API for getting authenticated user balance.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
category_uuid (str):
|
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
wallet (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
PaginatedApplicationTransactionList
|
PaginatedAccountList
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
client=client,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
wallet=wallet,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
category_uuid: str,
|
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Response[PaginatedApplicationTransactionList]:
|
wallet: list[UUID],
|
||||||
"""
|
) -> Response[PaginatedAccountList]:
|
||||||
|
"""API for getting authenticated user balance.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
category_uuid (str):
|
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
wallet (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response[PaginatedApplicationTransactionList]
|
Response[PaginatedAccountList]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
category_uuid=category_uuid,
|
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
wallet=wallet,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = await client.get_async_httpx_client().request(**kwargs)
|
response = await client.get_async_httpx_client().request(**kwargs)
|
||||||
|
|
@ -153,31 +164,32 @@ async def asyncio_detailed(
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
category_uuid: str,
|
|
||||||
*,
|
*,
|
||||||
client: AuthenticatedClient,
|
client: AuthenticatedClient,
|
||||||
limit: Union[Unset, int] = UNSET,
|
limit: Union[Unset, int] = UNSET,
|
||||||
offset: Union[Unset, int] = UNSET,
|
offset: Union[Unset, int] = UNSET,
|
||||||
) -> Optional[PaginatedApplicationTransactionList]:
|
wallet: list[UUID],
|
||||||
"""
|
) -> Optional[PaginatedAccountList]:
|
||||||
|
"""API for getting authenticated user balance.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
category_uuid (str):
|
|
||||||
limit (Union[Unset, int]):
|
limit (Union[Unset, int]):
|
||||||
offset (Union[Unset, int]):
|
offset (Union[Unset, int]):
|
||||||
|
wallet (list[UUID]):
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
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.
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
PaginatedApplicationTransactionList
|
PaginatedAccountList
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
category_uuid=category_uuid,
|
|
||||||
client=client,
|
client=client,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
offset=offset,
|
offset=offset,
|
||||||
|
wallet=wallet,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
|
@ -1,25 +1,19 @@
|
||||||
"""Contains all the data models used in inputs/outputs"""
|
"""Contains all the data models used in inputs/outputs"""
|
||||||
|
|
||||||
from .application_balance import ApplicationBalance
|
from .account import Account
|
||||||
from .application_deposit import ApplicationDeposit
|
from .application_deposit import ApplicationDeposit
|
||||||
from .application_transaction import ApplicationTransaction
|
|
||||||
from .application_withdraw import ApplicationWithdraw
|
from .application_withdraw import ApplicationWithdraw
|
||||||
from .charge import Charge
|
from .paginated_account_list import PaginatedAccountList
|
||||||
from .my_wallet import MyWallet
|
from .paginated_transaction_list import PaginatedTransactionList
|
||||||
from .paginated_application_transaction_list import PaginatedApplicationTransactionList
|
|
||||||
from .paginated_user_transaction_list import PaginatedUserTransactionList
|
|
||||||
from .state_enum import StateEnum
|
from .state_enum import StateEnum
|
||||||
from .user_transaction import UserTransaction
|
from .transaction import Transaction
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
"ApplicationBalance",
|
"Account",
|
||||||
"ApplicationDeposit",
|
"ApplicationDeposit",
|
||||||
"ApplicationTransaction",
|
|
||||||
"ApplicationWithdraw",
|
"ApplicationWithdraw",
|
||||||
"Charge",
|
"PaginatedAccountList",
|
||||||
"MyWallet",
|
"PaginatedTransactionList",
|
||||||
"PaginatedApplicationTransactionList",
|
|
||||||
"PaginatedUserTransactionList",
|
|
||||||
"StateEnum",
|
"StateEnum",
|
||||||
"UserTransaction",
|
"Transaction",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,45 @@
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from typing import Any, TypeVar, Union
|
from typing import Any, TypeVar, Union, cast
|
||||||
|
from uuid import UUID
|
||||||
|
|
||||||
from attrs import define as _attrs_define
|
from attrs import define as _attrs_define
|
||||||
from attrs import field as _attrs_field
|
from attrs import field as _attrs_field
|
||||||
|
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
T = TypeVar("T", bound="ApplicationBalance")
|
T = TypeVar("T", bound="Account")
|
||||||
|
|
||||||
|
|
||||||
@_attrs_define
|
@_attrs_define
|
||||||
class ApplicationBalance:
|
class Account:
|
||||||
"""
|
"""
|
||||||
Attributes:
|
Attributes:
|
||||||
balance (Union[Unset, int]):
|
balance (Union[Unset, int]):
|
||||||
|
wallet (Union[None, UUID, Unset]):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
balance: Union[Unset, int] = UNSET
|
balance: Union[Unset, int] = UNSET
|
||||||
|
wallet: Union[None, UUID, Unset] = UNSET
|
||||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> dict[str, Any]:
|
def to_dict(self) -> dict[str, Any]:
|
||||||
balance = self.balance
|
balance = self.balance
|
||||||
|
|
||||||
|
wallet: Union[None, Unset, str]
|
||||||
|
if isinstance(self.wallet, Unset):
|
||||||
|
wallet = UNSET
|
||||||
|
elif isinstance(self.wallet, UUID):
|
||||||
|
wallet = str(self.wallet)
|
||||||
|
else:
|
||||||
|
wallet = self.wallet
|
||||||
|
|
||||||
field_dict: dict[str, Any] = {}
|
field_dict: dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if balance is not UNSET:
|
if balance is not UNSET:
|
||||||
field_dict["balance"] = balance
|
field_dict["balance"] = balance
|
||||||
|
if wallet is not UNSET:
|
||||||
|
field_dict["wallet"] = wallet
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
|
|
@ -35,12 +48,30 @@ class ApplicationBalance:
|
||||||
d = dict(src_dict)
|
d = dict(src_dict)
|
||||||
balance = d.pop("balance", UNSET)
|
balance = d.pop("balance", UNSET)
|
||||||
|
|
||||||
application_balance = cls(
|
def _parse_wallet(data: object) -> Union[None, UUID, Unset]:
|
||||||
|
if data is None:
|
||||||
|
return data
|
||||||
|
if isinstance(data, Unset):
|
||||||
|
return data
|
||||||
|
try:
|
||||||
|
if not isinstance(data, str):
|
||||||
|
raise TypeError()
|
||||||
|
wallet_type_0 = UUID(data)
|
||||||
|
|
||||||
|
return wallet_type_0
|
||||||
|
except: # noqa: E722
|
||||||
|
pass
|
||||||
|
return cast(Union[None, UUID, Unset], data)
|
||||||
|
|
||||||
|
wallet = _parse_wallet(d.pop("wallet", UNSET))
|
||||||
|
|
||||||
|
account = cls(
|
||||||
balance=balance,
|
balance=balance,
|
||||||
|
wallet=wallet,
|
||||||
)
|
)
|
||||||
|
|
||||||
application_balance.additional_properties = d
|
account.additional_properties = d
|
||||||
return application_balance
|
return account
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> list[str]:
|
def additional_keys(self) -> list[str]:
|
||||||
|
|
@ -17,10 +17,12 @@ T = TypeVar("T", bound="ApplicationDeposit")
|
||||||
class ApplicationDeposit:
|
class ApplicationDeposit:
|
||||||
"""
|
"""
|
||||||
Attributes:
|
Attributes:
|
||||||
payer_id (str):
|
payer (str):
|
||||||
payer_type (str):
|
payer_type (str):
|
||||||
payee_id (UUID):
|
payer_wallet (UUID):
|
||||||
|
payee (UUID):
|
||||||
payee_type (int):
|
payee_type (int):
|
||||||
|
payee_wallet (UUID):
|
||||||
created_at (datetime.datetime):
|
created_at (datetime.datetime):
|
||||||
state (StateEnum): * `1` - created
|
state (StateEnum): * `1` - created
|
||||||
* `2` - delayed
|
* `2` - delayed
|
||||||
|
|
@ -35,10 +37,12 @@ class ApplicationDeposit:
|
||||||
details (Union[Unset, Any]):
|
details (Union[Unset, Any]):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
payer_id: str
|
payer: str
|
||||||
payer_type: str
|
payer_type: str
|
||||||
payee_id: UUID
|
payer_wallet: UUID
|
||||||
|
payee: UUID
|
||||||
payee_type: int
|
payee_type: int
|
||||||
|
payee_wallet: UUID
|
||||||
created_at: datetime.datetime
|
created_at: datetime.datetime
|
||||||
state: StateEnum
|
state: StateEnum
|
||||||
amount: int
|
amount: int
|
||||||
|
|
@ -48,14 +52,18 @@ class ApplicationDeposit:
|
||||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> dict[str, Any]:
|
def to_dict(self) -> dict[str, Any]:
|
||||||
payer_id = self.payer_id
|
payer = self.payer
|
||||||
|
|
||||||
payer_type = self.payer_type
|
payer_type = self.payer_type
|
||||||
|
|
||||||
payee_id = str(self.payee_id)
|
payer_wallet = str(self.payer_wallet)
|
||||||
|
|
||||||
|
payee = str(self.payee)
|
||||||
|
|
||||||
payee_type = self.payee_type
|
payee_type = self.payee_type
|
||||||
|
|
||||||
|
payee_wallet = str(self.payee_wallet)
|
||||||
|
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
|
|
||||||
state = self.state.value
|
state = self.state.value
|
||||||
|
|
@ -74,10 +82,12 @@ class ApplicationDeposit:
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update(
|
field_dict.update(
|
||||||
{
|
{
|
||||||
"payer_id": payer_id,
|
"payer": payer,
|
||||||
"payer_type": payer_type,
|
"payer_type": payer_type,
|
||||||
"payee_id": payee_id,
|
"payer_wallet": payer_wallet,
|
||||||
|
"payee": payee,
|
||||||
"payee_type": payee_type,
|
"payee_type": payee_type,
|
||||||
|
"payee_wallet": payee_wallet,
|
||||||
"created_at": created_at,
|
"created_at": created_at,
|
||||||
"state": state,
|
"state": state,
|
||||||
"amount": amount,
|
"amount": amount,
|
||||||
|
|
@ -94,14 +104,18 @@ class ApplicationDeposit:
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||||
d = dict(src_dict)
|
d = dict(src_dict)
|
||||||
payer_id = d.pop("payer_id")
|
payer = d.pop("payer")
|
||||||
|
|
||||||
payer_type = d.pop("payer_type")
|
payer_type = d.pop("payer_type")
|
||||||
|
|
||||||
payee_id = UUID(d.pop("payee_id"))
|
payer_wallet = UUID(d.pop("payer_wallet"))
|
||||||
|
|
||||||
|
payee = UUID(d.pop("payee"))
|
||||||
|
|
||||||
payee_type = d.pop("payee_type")
|
payee_type = d.pop("payee_type")
|
||||||
|
|
||||||
|
payee_wallet = UUID(d.pop("payee_wallet"))
|
||||||
|
|
||||||
created_at = isoparse(d.pop("created_at"))
|
created_at = isoparse(d.pop("created_at"))
|
||||||
|
|
||||||
state = StateEnum(d.pop("state"))
|
state = StateEnum(d.pop("state"))
|
||||||
|
|
@ -120,10 +134,12 @@ class ApplicationDeposit:
|
||||||
details = d.pop("details", UNSET)
|
details = d.pop("details", UNSET)
|
||||||
|
|
||||||
application_deposit = cls(
|
application_deposit = cls(
|
||||||
payer_id=payer_id,
|
payer=payer,
|
||||||
payer_type=payer_type,
|
payer_type=payer_type,
|
||||||
payee_id=payee_id,
|
payer_wallet=payer_wallet,
|
||||||
|
payee=payee,
|
||||||
payee_type=payee_type,
|
payee_type=payee_type,
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
created_at=created_at,
|
created_at=created_at,
|
||||||
state=state,
|
state=state,
|
||||||
amount=amount,
|
amount=amount,
|
||||||
|
|
|
||||||
|
|
@ -1,160 +0,0 @@
|
||||||
import datetime
|
|
||||||
from collections.abc import Mapping
|
|
||||||
from typing import Any, TypeVar, Union
|
|
||||||
from uuid import UUID
|
|
||||||
|
|
||||||
from attrs import define as _attrs_define
|
|
||||||
from attrs import field as _attrs_field
|
|
||||||
from dateutil.parser import isoparse
|
|
||||||
|
|
||||||
from ..models.state_enum import StateEnum
|
|
||||||
from ..types import UNSET, Unset
|
|
||||||
|
|
||||||
T = TypeVar("T", bound="ApplicationTransaction")
|
|
||||||
|
|
||||||
|
|
||||||
@_attrs_define
|
|
||||||
class ApplicationTransaction:
|
|
||||||
"""
|
|
||||||
Attributes:
|
|
||||||
uuid (UUID):
|
|
||||||
payer_id (str):
|
|
||||||
payer_type (str):
|
|
||||||
payee_id (UUID):
|
|
||||||
payee_type (UUID):
|
|
||||||
created_at (datetime.datetime):
|
|
||||||
state (StateEnum): * `1` - created
|
|
||||||
* `2` - delayed
|
|
||||||
* `3` - pending
|
|
||||||
* `4` - incomplete
|
|
||||||
* `5` - success
|
|
||||||
* `6` - failed
|
|
||||||
* `7` - expected_failure
|
|
||||||
amount (int):
|
|
||||||
updated_at (datetime.datetime):
|
|
||||||
details (Any):
|
|
||||||
role (str):
|
|
||||||
delay (Union[Unset, int]):
|
|
||||||
"""
|
|
||||||
|
|
||||||
uuid: UUID
|
|
||||||
payer_id: str
|
|
||||||
payer_type: str
|
|
||||||
payee_id: UUID
|
|
||||||
payee_type: UUID
|
|
||||||
created_at: datetime.datetime
|
|
||||||
state: StateEnum
|
|
||||||
amount: int
|
|
||||||
updated_at: datetime.datetime
|
|
||||||
details: Any
|
|
||||||
role: str
|
|
||||||
delay: Union[Unset, int] = UNSET
|
|
||||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
||||||
|
|
||||||
def to_dict(self) -> dict[str, Any]:
|
|
||||||
uuid = str(self.uuid)
|
|
||||||
|
|
||||||
payer_id = self.payer_id
|
|
||||||
|
|
||||||
payer_type = self.payer_type
|
|
||||||
|
|
||||||
payee_id = str(self.payee_id)
|
|
||||||
|
|
||||||
payee_type = str(self.payee_type)
|
|
||||||
|
|
||||||
created_at = self.created_at.isoformat()
|
|
||||||
|
|
||||||
state = self.state.value
|
|
||||||
|
|
||||||
amount = self.amount
|
|
||||||
|
|
||||||
updated_at = self.updated_at.isoformat()
|
|
||||||
|
|
||||||
details = self.details
|
|
||||||
|
|
||||||
role = self.role
|
|
||||||
|
|
||||||
delay = self.delay
|
|
||||||
|
|
||||||
field_dict: dict[str, Any] = {}
|
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update(
|
|
||||||
{
|
|
||||||
"uuid": uuid,
|
|
||||||
"payer_id": payer_id,
|
|
||||||
"payer_type": payer_type,
|
|
||||||
"payee_id": payee_id,
|
|
||||||
"payee_type": payee_type,
|
|
||||||
"created_at": created_at,
|
|
||||||
"state": state,
|
|
||||||
"amount": amount,
|
|
||||||
"updated_at": updated_at,
|
|
||||||
"details": details,
|
|
||||||
"role": role,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
if delay is not UNSET:
|
|
||||||
field_dict["delay"] = delay
|
|
||||||
|
|
||||||
return field_dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
||||||
d = dict(src_dict)
|
|
||||||
uuid = UUID(d.pop("uuid"))
|
|
||||||
|
|
||||||
payer_id = d.pop("payer_id")
|
|
||||||
|
|
||||||
payer_type = d.pop("payer_type")
|
|
||||||
|
|
||||||
payee_id = UUID(d.pop("payee_id"))
|
|
||||||
|
|
||||||
payee_type = UUID(d.pop("payee_type"))
|
|
||||||
|
|
||||||
created_at = isoparse(d.pop("created_at"))
|
|
||||||
|
|
||||||
state = StateEnum(d.pop("state"))
|
|
||||||
|
|
||||||
amount = d.pop("amount")
|
|
||||||
|
|
||||||
updated_at = isoparse(d.pop("updated_at"))
|
|
||||||
|
|
||||||
details = d.pop("details")
|
|
||||||
|
|
||||||
role = d.pop("role")
|
|
||||||
|
|
||||||
delay = d.pop("delay", UNSET)
|
|
||||||
|
|
||||||
application_transaction = cls(
|
|
||||||
uuid=uuid,
|
|
||||||
payer_id=payer_id,
|
|
||||||
payer_type=payer_type,
|
|
||||||
payee_id=payee_id,
|
|
||||||
payee_type=payee_type,
|
|
||||||
created_at=created_at,
|
|
||||||
state=state,
|
|
||||||
amount=amount,
|
|
||||||
updated_at=updated_at,
|
|
||||||
details=details,
|
|
||||||
role=role,
|
|
||||||
delay=delay,
|
|
||||||
)
|
|
||||||
|
|
||||||
application_transaction.additional_properties = d
|
|
||||||
return application_transaction
|
|
||||||
|
|
||||||
@property
|
|
||||||
def additional_keys(self) -> list[str]:
|
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
|
||||||
return self.additional_properties[key]
|
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
|
||||||
self.additional_properties[key] = value
|
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
|
||||||
del self.additional_properties[key]
|
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
|
||||||
return key in self.additional_properties
|
|
||||||
|
|
@ -17,10 +17,12 @@ T = TypeVar("T", bound="ApplicationWithdraw")
|
||||||
class ApplicationWithdraw:
|
class ApplicationWithdraw:
|
||||||
"""
|
"""
|
||||||
Attributes:
|
Attributes:
|
||||||
payer_id (UUID):
|
payer (UUID):
|
||||||
payer_type (int):
|
payer_type (int):
|
||||||
payee_id (str):
|
payer_wallet (UUID):
|
||||||
|
payee (str):
|
||||||
payee_type (str):
|
payee_type (str):
|
||||||
|
payee_wallet (UUID):
|
||||||
created_at (datetime.datetime):
|
created_at (datetime.datetime):
|
||||||
state (StateEnum): * `1` - created
|
state (StateEnum): * `1` - created
|
||||||
* `2` - delayed
|
* `2` - delayed
|
||||||
|
|
@ -35,10 +37,12 @@ class ApplicationWithdraw:
|
||||||
details (Union[Unset, Any]):
|
details (Union[Unset, Any]):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
payer_id: UUID
|
payer: UUID
|
||||||
payer_type: int
|
payer_type: int
|
||||||
payee_id: str
|
payer_wallet: UUID
|
||||||
|
payee: str
|
||||||
payee_type: str
|
payee_type: str
|
||||||
|
payee_wallet: UUID
|
||||||
created_at: datetime.datetime
|
created_at: datetime.datetime
|
||||||
state: StateEnum
|
state: StateEnum
|
||||||
amount: int
|
amount: int
|
||||||
|
|
@ -48,14 +52,18 @@ class ApplicationWithdraw:
|
||||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> dict[str, Any]:
|
def to_dict(self) -> dict[str, Any]:
|
||||||
payer_id = str(self.payer_id)
|
payer = str(self.payer)
|
||||||
|
|
||||||
payer_type = self.payer_type
|
payer_type = self.payer_type
|
||||||
|
|
||||||
payee_id = self.payee_id
|
payer_wallet = str(self.payer_wallet)
|
||||||
|
|
||||||
|
payee = self.payee
|
||||||
|
|
||||||
payee_type = self.payee_type
|
payee_type = self.payee_type
|
||||||
|
|
||||||
|
payee_wallet = str(self.payee_wallet)
|
||||||
|
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
|
|
||||||
state = self.state.value
|
state = self.state.value
|
||||||
|
|
@ -74,10 +82,12 @@ class ApplicationWithdraw:
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update(
|
field_dict.update(
|
||||||
{
|
{
|
||||||
"payer_id": payer_id,
|
"payer": payer,
|
||||||
"payer_type": payer_type,
|
"payer_type": payer_type,
|
||||||
"payee_id": payee_id,
|
"payer_wallet": payer_wallet,
|
||||||
|
"payee": payee,
|
||||||
"payee_type": payee_type,
|
"payee_type": payee_type,
|
||||||
|
"payee_wallet": payee_wallet,
|
||||||
"created_at": created_at,
|
"created_at": created_at,
|
||||||
"state": state,
|
"state": state,
|
||||||
"amount": amount,
|
"amount": amount,
|
||||||
|
|
@ -94,14 +104,18 @@ class ApplicationWithdraw:
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||||
d = dict(src_dict)
|
d = dict(src_dict)
|
||||||
payer_id = UUID(d.pop("payer_id"))
|
payer = UUID(d.pop("payer"))
|
||||||
|
|
||||||
payer_type = d.pop("payer_type")
|
payer_type = d.pop("payer_type")
|
||||||
|
|
||||||
payee_id = d.pop("payee_id")
|
payer_wallet = UUID(d.pop("payer_wallet"))
|
||||||
|
|
||||||
|
payee = d.pop("payee")
|
||||||
|
|
||||||
payee_type = d.pop("payee_type")
|
payee_type = d.pop("payee_type")
|
||||||
|
|
||||||
|
payee_wallet = UUID(d.pop("payee_wallet"))
|
||||||
|
|
||||||
created_at = isoparse(d.pop("created_at"))
|
created_at = isoparse(d.pop("created_at"))
|
||||||
|
|
||||||
state = StateEnum(d.pop("state"))
|
state = StateEnum(d.pop("state"))
|
||||||
|
|
@ -120,10 +134,12 @@ class ApplicationWithdraw:
|
||||||
details = d.pop("details", UNSET)
|
details = d.pop("details", UNSET)
|
||||||
|
|
||||||
application_withdraw = cls(
|
application_withdraw = cls(
|
||||||
payer_id=payer_id,
|
payer=payer,
|
||||||
payer_type=payer_type,
|
payer_type=payer_type,
|
||||||
payee_id=payee_id,
|
payer_wallet=payer_wallet,
|
||||||
|
payee=payee,
|
||||||
payee_type=payee_type,
|
payee_type=payee_type,
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
created_at=created_at,
|
created_at=created_at,
|
||||||
state=state,
|
state=state,
|
||||||
amount=amount,
|
amount=amount,
|
||||||
|
|
|
||||||
|
|
@ -1,150 +0,0 @@
|
||||||
import datetime
|
|
||||||
from collections.abc import Mapping
|
|
||||||
from typing import Any, TypeVar, Union, cast
|
|
||||||
from uuid import UUID
|
|
||||||
|
|
||||||
from attrs import define as _attrs_define
|
|
||||||
from attrs import field as _attrs_field
|
|
||||||
from dateutil.parser import isoparse
|
|
||||||
|
|
||||||
from ..models.state_enum import StateEnum
|
|
||||||
|
|
||||||
T = TypeVar("T", bound="Charge")
|
|
||||||
|
|
||||||
|
|
||||||
@_attrs_define
|
|
||||||
class Charge:
|
|
||||||
"""
|
|
||||||
Attributes:
|
|
||||||
uuid (UUID):
|
|
||||||
user (UUID):
|
|
||||||
created_at (Union[None, datetime.datetime]):
|
|
||||||
state (StateEnum): * `1` - created
|
|
||||||
* `2` - delayed
|
|
||||||
* `3` - pending
|
|
||||||
* `4` - incomplete
|
|
||||||
* `5` - success
|
|
||||||
* `6` - failed
|
|
||||||
* `7` - expected_failure
|
|
||||||
amount (Union[None, int]):
|
|
||||||
updated_at (Union[None, datetime.datetime]):
|
|
||||||
"""
|
|
||||||
|
|
||||||
uuid: UUID
|
|
||||||
user: UUID
|
|
||||||
created_at: Union[None, datetime.datetime]
|
|
||||||
state: StateEnum
|
|
||||||
amount: Union[None, int]
|
|
||||||
updated_at: Union[None, datetime.datetime]
|
|
||||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
||||||
|
|
||||||
def to_dict(self) -> dict[str, Any]:
|
|
||||||
uuid = str(self.uuid)
|
|
||||||
|
|
||||||
user = str(self.user)
|
|
||||||
|
|
||||||
created_at: Union[None, str]
|
|
||||||
if isinstance(self.created_at, datetime.datetime):
|
|
||||||
created_at = self.created_at.isoformat()
|
|
||||||
else:
|
|
||||||
created_at = self.created_at
|
|
||||||
|
|
||||||
state = self.state.value
|
|
||||||
|
|
||||||
amount: Union[None, int]
|
|
||||||
amount = self.amount
|
|
||||||
|
|
||||||
updated_at: Union[None, str]
|
|
||||||
if isinstance(self.updated_at, datetime.datetime):
|
|
||||||
updated_at = self.updated_at.isoformat()
|
|
||||||
else:
|
|
||||||
updated_at = self.updated_at
|
|
||||||
|
|
||||||
field_dict: dict[str, Any] = {}
|
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update(
|
|
||||||
{
|
|
||||||
"uuid": uuid,
|
|
||||||
"user": user,
|
|
||||||
"created_at": created_at,
|
|
||||||
"state": state,
|
|
||||||
"amount": amount,
|
|
||||||
"updated_at": updated_at,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
return field_dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
||||||
d = dict(src_dict)
|
|
||||||
uuid = UUID(d.pop("uuid"))
|
|
||||||
|
|
||||||
user = UUID(d.pop("user"))
|
|
||||||
|
|
||||||
def _parse_created_at(data: object) -> Union[None, datetime.datetime]:
|
|
||||||
if data is None:
|
|
||||||
return data
|
|
||||||
try:
|
|
||||||
if not isinstance(data, str):
|
|
||||||
raise TypeError()
|
|
||||||
created_at_type_0 = isoparse(data)
|
|
||||||
|
|
||||||
return created_at_type_0
|
|
||||||
except: # noqa: E722
|
|
||||||
pass
|
|
||||||
return cast(Union[None, datetime.datetime], data)
|
|
||||||
|
|
||||||
created_at = _parse_created_at(d.pop("created_at"))
|
|
||||||
|
|
||||||
state = StateEnum(d.pop("state"))
|
|
||||||
|
|
||||||
def _parse_amount(data: object) -> Union[None, int]:
|
|
||||||
if data is None:
|
|
||||||
return data
|
|
||||||
return cast(Union[None, int], data)
|
|
||||||
|
|
||||||
amount = _parse_amount(d.pop("amount"))
|
|
||||||
|
|
||||||
def _parse_updated_at(data: object) -> Union[None, datetime.datetime]:
|
|
||||||
if data is None:
|
|
||||||
return data
|
|
||||||
try:
|
|
||||||
if not isinstance(data, str):
|
|
||||||
raise TypeError()
|
|
||||||
updated_at_type_0 = isoparse(data)
|
|
||||||
|
|
||||||
return updated_at_type_0
|
|
||||||
except: # noqa: E722
|
|
||||||
pass
|
|
||||||
return cast(Union[None, datetime.datetime], data)
|
|
||||||
|
|
||||||
updated_at = _parse_updated_at(d.pop("updated_at"))
|
|
||||||
|
|
||||||
charge = cls(
|
|
||||||
uuid=uuid,
|
|
||||||
user=user,
|
|
||||||
created_at=created_at,
|
|
||||||
state=state,
|
|
||||||
amount=amount,
|
|
||||||
updated_at=updated_at,
|
|
||||||
)
|
|
||||||
|
|
||||||
charge.additional_properties = d
|
|
||||||
return charge
|
|
||||||
|
|
||||||
@property
|
|
||||||
def additional_keys(self) -> list[str]:
|
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
|
||||||
return self.additional_properties[key]
|
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
|
||||||
self.additional_properties[key] = value
|
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
|
||||||
del self.additional_properties[key]
|
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
|
||||||
return key in self.additional_properties
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
from collections.abc import Mapping
|
|
||||||
from typing import Any, TypeVar, Union
|
|
||||||
|
|
||||||
from attrs import define as _attrs_define
|
|
||||||
from attrs import field as _attrs_field
|
|
||||||
|
|
||||||
from ..types import UNSET, Unset
|
|
||||||
|
|
||||||
T = TypeVar("T", bound="MyWallet")
|
|
||||||
|
|
||||||
|
|
||||||
@_attrs_define
|
|
||||||
class MyWallet:
|
|
||||||
"""
|
|
||||||
Attributes:
|
|
||||||
balance (Union[Unset, int]):
|
|
||||||
"""
|
|
||||||
|
|
||||||
balance: Union[Unset, int] = UNSET
|
|
||||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
||||||
|
|
||||||
def to_dict(self) -> dict[str, Any]:
|
|
||||||
balance = self.balance
|
|
||||||
|
|
||||||
field_dict: dict[str, Any] = {}
|
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if balance is not UNSET:
|
|
||||||
field_dict["balance"] = balance
|
|
||||||
|
|
||||||
return field_dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
||||||
d = dict(src_dict)
|
|
||||||
balance = d.pop("balance", UNSET)
|
|
||||||
|
|
||||||
my_wallet = cls(
|
|
||||||
balance=balance,
|
|
||||||
)
|
|
||||||
|
|
||||||
my_wallet.additional_properties = d
|
|
||||||
return my_wallet
|
|
||||||
|
|
||||||
@property
|
|
||||||
def additional_keys(self) -> list[str]:
|
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
|
||||||
return self.additional_properties[key]
|
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
|
||||||
self.additional_properties[key] = value
|
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
|
||||||
del self.additional_properties[key]
|
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
|
||||||
return key in self.additional_properties
|
|
||||||
|
|
@ -7,24 +7,24 @@ from attrs import field as _attrs_field
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ..models.user_transaction import UserTransaction
|
from ..models.account import Account
|
||||||
|
|
||||||
|
|
||||||
T = TypeVar("T", bound="PaginatedUserTransactionList")
|
T = TypeVar("T", bound="PaginatedAccountList")
|
||||||
|
|
||||||
|
|
||||||
@_attrs_define
|
@_attrs_define
|
||||||
class PaginatedUserTransactionList:
|
class PaginatedAccountList:
|
||||||
"""
|
"""
|
||||||
Attributes:
|
Attributes:
|
||||||
count (int): Example: 123.
|
count (int): Example: 123.
|
||||||
results (list['UserTransaction']):
|
results (list['Account']):
|
||||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&limit=100.
|
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&limit=100.
|
||||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&limit=100.
|
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&limit=100.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
count: int
|
count: int
|
||||||
results: list["UserTransaction"]
|
results: list["Account"]
|
||||||
next_: Union[None, Unset, str] = UNSET
|
next_: Union[None, Unset, str] = UNSET
|
||||||
previous: Union[None, Unset, str] = UNSET
|
previous: Union[None, Unset, str] = UNSET
|
||||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||||
|
|
@ -66,7 +66,7 @@ class PaginatedUserTransactionList:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||||
from ..models.user_transaction import UserTransaction
|
from ..models.account import Account
|
||||||
|
|
||||||
d = dict(src_dict)
|
d = dict(src_dict)
|
||||||
count = d.pop("count")
|
count = d.pop("count")
|
||||||
|
|
@ -74,7 +74,7 @@ class PaginatedUserTransactionList:
|
||||||
results = []
|
results = []
|
||||||
_results = d.pop("results")
|
_results = d.pop("results")
|
||||||
for results_item_data in _results:
|
for results_item_data in _results:
|
||||||
results_item = UserTransaction.from_dict(results_item_data)
|
results_item = Account.from_dict(results_item_data)
|
||||||
|
|
||||||
results.append(results_item)
|
results.append(results_item)
|
||||||
|
|
||||||
|
|
@ -96,15 +96,15 @@ class PaginatedUserTransactionList:
|
||||||
|
|
||||||
previous = _parse_previous(d.pop("previous", UNSET))
|
previous = _parse_previous(d.pop("previous", UNSET))
|
||||||
|
|
||||||
paginated_user_transaction_list = cls(
|
paginated_account_list = cls(
|
||||||
count=count,
|
count=count,
|
||||||
results=results,
|
results=results,
|
||||||
next_=next_,
|
next_=next_,
|
||||||
previous=previous,
|
previous=previous,
|
||||||
)
|
)
|
||||||
|
|
||||||
paginated_user_transaction_list.additional_properties = d
|
paginated_account_list.additional_properties = d
|
||||||
return paginated_user_transaction_list
|
return paginated_account_list
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> list[str]:
|
def additional_keys(self) -> list[str]:
|
||||||
|
|
@ -7,24 +7,24 @@ from attrs import field as _attrs_field
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ..models.application_transaction import ApplicationTransaction
|
from ..models.transaction import Transaction
|
||||||
|
|
||||||
|
|
||||||
T = TypeVar("T", bound="PaginatedApplicationTransactionList")
|
T = TypeVar("T", bound="PaginatedTransactionList")
|
||||||
|
|
||||||
|
|
||||||
@_attrs_define
|
@_attrs_define
|
||||||
class PaginatedApplicationTransactionList:
|
class PaginatedTransactionList:
|
||||||
"""
|
"""
|
||||||
Attributes:
|
Attributes:
|
||||||
count (int): Example: 123.
|
count (int): Example: 123.
|
||||||
results (list['ApplicationTransaction']):
|
results (list['Transaction']):
|
||||||
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&limit=100.
|
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&limit=100.
|
||||||
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&limit=100.
|
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&limit=100.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
count: int
|
count: int
|
||||||
results: list["ApplicationTransaction"]
|
results: list["Transaction"]
|
||||||
next_: Union[None, Unset, str] = UNSET
|
next_: Union[None, Unset, str] = UNSET
|
||||||
previous: Union[None, Unset, str] = UNSET
|
previous: Union[None, Unset, str] = UNSET
|
||||||
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||||
|
|
@ -66,7 +66,7 @@ class PaginatedApplicationTransactionList:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
||||||
from ..models.application_transaction import ApplicationTransaction
|
from ..models.transaction import Transaction
|
||||||
|
|
||||||
d = dict(src_dict)
|
d = dict(src_dict)
|
||||||
count = d.pop("count")
|
count = d.pop("count")
|
||||||
|
|
@ -74,7 +74,7 @@ class PaginatedApplicationTransactionList:
|
||||||
results = []
|
results = []
|
||||||
_results = d.pop("results")
|
_results = d.pop("results")
|
||||||
for results_item_data in _results:
|
for results_item_data in _results:
|
||||||
results_item = ApplicationTransaction.from_dict(results_item_data)
|
results_item = Transaction.from_dict(results_item_data)
|
||||||
|
|
||||||
results.append(results_item)
|
results.append(results_item)
|
||||||
|
|
||||||
|
|
@ -96,15 +96,15 @@ class PaginatedApplicationTransactionList:
|
||||||
|
|
||||||
previous = _parse_previous(d.pop("previous", UNSET))
|
previous = _parse_previous(d.pop("previous", UNSET))
|
||||||
|
|
||||||
paginated_application_transaction_list = cls(
|
paginated_transaction_list = cls(
|
||||||
count=count,
|
count=count,
|
||||||
results=results,
|
results=results,
|
||||||
next_=next_,
|
next_=next_,
|
||||||
previous=previous,
|
previous=previous,
|
||||||
)
|
)
|
||||||
|
|
||||||
paginated_application_transaction_list.additional_properties = d
|
paginated_transaction_list.additional_properties = d
|
||||||
return paginated_application_transaction_list
|
return paginated_transaction_list
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> list[str]:
|
def additional_keys(self) -> list[str]:
|
||||||
|
|
@ -10,18 +10,20 @@ from dateutil.parser import isoparse
|
||||||
from ..models.state_enum import StateEnum
|
from ..models.state_enum import StateEnum
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
T = TypeVar("T", bound="UserTransaction")
|
T = TypeVar("T", bound="Transaction")
|
||||||
|
|
||||||
|
|
||||||
@_attrs_define
|
@_attrs_define
|
||||||
class UserTransaction:
|
class Transaction:
|
||||||
"""
|
"""
|
||||||
Attributes:
|
Attributes:
|
||||||
uuid (UUID):
|
uuid (UUID):
|
||||||
payer_id (str):
|
payer (str):
|
||||||
payer_type (str):
|
payer_type (str):
|
||||||
payee_id (UUID):
|
payer_wallet (str):
|
||||||
payee_type (UUID):
|
payee (UUID):
|
||||||
|
payee_type (int):
|
||||||
|
payee_wallet (str):
|
||||||
created_at (datetime.datetime):
|
created_at (datetime.datetime):
|
||||||
state (StateEnum): * `1` - created
|
state (StateEnum): * `1` - created
|
||||||
* `2` - delayed
|
* `2` - delayed
|
||||||
|
|
@ -38,10 +40,12 @@ class UserTransaction:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
uuid: UUID
|
uuid: UUID
|
||||||
payer_id: str
|
payer: str
|
||||||
payer_type: str
|
payer_type: str
|
||||||
payee_id: UUID
|
payer_wallet: str
|
||||||
payee_type: UUID
|
payee: UUID
|
||||||
|
payee_type: int
|
||||||
|
payee_wallet: str
|
||||||
created_at: datetime.datetime
|
created_at: datetime.datetime
|
||||||
state: StateEnum
|
state: StateEnum
|
||||||
amount: int
|
amount: int
|
||||||
|
|
@ -54,13 +58,17 @@ class UserTransaction:
|
||||||
def to_dict(self) -> dict[str, Any]:
|
def to_dict(self) -> dict[str, Any]:
|
||||||
uuid = str(self.uuid)
|
uuid = str(self.uuid)
|
||||||
|
|
||||||
payer_id = self.payer_id
|
payer = self.payer
|
||||||
|
|
||||||
payer_type = self.payer_type
|
payer_type = self.payer_type
|
||||||
|
|
||||||
payee_id = str(self.payee_id)
|
payer_wallet = self.payer_wallet
|
||||||
|
|
||||||
payee_type = str(self.payee_type)
|
payee = str(self.payee)
|
||||||
|
|
||||||
|
payee_type = self.payee_type
|
||||||
|
|
||||||
|
payee_wallet = self.payee_wallet
|
||||||
|
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
|
|
||||||
|
|
@ -81,10 +89,12 @@ class UserTransaction:
|
||||||
field_dict.update(
|
field_dict.update(
|
||||||
{
|
{
|
||||||
"uuid": uuid,
|
"uuid": uuid,
|
||||||
"payer_id": payer_id,
|
"payer": payer,
|
||||||
"payer_type": payer_type,
|
"payer_type": payer_type,
|
||||||
"payee_id": payee_id,
|
"payer_wallet": payer_wallet,
|
||||||
|
"payee": payee,
|
||||||
"payee_type": payee_type,
|
"payee_type": payee_type,
|
||||||
|
"payee_wallet": payee_wallet,
|
||||||
"created_at": created_at,
|
"created_at": created_at,
|
||||||
"state": state,
|
"state": state,
|
||||||
"amount": amount,
|
"amount": amount,
|
||||||
|
|
@ -103,13 +113,17 @@ class UserTransaction:
|
||||||
d = dict(src_dict)
|
d = dict(src_dict)
|
||||||
uuid = UUID(d.pop("uuid"))
|
uuid = UUID(d.pop("uuid"))
|
||||||
|
|
||||||
payer_id = d.pop("payer_id")
|
payer = d.pop("payer")
|
||||||
|
|
||||||
payer_type = d.pop("payer_type")
|
payer_type = d.pop("payer_type")
|
||||||
|
|
||||||
payee_id = UUID(d.pop("payee_id"))
|
payer_wallet = d.pop("payer_wallet")
|
||||||
|
|
||||||
payee_type = UUID(d.pop("payee_type"))
|
payee = UUID(d.pop("payee"))
|
||||||
|
|
||||||
|
payee_type = d.pop("payee_type")
|
||||||
|
|
||||||
|
payee_wallet = d.pop("payee_wallet")
|
||||||
|
|
||||||
created_at = isoparse(d.pop("created_at"))
|
created_at = isoparse(d.pop("created_at"))
|
||||||
|
|
||||||
|
|
@ -125,12 +139,14 @@ class UserTransaction:
|
||||||
|
|
||||||
delay = d.pop("delay", UNSET)
|
delay = d.pop("delay", UNSET)
|
||||||
|
|
||||||
user_transaction = cls(
|
transaction = cls(
|
||||||
uuid=uuid,
|
uuid=uuid,
|
||||||
payer_id=payer_id,
|
payer=payer,
|
||||||
payer_type=payer_type,
|
payer_type=payer_type,
|
||||||
payee_id=payee_id,
|
payer_wallet=payer_wallet,
|
||||||
|
payee=payee,
|
||||||
payee_type=payee_type,
|
payee_type=payee_type,
|
||||||
|
payee_wallet=payee_wallet,
|
||||||
created_at=created_at,
|
created_at=created_at,
|
||||||
state=state,
|
state=state,
|
||||||
amount=amount,
|
amount=amount,
|
||||||
|
|
@ -140,8 +156,8 @@ class UserTransaction:
|
||||||
delay=delay,
|
delay=delay,
|
||||||
)
|
)
|
||||||
|
|
||||||
user_transaction.additional_properties = d
|
transaction.additional_properties = d
|
||||||
return user_transaction
|
return transaction
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> list[str]:
|
def additional_keys(self) -> list[str]:
|
||||||
Loading…
Add table
Reference in a new issue