Client¶
Vat register client module.
-
class
vater.client.Client(base_url)¶ Bases:
objectVat register client class.
Currently the API limits maximum number of requested subjects to 30, therefore if that number is exceeded MaximumParameterNumberExceeded is raised.
Set root API url.
Parameters: base_url ( str) – root url of the API-
check_nip(nip, account, *, date=None, raw=False)¶ Check if given account is assigned to the subject with given nip.
Parameters: - nip (
str) – nip number of the subject to check - account (
str) – account number of the subject to check - date (
Optional[date]) – date data is acquired from - raw (
bool) – flag indicating if raw json from the server is returned or python object representation
Return type: Tuple[bool,str]- nip (
-
check_regon(regon, account, *, date=None, raw=False)¶ Check if given account is assigned to the subject with given regon.
Parameters: - regon (
str) – regon number of the subject to check - account (
str) – account number of the subject to check - date (
Optional[date]) – date data is acquired from - raw (
bool) – flag indicating if raw json from the server is returned or python object representation
Return type: Tuple[bool,str]- regon (
-
search_account(account, *, date=None, raw=False)¶ Get detailed vat payer information for given bank account.
Parameters: - account (
str) – account number of the subject to fetch - date (
Optional[date]) – date data is acquired from - raw (
bool) – flag indicating if raw json from the server is returned or python object representation
Return type: Tuple[List[Subject],str]- account (
-
search_accounts(accounts, *, date=None, raw=False)¶ Get a list of detailed vat payers information.
Parameters: - accounts (
Iterable[str]) – account numbers of the subjects to fetch - date (
Optional[date]) – date data is acquired from - raw (
bool) – flag indicating if raw json from the server is returned or python object representation
Return type: Tuple[List[Subject],str]- accounts (
-
search_nip(nip, *, date=None, raw=False)¶ Get detailed vat payer information for given nip.
Parameters: - nip (
str) – nip number of the subject to fetch - date (
Optional[date]) – date data is acquired from - raw (
bool) – flag indicating if raw json from the server is returned or python object representation
Return type: Tuple[Optional[Subject],str]Returns: subject and request id
- nip (
-
search_nips(nips, *, date=None, raw=False)¶ Get a list of detailed vat payers information.
Parameters: - nips (
Iterable[str]) – nip numbers of the subjects to fetch - date (
Optional[date]) – date data is acquired from - raw (
bool) – flag indicating if raw json from the server is returned or python object representation
Return type: Tuple[List[Subject],str]- nips (
-
search_regon(regon, *, date=None, raw=False)¶ Get detailed vat payer information for given regon.
Parameters: - regon (
str) – regon number of the subject to fetch - date (
Optional[date]) – date data is acquired from - raw (
bool) – flag indicating if raw json from the server is returned or python object representation
Return type: Tuple[Optional[Subject],str]- regon (
-
search_regons(regons, *, date=None, raw=False)¶ Get a list of detailed vat payers information.
Parameters: - regons (
Iterable[str]) – regon numbers of the subjects to fetch - date (
Optional[date]) – date data is acquired from - raw (
bool) – flag indicating if raw json from the server is returned or python object representation
Return type: Tuple[List[Subject],str]- regons (
-