Sha256: fe78790e7fabc453c74058162d03eee33eb3d68b331a0aaf742404cbd02953eb

Contents?: true

Size: 625 Bytes

Versions: 1

Compression:

Stored size: 625 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)
      Requests.post(self.paths[:by_cpf] + "?cpf=#{cpf}")
    end

    def self.query_by_name_or_address(query_params)
      Requests.post(self.paths[:by_name_or_address], query_params)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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