belvo.resources.accounts

 1from typing import Dict, List, Union
 2
 3from belvo.resources.base import Resource
 4
 5
 6class Accounts(Resource):
 7    endpoint = "/api/accounts/"
 8
 9    def create(
10        self,
11        link: str,
12        *,
13        token: str = None,
14        save_data: bool = True,
15        raise_exception: bool = False,
16        **kwargs: Dict,
17    ) -> Union[List[Dict], Dict]:
18        """Retrieve accounts for a given link
19
20        To fetch accounts you will make use of the .create() method and will retrieve all account data available from the banking or gig institution.
21
22        If the account already exists in our records, only its balance and collected_at will be updated.
23
24        > For more information detailed information regarding the Accounts resource, check our [Accounts DevPortal documentation](https://developers.belvo.com/reference/accounts-1).
25
26        Example:
27
28            ```python
29            # Fetch accounts for a Link
30            accounts = client.Accounts.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")
31            ```
32
33        Args:
34            link (str): The `link.id` that you want to get information for (UUID).
35            token (str, optional): The MFA token generated by the bank in order to access the institution. Defaults to None.
36            save_data (bool, optional): Indicates whether or not to persist the data in Belvo. Defaults to `True`.
37            raise_exception (bool, optional): Indicates whether to raise an exception or return the API error. Defaults to `False`.
38
39        Returns:
40            Dict: The details of the object. For more information on the response from the API, see our [Accounts API documentation](https://developers.belvo.com/reference/retrieveaccounts).
41        """
42
43        data = {"link": link, "save_data": save_data}
44
45        if token:
46            data.update(token=token)
47
48        return self.session.post(
49            self.endpoint, data=data, raise_exception=raise_exception, **kwargs
50        )
class Accounts(belvo.resources.base.Resource):
 7class Accounts(Resource):
 8    endpoint = "/api/accounts/"
 9
10    def create(
11        self,
12        link: str,
13        *,
14        token: str = None,
15        save_data: bool = True,
16        raise_exception: bool = False,
17        **kwargs: Dict,
18    ) -> Union[List[Dict], Dict]:
19        """Retrieve accounts for a given link
20
21        To fetch accounts you will make use of the .create() method and will retrieve all account data available from the banking or gig institution.
22
23        If the account already exists in our records, only its balance and collected_at will be updated.
24
25        > For more information detailed information regarding the Accounts resource, check our [Accounts DevPortal documentation](https://developers.belvo.com/reference/accounts-1).
26
27        Example:
28
29            ```python
30            # Fetch accounts for a Link
31            accounts = client.Accounts.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")
32            ```
33
34        Args:
35            link (str): The `link.id` that you want to get information for (UUID).
36            token (str, optional): The MFA token generated by the bank in order to access the institution. Defaults to None.
37            save_data (bool, optional): Indicates whether or not to persist the data in Belvo. Defaults to `True`.
38            raise_exception (bool, optional): Indicates whether to raise an exception or return the API error. Defaults to `False`.
39
40        Returns:
41            Dict: The details of the object. For more information on the response from the API, see our [Accounts API documentation](https://developers.belvo.com/reference/retrieveaccounts).
42        """
43
44        data = {"link": link, "save_data": save_data}
45
46        if token:
47            data.update(token=token)
48
49        return self.session.post(
50            self.endpoint, data=data, raise_exception=raise_exception, **kwargs
51        )
endpoint = '/api/accounts/'
def create( self, link: str, *, token: str = None, save_data: bool = True, 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        raise_exception: bool = False,
17        **kwargs: Dict,
18    ) -> Union[List[Dict], Dict]:
19        """Retrieve accounts for a given link
20
21        To fetch accounts you will make use of the .create() method and will retrieve all account data available from the banking or gig institution.
22
23        If the account already exists in our records, only its balance and collected_at will be updated.
24
25        > For more information detailed information regarding the Accounts resource, check our [Accounts DevPortal documentation](https://developers.belvo.com/reference/accounts-1).
26
27        Example:
28
29            ```python
30            # Fetch accounts for a Link
31            accounts = client.Accounts.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")
32            ```
33
34        Args:
35            link (str): The `link.id` that you want to get information for (UUID).
36            token (str, optional): The MFA token generated by the bank in order to access the institution. Defaults to None.
37            save_data (bool, optional): Indicates whether or not to persist the data in Belvo. Defaults to `True`.
38            raise_exception (bool, optional): Indicates whether to raise an exception or return the API error. Defaults to `False`.
39
40        Returns:
41            Dict: The details of the object. For more information on the response from the API, see our [Accounts API documentation](https://developers.belvo.com/reference/retrieveaccounts).
42        """
43
44        data = {"link": link, "save_data": save_data}
45
46        if token:
47            data.update(token=token)
48
49        return self.session.post(
50            self.endpoint, data=data, raise_exception=raise_exception, **kwargs
51        )

Retrieve accounts for a given link

To fetch accounts you will make use of the .create() method and will retrieve all account data available from the banking or gig institution.

If the account already exists in our records, only its balance and collected_at will be updated.

For more information detailed information regarding the Accounts resource, check our Accounts DevPortal documentation.

Example:
# Fetch accounts for a Link
accounts = client.Accounts.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")
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:

Dict: The details of the object. For more information on the response from the API, see our Accounts API documentation.