Class: Upwork::Api::Routers::Activities::Engagement
- Inherits:
-
Object
- Object
- Upwork::Api::Routers::Activities::Engagement
- Defined in:
- lib/upwork/api/routers/activities/engagement.rb
Overview
Engagement Activities
Constant Summary collapse
- ENTRY_POINT =
'api'
Instance Method Summary collapse
-
#assign(company, team, engagement, params) ⇒ Object
Assign engagements to the list of activities.
-
#assign_to_engagement(engagement_ref, params) ⇒ Object
Assign to specific engagement the list of activities.
-
#get_specific(engagement_ref) ⇒ Object
List activities for specific engagement.
-
#initialize(client) ⇒ Engagement
constructor
Init.
Constructor Details
#initialize(client) ⇒ Engagement
Init
Arguments:
client: (Client)
26 27 28 29 |
# File 'lib/upwork/api/routers/activities/engagement.rb', line 26 def initialize(client) @client = client @client.epoint = ENTRY_POINT end |
Instance Method Details
#assign(company, team, engagement, params) ⇒ Object
Assign engagements to the list of activities
Arguments:
company: (String)
team: (String)
engagement: (String)
params: (Hash)
46 47 48 |
# File 'lib/upwork/api/routers/activities/engagement.rb', line 46 def assign(company, team, engagement, params) @client.put '/otask/v1/tasks/companies/' + company + '/teams/' + team + '/engagements/' + engagement + '/tasks', params end |
#assign_to_engagement(engagement_ref, params) ⇒ Object
Assign to specific engagement the list of activities
Arguments:
engagement_ref: (String)
params: (Hash)
55 56 57 |
# File 'lib/upwork/api/routers/activities/engagement.rb', line 55 def assign_to_engagement(engagement_ref, params) @client.put '/tasks/v2/tasks/contracts/' + engagement_ref, params end |
#get_specific(engagement_ref) ⇒ Object
List activities for specific engagement
Arguments:
engagement_ref: (String)
35 36 37 |
# File 'lib/upwork/api/routers/activities/engagement.rb', line 35 def get_specific(engagement_ref) @client.get '/tasks/v2/tasks/contracts/' + engagement_ref end |