Class: TorgApi::Api::Department
- Defined in:
- lib/torg_api/api/department.rb
Overview
Подразделение заказчика в ТОРГ
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#ancestry ⇒ String
Родословная.
-
#contact ⇒ Array
Контактная информация.
-
#eis223_limit ⇒ Numeric
Лимит по 223 ФЗ.
-
#etp_id ⇒ Integer
Id на ЭТП.
-
#fact_address ⇒ String
Фактический адрес.
-
#fullname ⇒ String
Полное наименование.
-
#id ⇒ Integer
Id.
-
#inn ⇒ Integer
ИНН.
-
#is_consumer ⇒ Boolean
Является потребителем.
-
#is_customer ⇒ Boolean
Является заказчиком?.
-
#is_organizer ⇒ Boolean
Является организатором?.
-
#kpp ⇒ Integer
КПП.
-
#legal_address ⇒ String
Юридический адрес.
-
#name ⇒ String
Наименование.
-
#ownership ⇒ Array
Форма собственности.
-
#ownership_id ⇒ Integer
Id формы собственности.
-
#parent_dept_id ⇒ Integer
Id подразделения верхнего уровня.
-
#shortname ⇒ String
Краткое наименование.
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
#ancestry ⇒ String
Returns Родословная.
24 25 26 |
# File 'lib/torg_api/api/department.rb', line 24 def ancestry @ancestry end |
#contact ⇒ Array
Returns Контактная информация.
42 43 44 |
# File 'lib/torg_api/api/department.rb', line 42 def contact @contact end |
#eis223_limit ⇒ Numeric
Returns Лимит по 223 ФЗ.
38 39 40 |
# File 'lib/torg_api/api/department.rb', line 38 def eis223_limit @eis223_limit end |
#etp_id ⇒ Integer
Returns id на ЭТП.
22 23 24 |
# File 'lib/torg_api/api/department.rb', line 22 def etp_id @etp_id end |
#fact_address ⇒ String
Returns Фактический адрес.
16 17 18 |
# File 'lib/torg_api/api/department.rb', line 16 def fact_address @fact_address end |
#fullname ⇒ String
Returns Полное наименование.
26 27 28 |
# File 'lib/torg_api/api/department.rb', line 26 def fullname @fullname end |
#id ⇒ Integer
Returns id.
8 9 10 |
# File 'lib/torg_api/api/department.rb', line 8 def id @id end |
#inn ⇒ Integer
Returns ИНН.
28 29 30 |
# File 'lib/torg_api/api/department.rb', line 28 def inn @inn end |
#is_consumer ⇒ Boolean
Returns Является потребителем.
36 37 38 |
# File 'lib/torg_api/api/department.rb', line 36 def is_consumer @is_consumer end |
#is_customer ⇒ Boolean
Returns Является заказчиком?.
18 19 20 |
# File 'lib/torg_api/api/department.rb', line 18 def is_customer @is_customer end |
#is_organizer ⇒ Boolean
Returns Является организатором?.
20 21 22 |
# File 'lib/torg_api/api/department.rb', line 20 def is_organizer @is_organizer end |
#kpp ⇒ Integer
Returns КПП.
30 31 32 |
# File 'lib/torg_api/api/department.rb', line 30 def kpp @kpp end |
#legal_address ⇒ String
Returns Юридический адрес.
14 15 16 |
# File 'lib/torg_api/api/department.rb', line 14 def legal_address @legal_address end |
#name ⇒ String
Returns Наименование.
12 13 14 |
# File 'lib/torg_api/api/department.rb', line 12 def name @name end |
#ownership ⇒ Array
Returns Форма собственности.
40 41 42 |
# File 'lib/torg_api/api/department.rb', line 40 def ownership @ownership end |
#ownership_id ⇒ Integer
Returns id формы собственности.
32 33 34 |
# File 'lib/torg_api/api/department.rb', line 32 def ownership_id @ownership_id end |
#parent_dept_id ⇒ Integer
Returns id подразделения верхнего уровня.
10 11 12 |
# File 'lib/torg_api/api/department.rb', line 10 def parent_dept_id @parent_dept_id end |
#shortname ⇒ String
Returns Краткое наименование.
34 35 36 |
# File 'lib/torg_api/api/department.rb', line 34 def shortname @shortname end |
Class Method Details
.find(id) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/torg_api/api/department.rb', line 46 def find(id) responce = JSON.parse( torg_resource["departments/#{id}"].get( accept: :json, content_type: :json, format: :json ), symbolize_names: true ) new(responce[:department]) end |