Class: Retab::PublicHandlePayload
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::PublicHandlePayload
- 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
-
#data ⇒ Object
Returns the value of attribute data.
-
#document ⇒ Object
Returns the value of attribute document.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ PublicHandlePayload
constructor
A new instance of PublicHandlePayload.
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
#data ⇒ Object
Returns the value of attribute data.
14 15 16 |
# File 'lib/retab/workflow_steps/public_handle_payload.rb', line 14 def data @data end |
#document ⇒ Object
Returns the value of attribute document.
14 15 16 |
# File 'lib/retab/workflow_steps/public_handle_payload.rb', line 14 def document @document end |
#type ⇒ Object
Returns the value of attribute type.
14 15 16 |
# File 'lib/retab/workflow_steps/public_handle_payload.rb', line 14 def type @type end |