Class: FmTimbradoCfdi::FmCfdi

Inherits:
Object
  • Object
show all
Defined in:
lib/fm_adapter/fm_cfdi.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ FmCfdi

Returns a new instance of FmCfdi.



5
6
7
8
# File 'lib/fm_adapter/fm_cfdi.rb', line 5

def initialize(response)
  @doc = Nokogiri::XML(response)
  @xml = obtener_xml(@doc)
end

Instance Attribute Details

#xmlObject (readonly)

Returns the value of attribute xml.



3
4
5
# File 'lib/fm_adapter/fm_cfdi.rb', line 3

def xml
  @xml
end

Instance Method Details

#version_3_2?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/fm_adapter/fm_cfdi.rb', line 10

def version_3_2?
  obtener_version('version') == '3.2'
end

#version_3_3?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/fm_adapter/fm_cfdi.rb', line 14

def version_3_3?
  obtener_version('Version') == '3.3'
end