Class: NfeReader::Billing
- Inherits:
-
Object
- Object
- NfeReader::Billing
- Includes:
- AttributeHelper, CreatorHelper
- Defined in:
- lib/nfe_reader/billing.rb
Overview
Mapeia as Cobrancas
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#descount ⇒ Object
readonly
Returns the value of attribute descount.
-
#duplicates ⇒ Object
readonly
Returns the value of attribute duplicates.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#value_net ⇒ Object
readonly
Returns the value of attribute value_net.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Billing
constructor
A new instance of Billing.
Methods included from CreatorHelper
#create_resource, #create_resources, #to_array
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Billing
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/nfe_reader/billing.rb', line 10 def initialize(attrs = {}) if attrs[:fat] @number = attrs[:fat][:nFat] @value = attrs[:fat][:vOrig] @descount = attrs[:fat][:vDesc] @value_net = attrs[:fat][:vLiq] end @duplicates = create_resources(Duplicate, attrs[:dup]) end |
Instance Attribute Details
#descount ⇒ Object (readonly)
Returns the value of attribute descount.
8 9 10 |
# File 'lib/nfe_reader/billing.rb', line 8 def descount @descount end |
#duplicates ⇒ Object (readonly)
Returns the value of attribute duplicates.
8 9 10 |
# File 'lib/nfe_reader/billing.rb', line 8 def duplicates @duplicates end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
8 9 10 |
# File 'lib/nfe_reader/billing.rb', line 8 def number @number end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/nfe_reader/billing.rb', line 8 def value @value end |
#value_net ⇒ Object (readonly)
Returns the value of attribute value_net.
8 9 10 |
# File 'lib/nfe_reader/billing.rb', line 8 def value_net @value_net end |