Class: Ticketbai::Nodes::Issuer

Inherits:
Object
  • Object
show all
Defined in:
lib/ticketbai/nodes/issuer.rb

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Issuer

Returns a new instance of Issuer.



4
5
6
7
# File 'lib/ticketbai/nodes/issuer.rb', line 4

def initialize(args = {})
  @issuing_company_nif = args[:issuing_company_nif]
  @issuing_company_name = args[:issuing_company_name]
end

Instance Method Details

#build_xml(node) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/ticketbai/nodes/issuer.rb', line 9

def build_xml(node)
  node = Nokogiri::XML::Builder.new if node.nil?
  node.Emisor do |xml|
    xml.NIF @issuing_company_nif
    xml.ApellidosNombreRazonSocial @issuing_company_name
  end
end