Skip to content

When create a CFDI the sdk doesn't return the ID (SOLVED) #1

@xtornasol512

Description

@xtornasol512

facturama.version = '2.0.3'
Endpoint = facturama.Cfdi.create
Payload = el mismo de su documentación
Cuando crean la factura esta se emite, pero la respuesta no tienen los datos del CFDi, inclusive el unico necesario es el ID pero no viene con la respuesta. Dejo el debug

import facturama
facturama.sandbox = True
payload = {
   #el mismo que la documentación
}
new_cfdi = facturama.Cfdi.create(payload.copy())

# Empiezo a tratar de ver el ID de la factura generada

print new_cfdi
> facturama.Cfdi

print cfdi.status
> True

print cfdi.__dict__
> {'status': True, '__module__': 'facturama', '_headers': {'content-type': 'application/json', 'Authorization': u'Basic amVzdXNwcmVz...'}, 'send_by_email': <classmethod 
object at 0x7f6ed61f7cc8>, 'create': <classmethod object at 0x7f6ed61f7be8>, 'list': <classmethod object at 0x7f6ed61f7d38>, 'saveAsPdf': <classmethod object at 0x7f6ed61f7c58>, 'get_by_fi
le': <classmethod object at 0x7f6ed61f7c20>, 'delete': <classmethod object at 0x7f6ed61f7d00>, '__doc__': '\n    Opr with Cfdi of Facturama API\n    ', 'saveAsHtml': <classmethod object at
 0x7f6ed61f7c90>}

Todos esos objetos son los mismos que tiene facturama.Cfdi
No tiene los atributos del cfdi, y por ende no localize el Id de la factura. Podrian ayudarme a saber como conseguirla, en su documentación no esta claro esto

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions