Class: Ticketbai::Nodes::InvoiceChaining
- Inherits:
-
Object
- Object
- Ticketbai::Nodes::InvoiceChaining
- Defined in:
- lib/ticketbai/nodes/invoice_chaining.rb
Instance Method Summary collapse
- #build_xml(node) ⇒ Object
-
#initialize(args = {}) ⇒ InvoiceChaining
constructor
A new instance of InvoiceChaining.
Constructor Details
#initialize(args = {}) ⇒ InvoiceChaining
Returns a new instance of InvoiceChaining.
4 5 6 7 8 9 |
# File 'lib/ticketbai/nodes/invoice_chaining.rb', line 4 def initialize(args = {}) @prev_invoice_serial = args[:prev_invoice_serial] @prev_invoice_number = args[:prev_invoice_number] @prev_invoice_date = args[:prev_invoice_date] @prev_invoice_signature = args[:prev_invoice_signature] end |
Instance Method Details
#build_xml(node) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/ticketbai/nodes/invoice_chaining.rb', line 11 def build_xml(node) node = Nokogiri::XML::Builder.new if node.nil? node.EncadenamientoFacturaAnterior do |xml| xml.SerieFacturaAnterior @prev_invoice_serial if @prev_invoice_serial xml.NumFacturaAnterior @prev_invoice_number xml.FechaExpedicionFacturaAnterior @prev_invoice_date xml.SignatureValueFirmaFacturaAnterior @prev_invoice_signature end end |