class Novaposhta::Address

Public Class Methods

find_city(name) click to toggle source
# File lib/novaposhta/address.rb, line 8
def self.find_city(name)
  body_of_query = make_body('Address', 'getCities', {'FindByString' => name})
  post_request(body_of_query)
end
find_street(city_ref, name) click to toggle source

поиск улицы

# File lib/novaposhta/address.rb, line 38
def self.find_street(city_ref, name)
  body_of_query = make_body('Address', 'getStreet', {'CityRef' => city_ref, 'FindByString' => name})
  post_request(body_of_query)
end
get_areas() click to toggle source

области

# File lib/novaposhta/address.rb, line 20
def self.get_areas
  body_of_query = make_body('Address', 'getAreas', {})
  post_request(body_of_query)
end
get_cities() click to toggle source
# File lib/novaposhta/address.rb, line 3
def self.get_cities
  body_of_query = make_body('Address', 'getCities')
  post_request(body_of_query)
end
get_settlements() click to toggle source

населенные пункты

# File lib/novaposhta/address.rb, line 14
def self.get_settlements
  body_of_query = make_body('AddressGeneral', 'getSettlements', {})
  post_request(body_of_query)
end
get_street(city_ref) click to toggle source

улицы

# File lib/novaposhta/address.rb, line 32
def self.get_street(city_ref)
  body_of_query = make_body('Address', 'getStreet', {'CityRef' => city_ref})
  post_request(body_of_query)
end
get_warehouses() click to toggle source

отделения и типы компании

# File lib/novaposhta/address.rb, line 26
def self.get_warehouses
  body_of_query = make_body('Address', 'getWarehouses', {})
  post_request(body_of_query)
end