|
@@ -101,7 +101,8 @@ class Anafoauth(object):
|
|
|
class Efactoauth(Anafoauth):
|
|
|
|
|
|
OAUTH = 'https://api.anaf.ro/TestOauth/jaxrs/hello?name="works with python"'
|
|
|
- MESSAGES = 'https://api.anaf.ro/{}/FCTEL/rest/listaMesajeFactura?zile={}&cif={}'
|
|
|
+ MESSAGES = 'https://api.anaf.ro/{}/FCTEL/rest/listaMesajeFactura?zile={}&cif={}&filtru={}'
|
|
|
+ LISTBYTIME = 'https://api.anaf.ro/{}/FCTEL/rest/listaMesajePaginatieFactura?startTime={}&endTime={}&cif={}&pagina={}'
|
|
|
VERIFY = 'https://api.anaf.ro/{}/FCTEL/rest/stareMesaj?id_incarcare={}'
|
|
|
ADD = 'https://api.anaf.ro/{}/FCTEL/rest/upload?standard={}&cif={}'
|
|
|
DOWNLOAD = 'https://api.anaf.ro/{}/FCTEL/rest/descarcare?id={}'
|
|
@@ -174,8 +175,12 @@ class Efactoauth(Anafoauth):
|
|
|
# app_icon=app_icon,
|
|
|
timeout=3)
|
|
|
|
|
|
- def get_all_messages(self, vat_id, days=60, env='test', root_path='efact', extract=False) -> dict:
|
|
|
- url = self.MESSAGES.format(env, days, vat_id)
|
|
|
+ def get_all_messages(self, vat_id, days=60, env='test', filter_=None, root_path='efact', extract=False) -> dict:
|
|
|
+ if filter_:
|
|
|
+ url = self.MESSAGES.format(env, days, vat_id, filter_)
|
|
|
+ else:
|
|
|
+ self.MESSAGES = 'https://api.anaf.ro/{}/FCTEL/rest/listaMesajeFactura?zile={}&cif={}'
|
|
|
+ url = self.MESSAGES.format(env, days, vat_id)
|
|
|
resp = self.oauth.get(url=url)
|
|
|
# print(resp.text)
|
|
|
try:
|