Class: Tenk::Users::Assignments
- Inherits:
-
UserResource
- Object
- UserResource
- Tenk::Users::Assignments
- Defined in:
- lib/users/assignments.rb
Overview
The API methods for Assignments, which record that a particular person is assigned to a user or phase
Defined Under Namespace
Classes: CreateRequest, GetRequest, ListRequest, UpdateRequest
Instance Method Summary collapse
-
#create(user_id, opts = {}) ⇒ Hashie::Mash
Create a new Assignment for this user.
-
#delete(user_id, assignment_id) ⇒ bool
Delete an Assignment for this user.
-
#get(user_id, assignment_id, opts = {}) ⇒ Hashie::Mash
Get a single Assignment for this user.
-
#list(user_id, opts = {}) ⇒ Hashie::Mash
List Assignments for a single user.
-
#update(user_id, assignment_id, opts = {}) ⇒ Hashie::Mash
Update an Assignment for this user.
Methods inherited from UserResource
Constructor Details
This class inherits a constructor from Tenk::Users::UserResource
Instance Method Details
#create(user_id, opts = {}) ⇒ Hashie::Mash
Create a new Assignment for this user
60 61 62 |
# File 'lib/users/assignments.rb', line 60 def create(user_id, opts = {}) super(user_id, CreateRequest.new(opts)) end |
#delete(user_id, assignment_id) ⇒ bool
Delete an Assignment for this user
78 79 80 |
# File 'lib/users/assignments.rb', line 78 def delete(user_id, assignment_id) super(user_id, assignment_id) end |
#get(user_id, assignment_id, opts = {}) ⇒ Hashie::Mash
Get a single Assignment for this user
51 52 53 |
# File 'lib/users/assignments.rb', line 51 def get(user_id, assignment_id, opts = {}) super(user_id, assignment_id, GetRequest.new(opts)) end |
#list(user_id, opts = {}) ⇒ Hashie::Mash
List Assignments for a single user
41 42 43 |
# File 'lib/users/assignments.rb', line 41 def list(user_id, opts = {}) super(user_id, ListRequest.new(opts)) end |
#update(user_id, assignment_id, opts = {}) ⇒ Hashie::Mash
Update an Assignment for this user
70 71 72 |
# File 'lib/users/assignments.rb', line 70 def update(user_id, assignment_id, opts = {}) super(user_id, assignment_id, UpdateRequest.new(opts)) end |