inttegro.resources.balances

Generated public typing surface. Do not edit by hand.

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

Balances(http: inttegro.http_client.HttpClient)
17    def __init__(self, http: HttpClient):
18        """Bind the balance operations to the client's shared HTTP transport."""
19        self.http = http

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

http
def get(self) -> inttegro.balance.Balance:
21    def get(self):
22        """Return the latest balance snapshot for the authenticated application.
23
24        API endpoint: ``/balances``.
25
26        Returns:
27            ``Balance`` decoded from the documented response shape.
28
29        Raises:
30            APIError: The API rejected the request or could not complete it.
31            NetworkError: The request could not reach the Inttegro API.
32            TimeoutError: The configured request deadline elapsed.
33        """
34        return 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.