Class: LockstepSdk::ActivityStreamItemModel
- Inherits:
-
Object
- Object
- LockstepSdk::ActivityStreamItemModel
- Defined in:
- lib/lockstep_sdk/models/activity_stream_item_model.rb
Overview
Represents an item belonging to the activity stream.
Instance Attribute Summary collapse
-
#activity_stream_type ⇒ String
The type code of the activity stream item.
-
#created ⇒ Date-time
The date on which this activity stream item was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created this activity.
-
#from_contact_name ⇒ String
The name of the contact sending the activity otherwise null.
-
#from_email_address ⇒ String
The sender's email address if activity stream item is an Email.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#object_key ⇒ Uuid
The object key of the activity stream item.
-
#text_value ⇒ String
The text body description for this Activity Stream Item.
-
#to_contact_name ⇒ String
The name of the contact sending the activity otherwise null.
-
#to_email_address ⇒ String
The recipient's email address if activity stream item is an Email.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ActivityStreamItemModel
constructor
Initialize the ActivityStreamItemModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ActivityStreamItemModel
Initialize the ActivityStreamItemModel using the provided prototype
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 28 def initialize(params = {}) @object_key = params.dig(:object_key) @activity_stream_type = params.dig(:activity_stream_type) @text_value = params.dig(:text_value) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @group_key = params.dig(:group_key) @from_email_address = params.dig(:from_email_address) @to_email_address = params.dig(:to_email_address) @from_contact_name = params.dig(:from_contact_name) @to_contact_name = params.dig(:to_contact_name) end |
Instance Attribute Details
#activity_stream_type ⇒ String
Returns The type code of the activity stream item.
47 48 49 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 47 def activity_stream_type @activity_stream_type end |
#created ⇒ Date-time
Returns The date on which this activity stream item was created.
55 56 57 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 55 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created this activity.
59 60 61 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 59 def created_user_id @created_user_id end |
#from_contact_name ⇒ String
Returns The name of the contact sending the activity otherwise null.
75 76 77 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 75 def from_contact_name @from_contact_name end |
#from_email_address ⇒ String
Returns The sender's email address if activity stream item is an Email.
67 68 69 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 67 def from_email_address @from_email_address end |
#group_key ⇒ Uuid
Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).
63 64 65 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 63 def group_key @group_key end |
#object_key ⇒ Uuid
Returns The object key of the activity stream item.
43 44 45 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 43 def object_key @object_key end |
#text_value ⇒ String
Returns The text body description for this Activity Stream Item.
51 52 53 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 51 def text_value @text_value end |
#to_contact_name ⇒ String
Returns The name of the contact sending the activity otherwise null.
79 80 81 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 79 def to_contact_name @to_contact_name end |
#to_email_address ⇒ String
Returns The recipient's email address if activity stream item is an Email.
71 72 73 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 71 def to_email_address @to_email_address end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 83 def as_json(={}) { 'objectKey' => @object_key, 'activityStreamType' => @activity_stream_type, 'textValue' => @text_value, 'created' => @created, 'createdUserId' => @created_user_id, 'groupKey' => @group_key, 'fromEmailAddress' => @from_email_address, 'toEmailAddress' => @to_email_address, 'fromContactName' => @from_contact_name, 'toContactName' => @to_contact_name, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
100 101 102 |
# File 'lib/lockstep_sdk/models/activity_stream_item_model.rb', line 100 def to_json(*) "[#{as_json(*).to_json(*)}]" end |