Class: SDM::ApprovalWorkflowHistory
- Inherits:
-
Object
- Object
- SDM::ApprovalWorkflowHistory
- Defined in:
- lib/models/porcelain.rb
Overview
ApprovalWorkflowHistory records the state of an ApprovalWorkflow at a given point in time, where every change (create, update and delete) to an ApprovalWorkflow produces an ApprovalWorkflowHistory record.
Instance Attribute Summary collapse
-
#activity_id ⇒ Object
The unique identifier of the Activity that produced this change to the ApprovalWorkflow.
-
#approval_workflow ⇒ Object
The complete ApprovalWorkflow state at this time.
-
#deleted_at ⇒ Object
If this ApprovalWorkflow was deleted, the time it was deleted.
-
#timestamp ⇒ Object
The time at which the ApprovalWorkflow state was recorded.
Instance Method Summary collapse
-
#initialize(activity_id: nil, approval_workflow: nil, deleted_at: nil, timestamp: nil) ⇒ ApprovalWorkflowHistory
constructor
A new instance of ApprovalWorkflowHistory.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(activity_id: nil, approval_workflow: nil, deleted_at: nil, timestamp: nil) ⇒ ApprovalWorkflowHistory
Returns a new instance of ApprovalWorkflowHistory.
3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 |
# File 'lib/models/porcelain.rb', line 3392 def initialize( activity_id: nil, approval_workflow: nil, deleted_at: nil, timestamp: nil ) @activity_id = activity_id == nil ? "" : activity_id @approval_workflow = approval_workflow == nil ? nil : approval_workflow @deleted_at = deleted_at == nil ? nil : deleted_at @timestamp = == nil ? nil : end |
Instance Attribute Details
#activity_id ⇒ Object
The unique identifier of the Activity that produced this change to the ApprovalWorkflow. May be empty for some system-initiated updates.
3384 3385 3386 |
# File 'lib/models/porcelain.rb', line 3384 def activity_id @activity_id end |
#approval_workflow ⇒ Object
The complete ApprovalWorkflow state at this time.
3386 3387 3388 |
# File 'lib/models/porcelain.rb', line 3386 def approval_workflow @approval_workflow end |
#deleted_at ⇒ Object
If this ApprovalWorkflow was deleted, the time it was deleted.
3388 3389 3390 |
# File 'lib/models/porcelain.rb', line 3388 def deleted_at @deleted_at end |
#timestamp ⇒ Object
The time at which the ApprovalWorkflow state was recorded.
3390 3391 3392 |
# File 'lib/models/porcelain.rb', line 3390 def @timestamp end |
Instance Method Details
#to_json(options = {}) ⇒ Object
3404 3405 3406 3407 3408 3409 3410 |
# File 'lib/models/porcelain.rb', line 3404 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |