Skip to content

Common API Resources

Here are the common resources used by the Revolut Business API.


ModelBaseAmount

Bases: BaseModel

Base model for amount

Source code in pyrevolut/api/common/models/amount.py
 7
 8
 9
10
11
12
13
14
class ModelBaseAmount(BaseModel):
    """Base model for amount"""

    amount: Annotated[float, Field(description="The value.")]
    currency: Annotated[
        Currency,
        Field(description="The currency, provided as a 3-letter ISO 4217 code."),
    ]

BaseEndpointSync

Base class for all endpoints.

Source code in pyrevolut/api/common/endpoint.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
class BaseEndpointSync:
    """Base class for all endpoints."""

    def __init__(self, client: "Client"):
        """Create a new Base endpoint handler

        Parameters
        ----------
        client : Client
            The client to use for the endpoint
        """
        self.client = client

__init__(client)

Create a new Base endpoint handler

Parameters:

Name Type Description Default
client Client

The client to use for the endpoint

required
Source code in pyrevolut/api/common/endpoint.py
10
11
12
13
14
15
16
17
18
def __init__(self, client: "Client"):
    """Create a new Base endpoint handler

    Parameters
    ----------
    client : Client
        The client to use for the endpoint
    """
    self.client = client

BaseEndpointAsync

Base class for all async endpoints.

Source code in pyrevolut/api/common/endpoint.py
21
22
23
24
25
26
27
28
29
30
31
32
class BaseEndpointAsync:
    """Base  class for all async endpoints."""

    def __init__(self, client: "AsyncClient"):
        """Create a new Base endpoint handler

        Parameters
        ----------
        client : AsyncClient
            The async client to use for the endpoint
        """
        self.client = client

__init__(client)

Create a new Base endpoint handler

Parameters:

Name Type Description Default
client AsyncClient

The async client to use for the endpoint

required
Source code in pyrevolut/api/common/endpoint.py
24
25
26
27
28
29
30
31
32
def __init__(self, client: "AsyncClient"):
    """Create a new Base endpoint handler

    Parameters
    ----------
    client : AsyncClient
        The async client to use for the endpoint
    """
    self.client = client