Class: Ticketbai::Nodes::LroeHeader
- Inherits:
-
Object
- Object
- Ticketbai::Nodes::LroeHeader
- Defined in:
- lib/ticketbai/nodes/lroe_header.rb
Instance Method Summary collapse
- #build_xml(node) ⇒ Object
-
#initialize(args = {}) ⇒ LroeHeader
constructor
A new instance of LroeHeader.
Constructor Details
#initialize(args = {}) ⇒ LroeHeader
Returns a new instance of LroeHeader.
4 5 6 7 8 9 10 |
# File 'lib/ticketbai/nodes/lroe_header.rb', line 4 def initialize(args = {}) @year = args[:year] @nif = args[:nif] @company_name = args[:company_name] @operation = args[:operation] @subchapter = args[:subchapter] end |
Instance Method Details
#build_xml(node) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ticketbai/nodes/lroe_header.rb', line 12 def build_xml(node) node = Nokogiri::XML::Builder.new if node.nil? node.Cabecera do |xml| xml.Modelo Ticketbai::Api::Request::LROE_MODEL xml.Capitulo Ticketbai::Api::Request::LROE_CHAPTER xml.Subcapitulo @subchapter xml.Operacion @operation xml.Version '1.0' xml.Ejercicio @year xml.ObligadoTributario do xml.NIF @nif xml.ApellidosNombreRazonSocial @company_name end end end |