Skip to content

ccarruitero/sunat_invoice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sunat Invoice

Ruby gem to use SUNAT Electronic Billing from your app

Allow to generate Electronic Billing Documents and send to SUNAT.

Usage

generate document

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`

send document

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)

parse response

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published