Class: TorgApi::Api::Fias
Overview
Адреса (ФИАС) системы ТОРГ
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#aoid ⇒ Guid
Guid адреса.
-
#houseid ⇒ Guid
Guid дома.
-
#id ⇒ Integer
Id.
-
#name ⇒ String
Адрес.
-
#okato ⇒ Integer
ОКАТО.
-
#oktmo ⇒ Integer
ОКТМО.
-
#postalcode ⇒ Integer
Почтовый код.
-
#regioncode ⇒ Integer
Код региона.
Class Method Summary collapse
Methods inherited from Base
attr_accessor, attributes, #initialize, #to_h, torg_resource
Constructor Details
This class inherits a constructor from TorgApi::Base
Instance Attribute Details
#aoid ⇒ Guid
Returns Guid адреса.
10 11 12 |
# File 'lib/torg_api/api/fias.rb', line 10 def aoid @aoid end |
#houseid ⇒ Guid
Returns Guid дома.
12 13 14 |
# File 'lib/torg_api/api/fias.rb', line 12 def houseid @houseid end |
#id ⇒ Integer
Returns id.
8 9 10 |
# File 'lib/torg_api/api/fias.rb', line 8 def id @id end |
#name ⇒ String
Returns Адрес.
14 15 16 |
# File 'lib/torg_api/api/fias.rb', line 14 def name @name end |
#okato ⇒ Integer
Returns ОКАТО.
20 21 22 |
# File 'lib/torg_api/api/fias.rb', line 20 def okato @okato end |
#oktmo ⇒ Integer
Returns ОКТМО.
22 23 24 |
# File 'lib/torg_api/api/fias.rb', line 22 def oktmo @oktmo end |
#postalcode ⇒ Integer
Returns Почтовый код.
18 19 20 |
# File 'lib/torg_api/api/fias.rb', line 18 def postalcode @postalcode end |
#regioncode ⇒ Integer
Returns Код региона.
16 17 18 |
# File 'lib/torg_api/api/fias.rb', line 16 def regioncode @regioncode end |
Class Method Details
.find(id) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/torg_api/api/fias.rb', line 25 def find(id) responce = JSON.parse( torg_resource["fias/#{id}"].get( accept: :json, content_type: :json, format: :json ), symbolize_names: true ) new(responce) end |