Class: KazeClient::CompleteStepRequest

Inherits:
Utils::FinalRequest show all
Includes:
Utils::AuthentifiedRequest
Defined in:
lib/kaze_client/request/requests/jobs/complete_step_request.rb

Overview

Validate a step from a job.

Constant Summary

Constants inherited from Request

Request::DEFAULT_HEADERS

Instance Attribute Summary collapse

Attributes included from Utils::AuthentifiedRequest

#token

Attributes inherited from Request

#body, #headers, #method, #query, #url

Instance Method Summary collapse

Methods included from Utils::AuthentifiedRequest

#with_token

Methods inherited from Request

#error_for, #parameters

Constructor Details

#initialize(job_id, step_id) ⇒ CompleteStepRequest

KazeClient::CompleteStepRequest.new(‘5295d1c4-2c25-4fc2-8bad-e714f2907f0d’, ‘job_info’)

> The step job_info is now completed.

Since:

  • 0.3.3



24
25
26
27
28
29
30
31
32
# File 'lib/kaze_client/request/requests/jobs/complete_step_request.rb', line 24

def initialize(job_id, step_id)
  super(:put, "api/jobs/#{job_id}/cells/#{step_id}")

  @body = {
    data: {
      step_id => { completed: { value: true } }
    }
  }
end

Instance Attribute Details

#job_idString (readonly)

Returns The id of the targeted job.

Returns:

  • (String)

    The id of the targeted job.

Since:

  • 0.3.3



16
17
18
# File 'lib/kaze_client/request/requests/jobs/complete_step_request.rb', line 16

def job_id
  @job_id
end

#step_idHash (readonly)

Returns The step needed to be completed.

Returns:

  • (Hash)

    The step needed to be completed.

Since:

  • 0.3.3



19
20
21
# File 'lib/kaze_client/request/requests/jobs/complete_step_request.rb', line 19

def step_id
  @step_id
end