Class: Retab::CreateWorkflowRunRequest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/retab/workflow_runs/create_workflow_run_request.rb

Constant Summary collapse

HASH_ATTRS =
{
  workflow_id: :workflow_id,
  documents: :documents,
  json_inputs: :json_inputs,
  version: :version,
  metadata: :metadata
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CreateWorkflowRunRequest

Returns a new instance of CreateWorkflowRunRequest.



24
25
26
27
28
29
30
31
32
# File 'lib/retab/workflow_runs/create_workflow_run_request.rb', line 24

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @workflow_id = hash[:workflow_id]
  @documents = hash[:documents] || {}
  @json_inputs = hash[:json_inputs] || {}
  @version = hash[:version].nil? ? "production" : hash[:version]
  @metadata = hash[:metadata] || {}
end

Instance Attribute Details

#documentsObject

Returns the value of attribute documents.



16
17
18
# File 'lib/retab/workflow_runs/create_workflow_run_request.rb', line 16

def documents
  @documents
end

#json_inputsObject

Returns the value of attribute json_inputs.



16
17
18
# File 'lib/retab/workflow_runs/create_workflow_run_request.rb', line 16

def json_inputs
  @json_inputs
end

#metadataObject

Returns the value of attribute metadata.



16
17
18
# File 'lib/retab/workflow_runs/create_workflow_run_request.rb', line 16

def 
  @metadata
end

#versionObject

Returns the value of attribute version.



16
17
18
# File 'lib/retab/workflow_runs/create_workflow_run_request.rb', line 16

def version
  @version
end

#workflow_idObject

Returns the value of attribute workflow_id.



16
17
18
# File 'lib/retab/workflow_runs/create_workflow_run_request.rb', line 16

def workflow_id
  @workflow_id
end