Class: Tenk::Users::TimeEntries
- Inherits:
-
UserResource
- Object
- UserResource
- Tenk::Users::TimeEntries
- Defined in:
- lib/users/time_entries.rb
Overview
API methods for TimeEntries resources for a particular user
Defined Under Namespace
Classes: CreateRequest, GetRequest, ListRequest, UpdateRequest
Instance Method Summary collapse
-
#create(user_id, opts = {}) ⇒ Hashie::Mash
Create a new TimeEntry for this user.
-
#get(user_id, time_entry_id, opts = {}) ⇒ Hashie::Mash
Get a single TimeEntry for this user.
-
#list(user_id, opts = {}) ⇒ Hashie::Mash
List TimeEntries for a single user.
-
#update(user_id, time_entry_id, opts = {}) ⇒ Hashie::Mash
Update an TimeEntry for this user.
Methods inherited from UserResource
#delete, #initialize, #resource_root
Constructor Details
This class inherits a constructor from Tenk::Users::UserResource
Instance Method Details
#create(user_id, opts = {}) ⇒ Hashie::Mash
Create a new TimeEntry for this user
44 45 46 |
# File 'lib/users/time_entries.rb', line 44 def create(user_id, opts = {}) super(user_id, CreateRequest.new(opts)) end |
#get(user_id, time_entry_id, opts = {}) ⇒ Hashie::Mash
Get a single TimeEntry for this user
35 36 37 |
# File 'lib/users/time_entries.rb', line 35 def get(user_id, time_entry_id, opts = {}) super(user_id, time_entry_id, GetRequest.new(opts)) end |
#list(user_id, opts = {}) ⇒ Hashie::Mash
List TimeEntries for a single user
25 26 27 |
# File 'lib/users/time_entries.rb', line 25 def list(user_id, opts = {}) super(user_id, ListRequest.new(opts)) end |
#update(user_id, time_entry_id, opts = {}) ⇒ Hashie::Mash
Update an TimeEntry for this user
54 55 56 |
# File 'lib/users/time_entries.rb', line 54 def update(user_id, time_entry_id, opts = {}) super(user_id, time_entry_id, UpdateRequest.new(opts)) end |