Class: WiteiWebApi::OfficeUser
- Defined in:
- lib/witei_web_api/office_user.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
Class Method Summary collapse
Methods inherited from Base
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
2 3 4 |
# File 'lib/witei_web_api/office_user.rb', line 2 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/witei_web_api/office_user.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/witei_web_api/office_user.rb', line 2 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
2 3 4 |
# File 'lib/witei_web_api/office_user.rb', line 2 def phone @phone end |
Class Method Details
.find(id) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/witei_web_api/office_user.rb', line 4 def self.find(id) page = get("/pro/agencies/account_management/agency/user_update/#{id}/") form = page.forms_with(css: '.form-horizontal').first office_user = new office_user.assign_attributes( id: id, name: form['username'], email: form['email'], phone: form['phone'] ) office_user end |