Class: KazeClient::CreateJobRequest
- Inherits:
-
Utils::FinalRequest
- Object
- Request
- Utils::FinalRequest
- KazeClient::CreateJobRequest
- Includes:
- Utils::AuthentifiedRequest
- Defined in:
- lib/kaze_client/request/requests/jobs/create_job_request.rb
Overview
Create a job from the current user to the target company.
Constant Summary
Constants inherited from Request
Instance Attribute Summary collapse
-
#target_id ⇒ String
readonly
The id of the target company.
-
#workflow ⇒ Hash
readonly
The workflow used to create the job.
Attributes included from Utils::AuthentifiedRequest
Attributes inherited from Request
#body, #headers, #method, #query, #url
Instance Method Summary collapse
-
#initialize(target_id, workflow) ⇒ CreateJobRequest
constructor
A new instance of CreateJobRequest.
Methods included from Utils::AuthentifiedRequest
Methods inherited from Request
Constructor Details
#initialize(target_id, workflow) ⇒ CreateJobRequest
Returns a new instance of CreateJobRequest.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/kaze_client/request/requests/jobs/create_job_request.rb', line 23 def initialize(target_id, workflow) super(:post, 'api/jobs') @target_id = target_id @workflow = workflow @body = { target_id: @target_id, workflow: @workflow } end |
Instance Attribute Details
#target_id ⇒ String (readonly)
Returns The id of the target company.
16 17 18 |
# File 'lib/kaze_client/request/requests/jobs/create_job_request.rb', line 16 def target_id @target_id end |
#workflow ⇒ Hash (readonly)
Returns The workflow used to create the job.
19 20 21 |
# File 'lib/kaze_client/request/requests/jobs/create_job_request.rb', line 19 def workflow @workflow end |