Ruby gem to use SUNAT Electronic Billing from your app
Allow to generate Electronic Billing Documents and send to SUNAT.
First you have to initialize a kind of document that you want, with your desired attributes.
document = SunatInvoice::Invoice.new(invoice_attributes)
Note: Currently we support this kind of documents:
- Invoice for document type `01` and `03`
- CreditNote for document type `07`
- DebitNote for document type `08`
After that, you have to send the document to SUNAT in this way:
for document type 01
and related documents
client = SunatInvoice::InvoiceClient.new
client.dispatch(document)
for document type 03
and related documents, you should send a daily summary
instead each document
daily_document = SunatInvoice::DailySummary.new
client.dispatch(daily_document)