Class: Retab::PublicHandlePayload

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_steps/public_handle_payload.rb

Constant Summary collapse

HASH_ATTRS =
{
  type: :type,
  document: :document,
  data: :data
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

deep_symbolize, #inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ PublicHandlePayload

Returns a new instance of PublicHandlePayload.



20
21
22
23
24
25
26
# File 'lib/retab/workflow_steps/public_handle_payload.rb', line 20

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @type = hash[:type]
  @document = hash[:document] ? Retab::FileRef.new(hash[:document]) : nil
  @data = hash[:data]
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



14
15
16
# File 'lib/retab/workflow_steps/public_handle_payload.rb', line 14

def data
  @data
end

#documentObject

Returns the value of attribute document.



14
15
16
# File 'lib/retab/workflow_steps/public_handle_payload.rb', line 14

def document
  @document
end

#typeObject

Returns the value of attribute type.



14
15
16
# File 'lib/retab/workflow_steps/public_handle_payload.rb', line 14

def type
  @type
end