Class: TorgApi::Api::Okved
Overview
Справочник кодов ОКВЭД
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#code ⇒ Integer
Код.
-
#fullname ⇒ Integer
Полное наименование.
-
#id ⇒ Integer
Id.
-
#title ⇒ 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
#code ⇒ Integer
Returns Код.
14 15 16 |
# File 'lib/torg_api/api/okved.rb', line 14 def code @code end |
#fullname ⇒ Integer
Returns Полное наименование.
10 11 12 |
# File 'lib/torg_api/api/okved.rb', line 10 def fullname @fullname end |
#id ⇒ Integer
Returns id.
8 9 10 |
# File 'lib/torg_api/api/okved.rb', line 8 def id @id end |
#title ⇒ Integer
Returns Наименование.
12 13 14 |
# File 'lib/torg_api/api/okved.rb', line 12 def title @title end |
Class Method Details
.find(id) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/torg_api/api/okved.rb', line 17 def find(id) responce = JSON.parse( torg_resource["okveds/show"].get( params: { id: id }, accept: :json, content_type: :json, format: :json ), symbolize_names: true ) new(responce[:okved]) end |