Class: Nfe::Purchase

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Purchase

Returns a new instance of Purchase.



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

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

Instance Attribute Details

#contractObject (readonly)

Returns the value of attribute contract.



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

def contract
  @contract
end

#demandObject (readonly)

Returns the value of attribute demand.



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

def demand
  @demand
end

#numberObject (readonly)

Returns the value of attribute number.



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

def number
  @number
end