Class: RubyXmlNfe::Prod
- Inherits:
-
Object
- Object
- RubyXmlNfe::Prod
- Defined in:
- lib/ruby_xml_nfe/prod.rb
Instance Attribute Summary collapse
-
#cEAN ⇒ Object
readonly
Returns the value of attribute cEAN.
-
#cEANTrib ⇒ Object
readonly
Returns the value of attribute cEANTrib.
-
#cest ⇒ Object
readonly
Returns the value of attribute cest.
-
#cfop ⇒ Object
readonly
Returns the value of attribute cfop.
-
#cProd ⇒ Object
readonly
Returns the value of attribute cProd.
-
#indTot ⇒ Object
readonly
Returns the value of attribute indTot.
-
#ncm ⇒ Object
readonly
Returns the value of attribute ncm.
-
#nFCI ⇒ Object
readonly
Returns the value of attribute nFCI.
-
#nItemPed ⇒ Object
readonly
Returns the value of attribute nItemPed.
-
#qCom ⇒ Object
readonly
Returns the value of attribute qCom.
-
#qTrib ⇒ Object
readonly
Returns the value of attribute qTrib.
-
#uCom ⇒ Object
readonly
Returns the value of attribute uCom.
-
#uTrib ⇒ Object
readonly
Returns the value of attribute uTrib.
-
#vProd ⇒ Object
readonly
Returns the value of attribute vProd.
-
#vUnCom ⇒ Object
readonly
Returns the value of attribute vUnCom.
-
#vUnTrib ⇒ Object
readonly
Returns the value of attribute vUnTrib.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
-
#xPed ⇒ Object
readonly
Returns the value of attribute xPed.
-
#xProd ⇒ Object
readonly
Returns the value of attribute xProd.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(xml, params) ⇒ Prod
constructor
A new instance of Prod.
Constructor Details
#initialize(xml, params) ⇒ Prod
Returns a new instance of Prod.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ruby_xml_nfe/prod.rb', line 6 def initialize(xml, params) @xml = xml @cProd = params[:cProd] @cEAN = params[:cEAN] @xProd = params[:xProd] @ncm = params[:NCM] @cest = params[:CEST] @cfop = params[:CFOP] @uCom = params[:uCom] @qCom = params[:qCom] @vUnCom = params[:vUnCom] @vProd = params[:vProd] @cEANTrib = params[:cEANTrib] @uTrib = params[:uTrib] @qTrib = params[:qTrib] @vUnTrib = params[:vUnTrib] @indTot = params[:indTot] @xPed = params[:xPed] @nItemPed = params[:nItemPed] @nFCI = params[:nFCI] end |
Instance Attribute Details
#cEAN ⇒ Object (readonly)
Returns the value of attribute cEAN.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def cEAN @cEAN end |
#cEANTrib ⇒ Object (readonly)
Returns the value of attribute cEANTrib.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def cEANTrib @cEANTrib end |
#cest ⇒ Object (readonly)
Returns the value of attribute cest.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def cest @cest end |
#cfop ⇒ Object (readonly)
Returns the value of attribute cfop.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def cfop @cfop end |
#cProd ⇒ Object (readonly)
Returns the value of attribute cProd.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def cProd @cProd end |
#indTot ⇒ Object (readonly)
Returns the value of attribute indTot.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def indTot @indTot end |
#ncm ⇒ Object (readonly)
Returns the value of attribute ncm.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def ncm @ncm end |
#nFCI ⇒ Object (readonly)
Returns the value of attribute nFCI.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def nFCI @nFCI end |
#nItemPed ⇒ Object (readonly)
Returns the value of attribute nItemPed.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def nItemPed @nItemPed end |
#qCom ⇒ Object (readonly)
Returns the value of attribute qCom.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def qCom @qCom end |
#qTrib ⇒ Object (readonly)
Returns the value of attribute qTrib.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def qTrib @qTrib end |
#uCom ⇒ Object (readonly)
Returns the value of attribute uCom.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def uCom @uCom end |
#uTrib ⇒ Object (readonly)
Returns the value of attribute uTrib.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def uTrib @uTrib end |
#vProd ⇒ Object (readonly)
Returns the value of attribute vProd.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def vProd @vProd end |
#vUnCom ⇒ Object (readonly)
Returns the value of attribute vUnCom.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def vUnCom @vUnCom end |
#vUnTrib ⇒ Object (readonly)
Returns the value of attribute vUnTrib.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def vUnTrib @vUnTrib end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def xml @xml end |
#xPed ⇒ Object (readonly)
Returns the value of attribute xPed.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def xPed @xPed end |
#xProd ⇒ Object (readonly)
Returns the value of attribute xProd.
3 4 5 |
# File 'lib/ruby_xml_nfe/prod.rb', line 3 def xProd @xProd end |
Instance Method Details
#build ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ruby_xml_nfe/prod.rb', line 29 def build xml.prod do xml.cProd cProd xml.cEAN cEAN xml.xProd xProd xml.NCM ncm xml.CEST cest if cest xml.CFOP cfop xml.uCom uCom xml.qCom qCom xml.vUnCom vUnCom xml.vProd vProd xml.cEANTrib cEANTrib xml.uTrib uTrib xml.qTrib qTrib xml.vUnTrib vUnTrib xml.indTot indTot xml.xPed xPed if xPed xml.nItemPed nItemPed if nItemPed xml.nFCI nFCI if nFCI end end |