Class: Facturapi::Helpers::Encabezado
- Inherits:
-
Object
- Object
- Facturapi::Helpers::Encabezado
- Defined in:
- lib/facturapi/helpers/encabezado.rb
Instance Attribute Summary collapse
-
#emisor ⇒ Object
Returns the value of attribute emisor.
-
#id_doc ⇒ Object
Returns the value of attribute id_doc.
-
#receptor ⇒ Object
Returns the value of attribute receptor.
-
#totales ⇒ Object
Returns the value of attribute totales.
Instance Method Summary collapse
- #as_node ⇒ Object
-
#initialize(params = {}) ⇒ Encabezado
constructor
A new instance of Encabezado.
Constructor Details
#initialize(params = {}) ⇒ Encabezado
Returns a new instance of Encabezado.
6 7 8 9 10 11 |
# File 'lib/facturapi/helpers/encabezado.rb', line 6 def initialize(params = {}) @id_doc = params[:id_doc] @emisor = params[:emisor] @receptor = params[:receptor] @totales = params[:totales] || Totales.new end |
Instance Attribute Details
#emisor ⇒ Object
Returns the value of attribute emisor.
4 5 6 |
# File 'lib/facturapi/helpers/encabezado.rb', line 4 def emisor @emisor end |
#id_doc ⇒ Object
Returns the value of attribute id_doc.
4 5 6 |
# File 'lib/facturapi/helpers/encabezado.rb', line 4 def id_doc @id_doc end |
#receptor ⇒ Object
Returns the value of attribute receptor.
4 5 6 |
# File 'lib/facturapi/helpers/encabezado.rb', line 4 def receptor @receptor end |
#totales ⇒ Object
Returns the value of attribute totales.
4 5 6 |
# File 'lib/facturapi/helpers/encabezado.rb', line 4 def totales @totales end |
Instance Method Details
#as_node ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/facturapi/helpers/encabezado.rb', line 13 def as_node create_node('Encabezado') do |encabezado| encabezado << id_doc.as_node encabezado << emisor.as_node encabezado << receptor.as_node encabezado << totales.as_node end end |