Class: TorgApi::Api::User
Overview
Пользователи системы ТОРГ
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#department_id ⇒ Integer
ID подразделения.
-
#email ⇒ Integer
Электронная почта.
-
#fax ⇒ Integer
Факс.
-
#id ⇒ Integer
Id.
-
#name ⇒ Integer
Имя.
-
#patronymic ⇒ Integer
Отчество.
-
#phone_cell ⇒ Integer
Телефон сотовый.
-
#phone_public ⇒ Integer
Телефон рабочий.
-
#surname ⇒ Integer
Фамилия.
-
#user_job ⇒ 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
#department_id ⇒ Integer
Returns ID подразделения.
26 27 28 |
# File 'lib/torg_api/api/user.rb', line 26 def department_id @department_id end |
#email ⇒ Integer
Returns Электронная почта.
10 11 12 |
# File 'lib/torg_api/api/user.rb', line 10 def email @email end |
#fax ⇒ Integer
Returns Факс.
24 25 26 |
# File 'lib/torg_api/api/user.rb', line 24 def fax @fax end |
#id ⇒ Integer
Returns id.
8 9 10 |
# File 'lib/torg_api/api/user.rb', line 8 def id @id end |
#name ⇒ Integer
Returns Имя.
14 15 16 |
# File 'lib/torg_api/api/user.rb', line 14 def name @name end |
#patronymic ⇒ Integer
Returns Отчество.
16 17 18 |
# File 'lib/torg_api/api/user.rb', line 16 def patronymic @patronymic end |
#phone_cell ⇒ Integer
Returns Телефон сотовый.
22 23 24 |
# File 'lib/torg_api/api/user.rb', line 22 def phone_cell @phone_cell end |
#phone_public ⇒ Integer
Returns Телефон рабочий.
20 21 22 |
# File 'lib/torg_api/api/user.rb', line 20 def phone_public @phone_public end |
#surname ⇒ Integer
Returns Фамилия.
12 13 14 |
# File 'lib/torg_api/api/user.rb', line 12 def surname @surname end |
#user_job ⇒ Integer
Returns Должность.
18 19 20 |
# File 'lib/torg_api/api/user.rb', line 18 def user_job @user_job end |
Class Method Details
.find(id) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/torg_api/api/user.rb', line 29 def find(id) responce = JSON.parse( torg_resource["user/#{id}"].get( accept: :json, content_type: :json, format: :json ), symbolize_names: true ) new(responce) end |