Class: Celery::User
- Inherits:
-
Object
- Object
- Celery::User
- Defined in:
- lib/celery/resources/user.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
-
#initialize(api) ⇒ User
constructor
A new instance of User.
-
#me ⇒ JSON
Retrieves seller information about yourself.
-
#update(user) ⇒ JSON
TODO: Need to get the arguments for this method.
Constructor Details
#initialize(api) ⇒ User
Returns a new instance of User.
5 6 7 |
# File 'lib/celery/resources/user.rb', line 5 def initialize(api) @api = api end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
3 4 5 |
# File 'lib/celery/resources/user.rb', line 3 def api @api end |
Instance Method Details
#me ⇒ JSON
Retrieves seller information about yourself.
21 22 23 |
# File 'lib/celery/resources/user.rb', line 21 def me @api.get("users/me") end |
#update(user) ⇒ JSON
TODO: Need to get the arguments for this method. Updates seller information about yourself.
40 41 42 |
# File 'lib/celery/resources/user.rb', line 40 def update(user) @api.put("users/me", body: {user: user}) end |