class CorreiosSigep::Models::SRO

Attributes

collect_number[RW]
type[RW]

Public Class Methods

new(options={}) click to toggle source
# File lib/correios_sigep/models/sro.rb, line 6
def initialize(options={})
  @collect_number = options[:collect_number]
  @type           = options[:type]
end

Public Instance Methods

to_xml() click to toggle source
# 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