module Mercadolibre::Core::Locations

Public Instance Methods

get_city(city_id) click to toggle source
# File lib/mercadolibre/core/locations.rb, line 16
def get_city(city_id)
  get_request("/cities/#{city_id}").body
end
get_countries() click to toggle source
# File lib/mercadolibre/core/locations.rb, line 4
def get_countries
  get_request('/countries').body
end
get_country(country_id) click to toggle source
# File lib/mercadolibre/core/locations.rb, line 8
def get_country(country_id)
  get_request("/countries/#{country_id}").body
end
get_state(state_id) click to toggle source
# File lib/mercadolibre/core/locations.rb, line 12
def get_state(state_id)
  get_request("/states/#{state_id}").body
end
get_zip_code(country_id, zip_code) click to toggle source
# File lib/mercadolibre/core/locations.rb, line 20
def get_zip_code(country_id, zip_code)
  get_request("/countries/#{country_id}/zip_codes/#{zip_code}").body
end
search_zip_codes(country_id, zip_code_from, zip_code_to) click to toggle source
# File lib/mercadolibre/core/locations.rb, line 24
def search_zip_codes(country_id, zip_code_from, zip_code_to)
  get_request("/countries/#{country_id}/zip_codes/search_between", {
    zip_code_from: zip_code_from,
    zip_code_to: zip_code_to
  }).body
end