belvo.resources.incomes

 1from typing import Dict, List, Union
 2
 3from belvo.resources.base import Resource
 4
 5
 6class Incomes(Resource):
 7    endpoint = "/api/incomes/"
 8
 9    def create(
10        self,
11        link: str,
12        *,
13        token: str = None,
14        save_data: bool = True,
15        date_from: str = None,
16        date_to: str = None,
17        raise_exception: bool = False,
18        **kwargs: Dict,
19    ) -> Union[List[Dict], Dict]:
20        """Retrieve incomes for a link
21
22        Retrieve income insights for checking and savings accounts from a specific link. You can receive insights for a period of up to 365 days, depending on the transaction history available for each bank.
23
24        Example:
25        ```python
26        # Fetch incomes for a Link
27        incomes = client.Incomes.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")
28
29        # Fetch incomes for a Link with and timeout after 15 seconds
30        incomes = client.Incomes.create(
31            "b91835f5-6f83-4d9b-a0ad-a5a249f18b7c",
32            timeout=15
33        )
34
35        ```
36
37        Args:
38            link (str): The `link.id` that you want to get information for. (UUID).
39            token (str, optional): The MFA token generated by the bank in order to access the institution. Defaults to None.
40            save_data (bool, optional): Indicates whether or not to persist the data in Belvo. Defaults to `True`.
41            raise_exception (bool, optional): Indicates whether to raise an exception or return the API error. Defaults to `False`.
42
43        Returns:
44            Union[List[Dict], Dict]: For more information on the response from the API, see our [Incomes API documentation](https://developers.belvo.com/reference/retrieveincome).
45        """
46
47        data = {"link": link, "save_data": save_data}
48
49        if date_from:
50            data.update(date_from=date_from)
51        if date_to:
52            data.update(date_to=date_to)
53        if token:
54            data.update(token=token)
55
56        return self.session.post(
57            self.endpoint, data=data, raise_exception=raise_exception, **kwargs
58        )
class Incomes(belvo.resources.base.Resource):
 7class Incomes(Resource):
 8    endpoint = "/api/incomes/"
 9
10    def create(
11        self,
12        link: str,
13        *,
14        token: str = None,
15        save_data: bool = True,
16        date_from: str = None,
17        date_to: str = None,
18        raise_exception: bool = False,
19        **kwargs: Dict,
20    ) -> Union[List[Dict], Dict]:
21        """Retrieve incomes for a link
22
23        Retrieve income insights for checking and savings accounts from a specific link. You can receive insights for a period of up to 365 days, depending on the transaction history available for each bank.
24
25        Example:
26        ```python
27        # Fetch incomes for a Link
28        incomes = client.Incomes.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")
29
30        # Fetch incomes for a Link with and timeout after 15 seconds
31        incomes = client.Incomes.create(
32            "b91835f5-6f83-4d9b-a0ad-a5a249f18b7c",
33            timeout=15
34        )
35
36        ```
37
38        Args:
39            link (str): The `link.id` that you want to get information for. (UUID).
40            token (str, optional): The MFA token generated by the bank in order to access the institution. Defaults to None.
41            save_data (bool, optional): Indicates whether or not to persist the data in Belvo. Defaults to `True`.
42            raise_exception (bool, optional): Indicates whether to raise an exception or return the API error. Defaults to `False`.
43
44        Returns:
45            Union[List[Dict], Dict]: For more information on the response from the API, see our [Incomes API documentation](https://developers.belvo.com/reference/retrieveincome).
46        """
47
48        data = {"link": link, "save_data": save_data}
49
50        if date_from:
51            data.update(date_from=date_from)
52        if date_to:
53            data.update(date_to=date_to)
54        if token:
55            data.update(token=token)
56
57        return self.session.post(
58            self.endpoint, data=data, raise_exception=raise_exception, **kwargs
59        )
endpoint = '/api/incomes/'
def create( self, link: str, *, token: str = None, save_data: bool = True, date_from: str = None, date_to: str = None, raise_exception: bool = False, **kwargs: Dict) -> Union[List[Dict], Dict]:
10    def create(
11        self,
12        link: str,
13        *,
14        token: str = None,
15        save_data: bool = True,
16        date_from: str = None,
17        date_to: str = None,
18        raise_exception: bool = False,
19        **kwargs: Dict,
20    ) -> Union[List[Dict], Dict]:
21        """Retrieve incomes for a link
22
23        Retrieve income insights for checking and savings accounts from a specific link. You can receive insights for a period of up to 365 days, depending on the transaction history available for each bank.
24
25        Example:
26        ```python
27        # Fetch incomes for a Link
28        incomes = client.Incomes.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")
29
30        # Fetch incomes for a Link with and timeout after 15 seconds
31        incomes = client.Incomes.create(
32            "b91835f5-6f83-4d9b-a0ad-a5a249f18b7c",
33            timeout=15
34        )
35
36        ```
37
38        Args:
39            link (str): The `link.id` that you want to get information for. (UUID).
40            token (str, optional): The MFA token generated by the bank in order to access the institution. Defaults to None.
41            save_data (bool, optional): Indicates whether or not to persist the data in Belvo. Defaults to `True`.
42            raise_exception (bool, optional): Indicates whether to raise an exception or return the API error. Defaults to `False`.
43
44        Returns:
45            Union[List[Dict], Dict]: For more information on the response from the API, see our [Incomes API documentation](https://developers.belvo.com/reference/retrieveincome).
46        """
47
48        data = {"link": link, "save_data": save_data}
49
50        if date_from:
51            data.update(date_from=date_from)
52        if date_to:
53            data.update(date_to=date_to)
54        if token:
55            data.update(token=token)
56
57        return self.session.post(
58            self.endpoint, data=data, raise_exception=raise_exception, **kwargs
59        )

Retrieve incomes for a link

Retrieve income insights for checking and savings accounts from a specific link. You can receive insights for a period of up to 365 days, depending on the transaction history available for each bank.

Example:

# Fetch incomes for a Link
incomes = client.Incomes.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")

# Fetch incomes for a Link with and timeout after 15 seconds
incomes = client.Incomes.create(
    "b91835f5-6f83-4d9b-a0ad-a5a249f18b7c",
    timeout=15
)
Arguments:
  • link (str): The link.id that you want to get information for. (UUID).
  • token (str, optional): The MFA token generated by the bank in order to access the institution. Defaults to None.
  • save_data (bool, optional): Indicates whether or not to persist the data in Belvo. Defaults to True.
  • raise_exception (bool, optional): Indicates whether to raise an exception or return the API error. Defaults to False.
Returns:

Union[List[Dict], Dict]: For more information on the response from the API, see our Incomes API documentation.