It provides a FACe interface to simplify the interaction with the FACe's WS
Just install it using pip:
$ pip install FACe_lib
Initialize the face interface passing the desired PEM certificate and an email to receive notifications from FACe servers:
from face.face import FACe
our_certificate = 'path_to/cert.pem'
face = FACe(certificate=our_certificate, email='[email protected]')
Call the requested service (see all available methods), ie:
result = face.nifs.list()
result = face.invoices.fetch(invoice="213091309123")
print (result.errors)
print (result.data)
result = face.invoices.send_by_filename(invoice="an_invoice.xsig")
print (result.errors)
print (result.data)
result = face.invoices.send_by_filename("Facturae.xsig", b64content)
print (result.errors)
print (result.data)
result = face.invoices.send(invoice="213091309123", reason="Mistake at generation process")
print (result.errors)
print (result.data)
result = face.invoices.list_states(invoice="213091309123")
print (result.errors)
print (result.data)
result = face.administrations.list()
print (result.errors)
print (result.data)
result = face.nifs.list()
print (result.errors)
print (result.data)