Class: BrasilAPI::Address
Constant Summary
Constants inherited from Base
Class Method Summary collapse
- .find_by_zip_code(zip_code, location: false) ⇒ Object
- .state_and_cities_by_area_code(area_code) ⇒ Object
Methods inherited from Base
Class Method Details
.find_by_zip_code(zip_code, location: false) ⇒ Object
6 7 8 9 10 |
# File 'lib/brasil_api/address.rb', line 6 def find_by_zip_code(zip_code, location: false) return get("/cep/v2/#{zip_code}") if location get("/cep/v1/#{zip_code}") end |
.state_and_cities_by_area_code(area_code) ⇒ Object
12 13 14 |
# File 'lib/brasil_api/address.rb', line 12 def state_and_cities_by_area_code(area_code) get("/ddd/v1/#{area_code}") end |