Sha256: 75a9f2e92e4ae809764a9186640135e04af00888215c034401d65a4f3c45b3cd

Contents?: true

Size: 732 Bytes

Versions: 1

Compression:

Stored size: 732 Bytes

Contents

module Assertiva
  class Localize
    def self.paths
      paths = {
        by_cpf: "/v1/localize/1000/consultar",
        by_cnpj: "/v1/localize/1001/consultar",
        by_phone: "/v1/localize/1002/consultar",
        by_email: "/v1/localize/1003/consultar",
        by_name_or_address: "/v1/localize/1004/consultar",
        related_by_cpf: "/v1/localize/1005/consultar"
      }
    end

    def self.query_by_cpf(cpf)
      begin
        Requests.post(self.paths[:by_cpf] + "?cpf=#{cpf}")
      rescue => e
        raise
      end
    end

    def self.query_by_name_or_address(query_params)
      begin
        
      rescue => e
        Requests.post(self.paths[:by_name_or_address], query_params)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
assertiva-0.2.0 lib/assertiva/localize.rb