Class: NfeReader::Purchase

Inherits:
Object
  • Object
show all
Includes:
AttributeHelper
Defined in:
lib/nfe_reader/purchase.rb

Overview

Informações de Compras

Constant Summary

Constants included from AttributeHelper

AttributeHelper::WITHELIST

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AttributeHelper

#attributes, #attributes_to_hash

Constructor Details

#initialize(attrs = {}) ⇒ Purchase

Returns a new instance of Purchase.



9
10
11
12
13
# File 'lib/nfe_reader/purchase.rb', line 9

def initialize(attrs = {})
  @number = attrs[:xNEmp]
  @demand = attrs[:xPed]
  @contract = attrs[:xCont]
end

Instance Attribute Details

#contractObject (readonly)

Returns the value of attribute contract.



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

def contract
  @contract
end

#demandObject (readonly)

Returns the value of attribute demand.



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

def demand
  @demand
end

#numberObject (readonly)

Returns the value of attribute number.



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

def number
  @number
end