Class: Retab::WorkflowBlockCreateRequest

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_blocks/workflow_block_create_request.rb

Constant Summary collapse

HASH_ATTRS =
{
  workflow_id: :workflow_id,
  id: :id,
  type: :type,
  label: :label,
  position_x: :position_x,
  position_y: :position_y,
  width: :width,
  height: :height,
  config: :config,
  parent_id: :parent_id
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ WorkflowBlockCreateRequest

Returns a new instance of WorkflowBlockCreateRequest.



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 33

def initialize(json)
  hash = self.class.normalize(json)
  @workflow_id = hash[:workflow_id]
  @id = hash[:id]
  @type = hash[:type]
  @label = hash[:label]
  @position_x = hash[:position_x]
  @position_y = hash[:position_y]
  @width = hash[:width]
  @height = hash[:height]
  @config = hash[:config] || {}
  @parent_id = hash[:parent_id]
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def config
  @config
end

#heightObject

Returns the value of attribute height.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def height
  @height
end

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def id
  @id
end

#labelObject

Returns the value of attribute label.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def label
  @label
end

#parent_idObject

Returns the value of attribute parent_id.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def parent_id
  @parent_id
end

#position_xObject

Returns the value of attribute position_x.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def position_x
  @position_x
end

#position_yObject

Returns the value of attribute position_y.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def position_y
  @position_y
end

#typeObject

Returns the value of attribute type.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def type
  @type
end

#widthObject

Returns the value of attribute width.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def width
  @width
end

#workflow_idObject

Returns the value of attribute workflow_id.



21
22
23
# File 'lib/retab/workflow_blocks/workflow_block_create_request.rb', line 21

def workflow_id
  @workflow_id
end