Class: FE::PurchaseInvoice
- Defined in:
- lib/facturacr/purchase_invoice.rb
Constant Summary collapse
- DOCUMENT_TYPE =
"08"
Constants inherited from Document
Document::CONDITIONS, Document::DOCUMENT_SITUATION, Document::DOCUMENT_TYPES, Document::PAYMENT_TYPES
Instance Attribute Summary
Attributes inherited from Document
#condition, #credit_term, #date, #document_situation, #document_type, #economic_activity, #headquarters, #issuer, #items, #key, #namespaces, #number, #other_charges, #others, #payment_type, #receiver, #reference_information, #references, #regulation, #security_code, #serial, #service_type, #summary, #terminal, #version
Instance Method Summary collapse
- #document_tag ⇒ Object
-
#initialize(args = {}) ⇒ PurchaseInvoice
constructor
A new instance of PurchaseInvoice.
Methods inherited from Document
#api_payload, #build_xml, #document_name, #generate, #sequence, #version_42?, #version_43?
Constructor Details
#initialize(args = {}) ⇒ PurchaseInvoice
Returns a new instance of PurchaseInvoice.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/facturacr/purchase_invoice.rb', line 10 def initialize(args={}) @version = args[:version] @economic_activity = args[:economic_activity] @date = args[:date] @issuer = args[:issuer] @receiver = args[:receiver] @items = args[:items] @number = args[:number] @condition = args[:condition] @payment_type = args[:payment_type] || ["01"] @document_type = DOCUMENT_TYPE @credit_term = args[:credit_term] @summary = args[:summary] @security_code = args[:security_code] @document_situation = args[:document_situation] @other_charges = args[:other_charges] @namespaces = { "xmlns:xsi"=>"http://www.w3.org/2001/XMLSchema-instance", "xmlns:xsd"=>"http://www.w3.org/2001/XMLSchema", "xmlns"=>"https://cdn.comprobanteselectronicos.go.cr/xml-schemas/v4.3/facturaElectronicaCompra"#, } @others = args[:others] || [] end |
Instance Method Details
#document_tag ⇒ Object
34 35 36 |
# File 'lib/facturacr/purchase_invoice.rb', line 34 def document_tag "FacturaElectronicaCompra" end |