def to_request tipo
      customer = {
        customer_id:      self.customer_id.to_s,
        first_name:       self.first_name.to_s,
        last_name:        self.last_name.to_s,
        email:            self.email.to_s,
        document_type:    self.tipos_de_cliente_to_request.to_s,
        document_number:  self.document_number.to_s,
        phone_number:     self.phone_number.to_s,
      }

      if tipo == :customer
          customer.merge!({"address" => address.to_request,})
      elsif tipo == :payment
          customer.merge!({"name" => self.name.to_s,})
          customer.merge!({"billing_address" => address.to_request,})
      end

      return customer
    end
def to_request tipo
      customer = {
        customer_id:      self.customer_id.to_s,
        first_name:       self.first_name.to_s,
        last_name:        self.last_name.to_s,
        email:            self.email.to_s,
        document_type:    self.tipos_de_cliente_to_request.to_s,
        document_number:  self.document_number.to_s,
        phone_number:     self.phone_number.to_s,
      }

      if tipo == :customer
          customer.merge!({"address" => address.to_request,})
      elsif tipo == :payment
          customer.merge!({"name" => self.name.to_s,})
          customer.merge!({"billing_address" => address.to_request,})
      end

      return customer
    end
Montar o Hash de dados do usuario no padrão utilizado pela Getnet