Class: Ticketbai::Documents::Annulment
- Inherits:
-
Ticketbai::Document
- Object
- Ticketbai::Document
- Ticketbai::Documents::Annulment
- Defined in:
- lib/ticketbai/documents/annulment.rb
Constant Summary collapse
- ROOT_NAME =
'T:AnulaTicketBai'.freeze
- XMLNS =
{ 'xmlns:T' => 'urn:ticketbai:anulacion' }.freeze
- ATTRIBUTES =
%i[issuer invoice_header software].freeze
Constants inherited from Ticketbai::Document
Ticketbai::Document::TBAI_VERSION
Instance Method Summary collapse
- #create ⇒ Nokogiri::XML::Builder
-
#initialize(**args) ⇒ Annulment
constructor
A new instance of Annulment.
Constructor Details
#initialize(**args) ⇒ Annulment
Returns a new instance of Annulment.
18 19 20 |
# File 'lib/ticketbai/documents/annulment.rb', line 18 def initialize(**args) super(args) end |
Instance Method Details
#create ⇒ Nokogiri::XML::Builder
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ticketbai/documents/annulment.rb', line 23 def create builder = Nokogiri::XML::Builder.new(encoding: Encoding::UTF_8.to_s) do |xml| xml.TicketBai(XMLNS) do xml.Cabecera do xml.IDVersionTBAI TBAI_VERSION end xml.IDFactura do @issuer.build_xml(xml) @invoice_header.build_xml(xml) end xml.HuellaTBAI do @software.build_xml(xml) end end end modify_xml_root_name(builder) builder end |