Class: LockstepSdk::ActivityModel
- Inherits:
-
Object
- Object
- LockstepSdk::ActivityModel
- Defined in:
- lib/lockstep_sdk/models/activity_model.rb
Overview
An Activity contains information about work being done on a specific accounting task. You can use Activities to track information about who has been assigned a specific task, the current status of the task, the name and description given for the particular task, the priority of the task, and any amounts collected, paid, or credited for the task.
Instance Attribute Summary collapse
-
#activity_description ⇒ String
A description of the activity.
-
#activity_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#activity_name ⇒ String
The name of the activity.
-
#activity_status ⇒ String
The status of the activity.
-
#activity_type_code ⇒ String
The type code of the activity.
-
#amount_collected ⇒ Double
Amount collected (if any) for the activity.
-
#amount_paid ⇒ Double
Amount paid (if any) for the activity.
-
#attachments ⇒ AttachmentModel
A collection of attachments linked to this record.
-
#company ⇒ CompanyModel
The company associated with the activity To retrieve this collection, specify
Companyin the “Include” parameter for your query. -
#company_id ⇒ Uuid
The ID of the company to which this activity belongs.
-
#created ⇒ Date-time
The date on which this activity was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created this activity.
-
#credit_given ⇒ Double
Credit given (if any) for the activity.
-
#custom_field_definitions ⇒ CustomFieldDefinitionModel
A collection of custom fields linked to this record.
-
#custom_field_values ⇒ CustomFieldValueModel
A collection of custom fields linked to this record.
-
#date_assigned ⇒ Date-time
The date the activity was assigned.
-
#date_closed ⇒ Date-time
The date the activity was closed.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#is_archived ⇒ Boolean
Activities may be archived when they should be hidden from the user.
-
#is_open ⇒ Boolean
True if this activity is currently “open”, which indicates that the activity is currently in progress.
-
#is_unread ⇒ Boolean
True if this activity is to be shown in an “unread” state.
-
#modified ⇒ Date-time
The date on which this activity was last modified.
-
#modified_user_id ⇒ Uuid
The ID of the user who last modified this activity.
-
#notes ⇒ NoteModel
A collection of notes linked to this record.
-
#priority ⇒ String
The priority of the activity.
-
#references ⇒ ActivityXRefModel
All references attached to this applied activity.
-
#snooze_until_date ⇒ Date-time
If this activity has been “snoozed”, this field will be non-null and will contain the date when the activity will be displayed.
-
#user_assigned_to ⇒ Uuid
The ID of the user the activity is assigned to.
-
#user_assigned_to_name ⇒ String
The name of the user the activity is assigned to.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ActivityModel
constructor
Initialize the ActivityModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ActivityModel
Initialize the ActivityModel using the provided prototype
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 28 def initialize(params = {}) @activity_id = params.dig(:activity_id) @group_key = params.dig(:group_key) @company_id = params.dig(:company_id) @activity_type_code = params.dig(:activity_type_code) @activity_name = params.dig(:activity_name) @activity_description = params.dig(:activity_description) @activity_status = params.dig(:activity_status) @is_open = params.dig(:is_open) @priority = params.dig(:priority) @user_assigned_to = params.dig(:user_assigned_to) @date_assigned = params.dig(:date_assigned) @date_closed = params.dig(:date_closed) @snooze_until_date = params.dig(:snooze_until_date) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) @amount_collected = params.dig(:amount_collected) @amount_paid = params.dig(:amount_paid) @credit_given = params.dig(:credit_given) @is_unread = params.dig(:is_unread) @is_archived = params.dig(:is_archived) @company = params.dig(:company) @user_assigned_to_name = params.dig(:user_assigned_to_name) @attachments = params.dig(:attachments) @notes = params.dig(:notes) @custom_field_definitions = params.dig(:custom_field_definitions) @custom_field_values = params.dig(:custom_field_values) @references = params.dig(:references) end |
Instance Attribute Details
#activity_description ⇒ String
Returns A description of the activity. This field contains more detailed text about the activity and can be lengthy.
82 83 84 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 82 def activity_description @activity_description end |
#activity_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
62 63 64 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 62 def activity_id @activity_id end |
#activity_name ⇒ String
Returns The name of the activity. The name is a short name provided by the person who created the activity that can be displayed in a list.
78 79 80 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 78 def activity_name @activity_name end |
#activity_status ⇒ String
Returns The status of the activity.
86 87 88 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 86 def activity_status @activity_status end |
#activity_type_code ⇒ String
Returns The type code of the activity.
74 75 76 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 74 def activity_type_code @activity_type_code end |
#amount_collected ⇒ Double
Returns Amount collected (if any) for the activity.
130 131 132 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 130 def amount_collected @amount_collected end |
#amount_paid ⇒ Double
Returns Amount paid (if any) for the activity.
134 135 136 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 134 def amount_paid @amount_paid end |
#attachments ⇒ AttachmentModel
Returns A collection of attachments linked to this record. To retrieve this collection, specify Attachments in the include parameter when retrieving data. To create an attachment, use the [Upload Attachment](developer.lockstep.io/reference/post_api-v1-attachments) endpoint with the TableKey to Activity and the ObjectKey set to the ActivityId for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
158 159 160 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 158 def @attachments end |
#company ⇒ CompanyModel
Returns The company associated with the activity To retrieve this collection, specify Company in the “Include” parameter for your query.
150 151 152 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 150 def company @company end |
#company_id ⇒ Uuid
Returns The ID of the company to which this activity belongs.
70 71 72 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 70 def company_id @company_id end |
#created ⇒ Date-time
Returns The date on which this activity was created.
114 115 116 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 114 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created this activity.
118 119 120 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 118 def created_user_id @created_user_id end |
#credit_given ⇒ Double
Returns Credit given (if any) for the activity.
138 139 140 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 138 def credit_given @credit_given end |
#custom_field_definitions ⇒ CustomFieldDefinitionModel
Returns A collection of custom fields linked to this record. To retrieve this collection, specify CustomFieldDefinitions in the include parameter when retrieving data. To create a custom field, use the [Create Custom Field](developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the TableKey to Activity and the ObjectKey set to the ActivityId for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
166 167 168 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 166 def custom_field_definitions @custom_field_definitions end |
#custom_field_values ⇒ CustomFieldValueModel
Returns A collection of custom fields linked to this record. To retrieve this collection, specify CustomFieldValues in the include parameter when retrieving data. To create a custom field, use the [Create Custom Field](developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the TableKey to Activity and the ObjectKey set to the ActivityId for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
170 171 172 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 170 def custom_field_values @custom_field_values end |
#date_assigned ⇒ Date-time
Returns The date the activity was assigned.
102 103 104 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 102 def date_assigned @date_assigned end |
#date_closed ⇒ Date-time
Returns The date the activity was closed.
106 107 108 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 106 def date_closed @date_closed 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).
66 67 68 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 66 def group_key @group_key end |
#is_archived ⇒ Boolean
Returns Activities may be archived when they should be hidden from the user. When this flag is true, this activity should be hidden.
146 147 148 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 146 def is_archived @is_archived end |
#is_open ⇒ Boolean
Returns True if this activity is currently “open”, which indicates that the activity is currently in progress.
90 91 92 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 90 def is_open @is_open end |
#is_unread ⇒ Boolean
Returns True if this activity is to be shown in an “unread” state. When an activity is read by a person it is assigned to, this flag is set to false.
142 143 144 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 142 def is_unread @is_unread end |
#modified ⇒ Date-time
Returns The date on which this activity was last modified.
122 123 124 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 122 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID of the user who last modified this activity.
126 127 128 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 126 def modified_user_id @modified_user_id end |
#notes ⇒ NoteModel
Returns A collection of notes linked to this record. To retrieve this collection, specify Notes in the include parameter when retrieving data. To create a note, use the [Create Note](developer.lockstep.io/reference/post_api-v1-notes) endpoint with the TableKey to Activity and the ObjectKey set to the ActivityId for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
162 163 164 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 162 def notes @notes end |
#priority ⇒ String
Returns The priority of the activity.
94 95 96 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 94 def priority @priority end |
#references ⇒ ActivityXRefModel
Returns All references attached to this applied activity. To retrieve this collection, specify References in the “Include” parameter for your query.
174 175 176 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 174 def references @references end |
#snooze_until_date ⇒ Date-time
Returns If this activity has been “snoozed”, this field will be non-null and will contain the date when the activity will be displayed. Until that date arrives, the activity will remain hidden.
110 111 112 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 110 def snooze_until_date @snooze_until_date end |
#user_assigned_to ⇒ Uuid
Returns The ID of the user the activity is assigned to.
98 99 100 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 98 def user_assigned_to @user_assigned_to end |
#user_assigned_to_name ⇒ String
Returns The name of the user the activity is assigned to.
154 155 156 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 154 def user_assigned_to_name @user_assigned_to_name end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 178 def as_json(={}) { 'activityId' => @activity_id, 'groupKey' => @group_key, 'companyId' => @company_id, 'activityTypeCode' => @activity_type_code, 'activityName' => @activity_name, 'activityDescription' => @activity_description, 'activityStatus' => @activity_status, 'isOpen' => @is_open, 'priority' => @priority, 'userAssignedTo' => @user_assigned_to, 'dateAssigned' => @date_assigned, 'dateClosed' => @date_closed, 'snoozeUntilDate' => @snooze_until_date, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'amountCollected' => @amount_collected, 'amountPaid' => @amount_paid, 'creditGiven' => @credit_given, 'isUnread' => @is_unread, 'isArchived' => @is_archived, 'company' => @company, 'userAssignedToName' => @user_assigned_to_name, 'attachments' => @attachments, 'notes' => @notes, 'customFieldDefinitions' => @custom_field_definitions, 'customFieldValues' => @custom_field_values, 'references' => @references, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
214 215 216 |
# File 'lib/lockstep_sdk/models/activity_model.rb', line 214 def to_json(*) "[#{as_json(*).to_json(*)}]" end |