Class: Retab::CreateReviewVersionRequest

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_review_versions/create_review_version_request.rb

Constant Summary collapse

HASH_ATTRS =
{
  review_id: :review_id,
  parent_id: :parent_id,
  snapshot: :snapshot,
  note: :note
}.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) ⇒ CreateReviewVersionRequest

Returns a new instance of CreateReviewVersionRequest.



21
22
23
24
25
26
27
# File 'lib/retab/workflow_review_versions/create_review_version_request.rb', line 21

def initialize(json)
  hash = self.class.normalize(json)
  @review_id = hash[:review_id]
  @parent_id = hash[:parent_id]
  @snapshot = hash[:snapshot] || {}
  @note = hash[:note]
end

Instance Attribute Details

#noteObject

Returns the value of attribute note.



15
16
17
# File 'lib/retab/workflow_review_versions/create_review_version_request.rb', line 15

def note
  @note
end

#parent_idObject

Returns the value of attribute parent_id.



15
16
17
# File 'lib/retab/workflow_review_versions/create_review_version_request.rb', line 15

def parent_id
  @parent_id
end

#review_idObject

Returns the value of attribute review_id.



15
16
17
# File 'lib/retab/workflow_review_versions/create_review_version_request.rb', line 15

def review_id
  @review_id
end

#snapshotObject

Returns the value of attribute snapshot.



15
16
17
# File 'lib/retab/workflow_review_versions/create_review_version_request.rb', line 15

def snapshot
  @snapshot
end