Class: CFC::User
Class Method Summary collapse
-
.details ⇒ Object
Get full details of the current user.
-
.edit(first_name: nil, last_name: nil, telephone: nil, country: nil, zipcode: nil) ⇒ Object
Update part of the current user’s details as permitted.
Methods inherited from APIObject
#initialize, #inspect, #method_missing, opts, relationship, #respond_to_missing?, #to_h, #to_json
Constructor Details
This class inherits a constructor from CFC::APIObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CFC::APIObject
Class Method Details
.details ⇒ Object
Get full details of the current user.
8 9 10 |
# File 'lib/cfc/objects/user.rb', line 8 def self.details new(@api.get_json('user')['result']) end |
.edit(first_name: nil, last_name: nil, telephone: nil, country: nil, zipcode: nil) ⇒ Object
Update part of the current user’s details as permitted.
19 20 21 22 |
# File 'lib/cfc/objects/user.rb', line 19 def self.edit(first_name: nil, last_name: nil, telephone: nil, country: nil, zipcode: nil) data = opts(binding) @api.patch_to_json('user', data) end |