class CorreiosSigep::Builders::XML::Recipient

Public Class Methods

new(builder, recipient) click to toggle source
# File lib/correios_sigep/builders/xml/recipient.rb, line 5
def initialize(builder, recipient)
  @builder = builder
  @recipient = recipient
end

Public Instance Methods

build_xml() click to toggle source
# File lib/correios_sigep/builders/xml/recipient.rb, line 10
def build_xml
  @builder.destinatario do
    @builder.nome        @recipient.name
    @builder.logradouro  @recipient.address
    @builder.numero      @recipient.number
    @builder.complemento @recipient.complement
    @builder.bairro      @recipient.neighborhood
    @builder.referencia  @recipient.reference
    @builder.cidade      @recipient.city
    @builder.uf          @recipient.state
    @builder.cep         @recipient.postal_code
    @builder.ddd         @recipient.area_code
    @builder.telefone    @recipient.phone
    @builder.email       @recipient.email
  end
end