Class: Upwork::Api::Routers::Hr::Submissions
- Inherits:
-
Object
- Object
- Upwork::Api::Routers::Hr::Submissions
- Defined in:
- lib/upwork/api/routers/hr/submissions.rb
Overview
Submissions workflow
Constant Summary collapse
- ENTRY_POINT =
'api'
Instance Method Summary collapse
-
#approve(submission_id, params) ⇒ Object
Approve an existing Submission.
-
#initialize(client) ⇒ Submissions
constructor
Init.
-
#reject(submission_id, params) ⇒ Object
Reject an existing Submission.
-
#request_approval(params) ⇒ Object
Freelancer submits work for the client to approve.
Constructor Details
#initialize(client) ⇒ Submissions
Init
Arguments:
client: (Client)
26 27 28 29 |
# File 'lib/upwork/api/routers/hr/submissions.rb', line 26 def initialize(client) @client = client @client.epoint = ENTRY_POINT end |
Instance Method Details
#approve(submission_id, params) ⇒ Object
Approve an existing Submission
Arguments:
submission_id: (String)
params: (Hash)
45 46 47 48 |
# File 'lib/upwork/api/routers/hr/submissions.rb', line 45 def approve(submission_id, params) $LOG.i "running " + __method__.to_s @client.put '/hr/v3/fp/submissions/' + submission_id + '/approve', params end |
#reject(submission_id, params) ⇒ Object
Reject an existing Submission
Arguments:
submission_id: (String)
params: (Hash)
55 56 57 58 |
# File 'lib/upwork/api/routers/hr/submissions.rb', line 55 def reject(submission_id, params) $LOG.i "running " + __method__.to_s @client.put '/hr/v3/fp/submissions/' + submission_id + '/reject', params end |
#request_approval(params) ⇒ Object
Freelancer submits work for the client to approve
Arguments:
params: (Hash)
35 36 37 38 |
# File 'lib/upwork/api/routers/hr/submissions.rb', line 35 def request_approval(params) $LOG.i "running " + __method__.to_s @client.post '/hr/v3/fp/submissions', params end |