inttegro.async_resources.balances

Generated public typing surface. Do not edit by hand.

 1# Generated by scripts/generate_async_resources.py; do not edit by hand.
 2"""Balance operations for the authenticated Inttegro application."""
 3from __future__ import annotations
 4from ..async_http_client import AsyncHttpClient
 5
 6class AsyncBalances:
 7    """Read the application's current GHS balance snapshot.
 8
 9    The returned :class:`inttegro.balance.Balance` has a statically typed
10    ``ghs`` member. Amounts use integer minor units and snapshot timestamps are
11    decoded as timezone-aware :class:`datetime.datetime` values.
12    """
13
14    def __init__(self, http: AsyncHttpClient):
15        """Bind the balance operations to the client's shared HTTP transport."""
16        self.http = http
17
18    async def get(self):
19        """Return the latest balance snapshot for the authenticated application.
20
21        API endpoint: ``/balances``.
22
23        Returns:
24            ``Balance`` decoded from the documented response shape.
25
26        Raises:
27            APIError: The API rejected the request or could not complete it.
28            NetworkError: The request could not reach the Inttegro API.
29            TimeoutError: The configured request deadline elapsed.
30        """
31        return await self.http.post('/balances', {})
class AsyncBalances:
 7class AsyncBalances:
 8    """Read the application's current GHS balance snapshot.
 9
10    The returned :class:`inttegro.balance.Balance` has a statically typed
11    ``ghs`` member. Amounts use integer minor units and snapshot timestamps are
12    decoded as timezone-aware :class:`datetime.datetime` values.
13    """
14
15    def __init__(self, http: AsyncHttpClient):
16        """Bind the balance operations to the client's shared HTTP transport."""
17        self.http = http
18
19    async def get(self):
20        """Return the latest balance snapshot for the authenticated application.
21
22        API endpoint: ``/balances``.
23
24        Returns:
25            ``Balance`` decoded from the documented response shape.
26
27        Raises:
28            APIError: The API rejected the request or could not complete it.
29            NetworkError: The request could not reach the Inttegro API.
30            TimeoutError: The configured request deadline elapsed.
31        """
32        return await self.http.post('/balances', {})

Read the application's current GHS balance snapshot.

The returned inttegro.balance.Balance has a statically typed ghs member. Amounts use integer minor units and snapshot timestamps are decoded as timezone-aware datetime.datetime values.

AsyncBalances(http: inttegro.async_http_client.AsyncHttpClient)
15    def __init__(self, http: AsyncHttpClient):
16        """Bind the balance operations to the client's shared HTTP transport."""
17        self.http = http

Bind the balance operations to the client's shared HTTP transport.

http
async def get(self) -> inttegro.balance.Balance:
19    async def get(self):
20        """Return the latest balance snapshot for the authenticated application.
21
22        API endpoint: ``/balances``.
23
24        Returns:
25            ``Balance`` decoded from the documented response shape.
26
27        Raises:
28            APIError: The API rejected the request or could not complete it.
29            NetworkError: The request could not reach the Inttegro API.
30            TimeoutError: The configured request deadline elapsed.
31        """
32        return await self.http.post('/balances', {})

Return the latest balance snapshot for the authenticated application.

API endpoint: /balances.

Returns:

Balance decoded from the documented response shape.

Raises:
  • APIError: The API rejected the request or could not complete it.
  • NetworkError: The request could not reach the Inttegro API.
  • TimeoutError: The configured request deadline elapsed.