belvo.resources.owners
1from typing import Dict, List, Union 2 3from belvo.resources.base import Resource 4 5 6class Owners(Resource): 7 endpoint = "/api/owners/" 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 owners for a Link 19 20 Retrieve owner information for a specific link. 21 22 Example: 23 24 ```python 25 # Fetch owners for a Link 26 owners = client.Owners.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c") 27 28 # Fetch owners for a Link with and timeout after 15 seconds 29 owners = client.Owners.create( 30 "b91835f5-6f83-4d9b-a0ad-a5a249f18b7c", 31 timeout=15 32 ) 33 34 ``` 35 36 Args: 37 link (str): The `link.id` that you want to get information for (UUID). 38 token (str, optional): The MFA token generated by the bank in order to access the institution. Defaults to None. 39 save_data (bool, optional): Indicates whether or not to persist the data in Belvo. Defaults to `True`. 40 raise_exception (bool, optional): Indicates whether to raise an exception or return the API error. Defaults to `False`. 41 42 Returns: 43 Dict: The details of the object. For more information on the response from the API, see our [Owners API documentation](https://developers.belvo.com/reference/retrieveowners). 44 """ 45 46 data = {"link": link, "save_data": save_data} 47 48 if token: 49 data.update(token=token) 50 51 return self.session.post( 52 self.endpoint, data=data, raise_exception=raise_exception, **kwargs 53 )
7class Owners(Resource): 8 endpoint = "/api/owners/" 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 owners for a Link 20 21 Retrieve owner information for a specific link. 22 23 Example: 24 25 ```python 26 # Fetch owners for a Link 27 owners = client.Owners.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c") 28 29 # Fetch owners for a Link with and timeout after 15 seconds 30 owners = client.Owners.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 Dict: The details of the object. For more information on the response from the API, see our [Owners API documentation](https://developers.belvo.com/reference/retrieveowners). 45 """ 46 47 data = {"link": link, "save_data": save_data} 48 49 if token: 50 data.update(token=token) 51 52 return self.session.post( 53 self.endpoint, data=data, raise_exception=raise_exception, **kwargs 54 )
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 owners for a Link 20 21 Retrieve owner information for a specific link. 22 23 Example: 24 25 ```python 26 # Fetch owners for a Link 27 owners = client.Owners.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c") 28 29 # Fetch owners for a Link with and timeout after 15 seconds 30 owners = client.Owners.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 Dict: The details of the object. For more information on the response from the API, see our [Owners API documentation](https://developers.belvo.com/reference/retrieveowners). 45 """ 46 47 data = {"link": link, "save_data": save_data} 48 49 if token: 50 data.update(token=token) 51 52 return self.session.post( 53 self.endpoint, data=data, raise_exception=raise_exception, **kwargs 54 )
Retrieve owners for a Link
Retrieve owner information for a specific link.
Example:
```python
Fetch owners for a Link
owners = client.Owners.create("b91835f5-6f83-4d9b-a0ad-a5a249f18b7c")
Fetch owners for a Link with and timeout after 15 seconds
owners = client.Owners.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:
Dict: The details of the object. For more information on the response from the API, see our Owners API documentation.