Client¶
Vat register client module.
-
class
vater.client.
Client
(base_url)¶ Bases:
object
Vat 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 checkaccount (
str
) – account number of the subject to checkdate (
Optional
[date
]) – date data is acquired fromraw (
bool
) – flag indicating if raw json from the server is returned or python object representation
- Return type
Tuple
[bool
,str
]
-
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 checkaccount (
str
) – account number of the subject to checkdate (
Optional
[date
]) – date data is acquired fromraw (
bool
) – flag indicating if raw json from the server is returned or python object representation
- Return type
Tuple
[bool
,str
]
-
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 fetchdate (
Optional
[date
]) – date data is acquired fromraw (
bool
) – flag indicating if raw json from the server is returned or python object representation
- Return type
Tuple
[List
[Subject
],str
]
-
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 fetchdate (
Optional
[date
]) – date data is acquired fromraw (
bool
) – flag indicating if raw json from the server is returned or python object representation
- Return type
Tuple
[List
[Subject
],str
]
-
search_nip
(nip, *, date=None, raw=False)¶ Get detailed vat payer information for given nip.
- Parameters
nip (
str
) – nip number of the subject to fetchdate (
Optional
[date
]) – date data is acquired fromraw (
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
-
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 fetchdate (
Optional
[date
]) – date data is acquired fromraw (
bool
) – flag indicating if raw json from the server is returned or python object representation
- Return type
Tuple
[List
[Subject
],str
]
-
search_regon
(regon, *, date=None, raw=False)¶ Get detailed vat payer information for given regon.
- Parameters
regon (
str
) – regon number of the subject to fetchdate (
Optional
[date
]) – date data is acquired fromraw (
bool
) – flag indicating if raw json from the server is returned or python object representation
- Return type
Tuple
[Optional
[Subject
],str
]
-
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 fetchdate (
Optional
[date
]) – date data is acquired fromraw (
bool
) – flag indicating if raw json from the server is returned or python object representation
- Return type
Tuple
[List
[Subject
],str
]