Class: SunatInvoice::VoidedLine

Inherits:
Line show all
Defined in:
lib/sunat_invoice/voided_line.rb

Constant Summary

Constants included from Utils

Utils::COMMON_NAMESPACES, Utils::CREDIT_NOTE_NAMESPACES, Utils::DAILY_SUMMARY_NAMESPACES, Utils::DEBIT_NOTE_NAMESPACES, Utils::INVOICE_NAMESPACES, Utils::SUMMARY_NAMESPACES, Utils::TRADE_NAMESPACES, Utils::VOIDED_NAMESPACES

Instance Attribute Summary collapse

Attributes inherited from Line

#taxes

Instance Method Summary collapse

Methods inherited from Line

#build_taxes_xml

Methods included from Utils

#amount_xml, #ubl_ext

Methods inherited from Model

#initialize, #to_hash

Constructor Details

This class inherits a constructor from SunatInvoice::Model

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



7
8
9
# File 'lib/sunat_invoice/voided_line.rb', line 7

def description
  @description
end

#document_numberObject

Returns the value of attribute document_number.



7
8
9
# File 'lib/sunat_invoice/voided_line.rb', line 7

def document_number
  @document_number
end

#document_serialObject

Returns the value of attribute document_serial.



7
8
9
# File 'lib/sunat_invoice/voided_line.rb', line 7

def document_serial
  @document_serial
end

#document_typeObject

Returns the value of attribute document_type.



7
8
9
# File 'lib/sunat_invoice/voided_line.rb', line 7

def document_type
  @document_type
end

Instance Method Details

#xml(xml, index, _currency) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/sunat_invoice/voided_line.rb', line 10

def xml(xml, index, _currency)
  xml['sac'].VoidedDocumentsLine do
    xml['cbc'].LineID(index + 1)
    xml['cbc'].DocumentTypeCode document_type
    xml['sac'].DocumentSerialID document_serial
    xml['sac'].DocumentNumberID document_number
    xml['sac'].VoidReasonDescription description
  end
end