Class: NfeReader::Information

Inherits:
Object
  • Object
show all
Includes:
AttributeHelper, CreatorHelper
Defined in:
lib/nfe_reader/information.rb

Constant Summary

Constants included from AttributeHelper

AttributeHelper::WITHELIST

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CreatorHelper

#create_resource, #create_resources, #to_array

Methods included from AttributeHelper

#attributes, #attributes_to_hash

Constructor Details

#initialize(attrs = {}) ⇒ Information

Returns a new instance of Information.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/nfe_reader/information.rb', line 10

def initialize(attrs = {})
  @information = attrs[:infAdFisco]
  @information_taxpayer = attrs[:infCpl]

  if attrs[:procRef]
    @references = to_array(attrs[:procRef])
  end

  if attrs[:obsCont]
    @taxpayer_messages = to_array(attrs[:obsCont])
  end

  if attrs[:obsFisco]
    @messages = to_array(attrs[:obsFisco])
  end
end

Instance Attribute Details

#informationObject (readonly)

Returns the value of attribute information.



7
8
9
# File 'lib/nfe_reader/information.rb', line 7

def information
  @information
end

#information_taxpayerObject (readonly)

Returns the value of attribute information_taxpayer.



7
8
9
# File 'lib/nfe_reader/information.rb', line 7

def information_taxpayer
  @information_taxpayer
end

#messagesObject (readonly)

Returns the value of attribute messages.



7
8
9
# File 'lib/nfe_reader/information.rb', line 7

def messages
  @messages
end

#referencesObject (readonly)

Returns the value of attribute references.



7
8
9
# File 'lib/nfe_reader/information.rb', line 7

def references
  @references
end

#taxpayer_messagesObject (readonly)

Returns the value of attribute taxpayer_messages.



7
8
9
# File 'lib/nfe_reader/information.rb', line 7

def taxpayer_messages
  @taxpayer_messages
end