Class: Novaposhta::Address
Class Method Summary collapse
- .find_city(name) ⇒ Object
-
.find_street(city_ref, name) ⇒ Object
поиск улицы.
-
.get_areas ⇒ Object
области.
- .get_cities ⇒ Object
-
.get_settlements ⇒ Object
населенные пункты.
-
.get_street(city_ref) ⇒ Object
улицы.
-
.get_warehouses ⇒ Object
отделения и типы компании.
Methods inherited from Base
class_attr_accessor, make_body, post_request
Class Method Details
.find_city(name) ⇒ Object
8 9 10 11 |
# 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) ⇒ Object
поиск улицы
38 39 40 41 |
# 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 ⇒ Object
области
20 21 22 23 |
# 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 ⇒ Object
3 4 5 6 |
# 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 ⇒ Object
населенные пункты
14 15 16 17 |
# 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) ⇒ Object
улицы
32 33 34 35 |
# 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 ⇒ Object
отделения и типы компании
26 27 28 29 |
# File 'lib/novaposhta/address.rb', line 26 def self.get_warehouses body_of_query = make_body('Address', 'getWarehouses', {}) post_request(body_of_query) end |