Sha256: 87b02a76b9517b382adc158fe5e9fc647eadb1a6fe48455f03f27e97a3106452

Contents?: true

Size: 359 Bytes

Versions: 4

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true

module BrasilAPI
  class Address < Base
    class << self
      def find_by_zip_code(zip_code, location: false)
        return get("/cep/v2/#{zip_code}") if location

        get("/cep/v1/#{zip_code}")
      end

      def state_and_cities_by_area_code(area_code)
        get("/ddd/v1/#{area_code}")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
brasilapi-0.6.0 lib/brasil_api/address.rb
brasilapi-0.5.1 lib/brasil_api/address.rb
brasilapi-0.4.0 lib/brasil_api/address.rb
brasilapi-0.3.0 lib/brasil_api/address.rb