Class: CorreiosSigep::Models::SRO
- Inherits:
-
Object
- Object
- CorreiosSigep::Models::SRO
- Defined in:
- lib/correios_sigep/models/sro.rb
Instance Attribute Summary collapse
-
#collect_number ⇒ Object
Returns the value of attribute collect_number.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SRO
constructor
A new instance of SRO.
- #to_xml ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ SRO
6 7 8 9 |
# File 'lib/correios_sigep/models/sro.rb', line 6 def initialize(={}) @collect_number = [:collect_number] @type = [:type] end |
Instance Attribute Details
#collect_number ⇒ Object
Returns the value of attribute collect_number.
4 5 6 |
# File 'lib/correios_sigep/models/sro.rb', line 4 def collect_number @collect_number end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/correios_sigep/models/sro.rb', line 4 def type @type end |
Instance Method Details
#to_xml ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/correios_sigep/models/sro.rb', line 11 def to_xml builder = Nokogiri::XML::Builder.new do |xml| xml.root do xml.tipoBusca('H') xml.tipoSolicitacao(@type) xml.numeroPedido(@collect_number) end end builder.to_xml end |