class Upwork::Api::Routers::Hr::Milestones
Milestones workflow
Constants
- ENTRY_POINT
Public Class Methods
new(client)
click to toggle source
Init
Arguments:
client: (Client)
# File lib/upwork/api/routers/hr/milestones.rb, line 26 def initialize(client) @client = client @client.epoint = ENTRY_POINT end
Public Instance Methods
activate(milestone_id, params)
click to toggle source
Activate an existing Milestone
Arguments:
milestone_id: (String) params: (Hash)
# File lib/upwork/api/routers/hr/milestones.rb, line 73 def activate(milestone_id, params) $LOG.i "running " + __method__.to_s @client.put '/hr/v3/fp/milestones/' + milestone_id + '/activate', params end
approve(milestone_id, params)
click to toggle source
Approve an existing Milestone
Arguments:
milestone_id: (String) params: (Hash)
# File lib/upwork/api/routers/hr/milestones.rb, line 83 def approve(milestone_id, params) $LOG.i "running " + __method__.to_s @client.put '/hr/v3/fp/milestones/' + milestone_id + '/approve', params end
create(params)
click to toggle source
Create a new Milestone
Arguments:
params: (Hash)
# File lib/upwork/api/routers/hr/milestones.rb, line 53 def create(params) $LOG.i "running " + __method__.to_s @client.post '/hr/v3/fp/milestones', params end
delete(milestone_id)
click to toggle source
Delete an existing Milestone
Arguments:
milestone_id: (String)
# File lib/upwork/api/routers/hr/milestones.rb, line 92 def delete(milestone_id) $LOG.i "running " + __method__.to_s @client.delete '/hr/v3/fp/milestones/' + milestone_id end
edit(milestone_id, params)
click to toggle source
Edit an existing Milestone
Arguments:
milestone_id: (String) params: (Hash)
# File lib/upwork/api/routers/hr/milestones.rb, line 63 def edit(milestone_id, params) $LOG.i "running " + __method__.to_s @client.put '/hr/v3/fp/milestones/' + milestone_id, params end
get_active_milestone(contract_id)
click to toggle source
Get active Milestone for specific Contract
Arguments:
contract_id: (String)
# File lib/upwork/api/routers/hr/milestones.rb, line 35 def get_active_milestone(contract_id) $LOG.i "running " + __method__.to_s @client.get '/hr/v3/fp/milestones/statuses/active/contracts/' + contract_id end
get_submissions(milestone_id)
click to toggle source
Get active Milestone for specific Contract
Arguments:
milestone_id: (String)
# File lib/upwork/api/routers/hr/milestones.rb, line 44 def get_submissions(milestone_id) $LOG.i "running " + __method__.to_s @client.get '/hr/v3/fp/milestones/' + milestone_id + '/submissions' end