Class: LockstepSdk::ActivityModel

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ActivityModel

Initialize the ActivityModel using the provided prototype



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
59
60
61
# File 'lib/lockstep_sdk/models/activity_model.rb', line 31

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_descriptionString

Returns A description of the activity. This field contains more detailed text about the activity and can be lengthy.

Returns:

  • (String)

    A description of the activity. This field contains more detailed text about the activity and can be lengthy.



85
86
87
# File 'lib/lockstep_sdk/models/activity_model.rb', line 85

def activity_description
  @activity_description
end

#activity_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.

Returns:

  • (Uuid)

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.



65
66
67
# File 'lib/lockstep_sdk/models/activity_model.rb', line 65

def activity_id
  @activity_id
end

#activity_nameString

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.

Returns:

  • (String)

    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.



81
82
83
# File 'lib/lockstep_sdk/models/activity_model.rb', line 81

def activity_name
  @activity_name
end

#activity_statusString

Returns The status of the activity.

Returns:

  • (String)

    The status of the activity.



89
90
91
# File 'lib/lockstep_sdk/models/activity_model.rb', line 89

def activity_status
  @activity_status
end

#activity_type_codeString

Returns The type code of the activity.

Returns:

  • (String)

    The type code of the activity



77
78
79
# File 'lib/lockstep_sdk/models/activity_model.rb', line 77

def activity_type_code
  @activity_type_code
end

#amount_collectedDouble

Returns Amount collected (if any) for the activity.

Returns:

  • (Double)

    Amount collected (if any) for the activity.



133
134
135
# File 'lib/lockstep_sdk/models/activity_model.rb', line 133

def amount_collected
  @amount_collected
end

#amount_paidDouble

Returns Amount paid (if any) for the activity.

Returns:

  • (Double)

    Amount paid (if any) for the activity.



137
138
139
# File 'lib/lockstep_sdk/models/activity_model.rb', line 137

def amount_paid
  @amount_paid
end

#attachmentsAttachmentModel

Returns All attachments attached to applied activity. To retrieve this collection, specify `Attachments` in the “Include” parameter for your query.

Returns:

  • (AttachmentModel)

    All attachments attached to applied activity. To retrieve this collection, specify `Attachments` in the “Include” parameter for your query.



161
162
163
# File 'lib/lockstep_sdk/models/activity_model.rb', line 161

def attachments
  @attachments
end

#companyCompanyModel

Returns The company associated with the activity To retrieve this collection, specify `Company` in the “Include” parameter for your query.

Returns:

  • (CompanyModel)

    The company associated with the activity To retrieve this collection, specify `Company` in the “Include” parameter for your query.



153
154
155
# File 'lib/lockstep_sdk/models/activity_model.rb', line 153

def company
  @company
end

#company_idUuid

Returns The ID of the company to which this activity belongs.

Returns:

  • (Uuid)

    The ID of the company to which this activity belongs.



73
74
75
# File 'lib/lockstep_sdk/models/activity_model.rb', line 73

def company_id
  @company_id
end

#createdDate-time

Returns The date on which this activity was created.

Returns:

  • (Date-time)

    The date on which this activity was created.



117
118
119
# File 'lib/lockstep_sdk/models/activity_model.rb', line 117

def created
  @created
end

#created_user_idUuid

Returns The ID of the user who created this activity.

Returns:

  • (Uuid)

    The ID of the user who created this activity.



121
122
123
# File 'lib/lockstep_sdk/models/activity_model.rb', line 121

def created_user_id
  @created_user_id
end

#credit_givenDouble

Returns Credit given (if any) for the activity.

Returns:

  • (Double)

    Credit given (if any) for the activity.



141
142
143
# File 'lib/lockstep_sdk/models/activity_model.rb', line 141

def credit_given
  @credit_given
end

#custom_field_definitionsCustomFieldDefinitionModel

Returns All definitions attached to this applied activity. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.

Returns:

  • (CustomFieldDefinitionModel)

    All definitions attached to this applied activity. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.



169
170
171
# File 'lib/lockstep_sdk/models/activity_model.rb', line 169

def custom_field_definitions
  @custom_field_definitions
end

#custom_field_valuesCustomFieldValueModel

Returns All values attached to this activity. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.

Returns:

  • (CustomFieldValueModel)

    All values attached to this activity. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.



173
174
175
# File 'lib/lockstep_sdk/models/activity_model.rb', line 173

def custom_field_values
  @custom_field_values
end

#date_assignedDate-time

Returns The date the activity was assigned.

Returns:

  • (Date-time)

    The date the activity was assigned.



105
106
107
# File 'lib/lockstep_sdk/models/activity_model.rb', line 105

def date_assigned
  @date_assigned
end

#date_closedDate-time

Returns The date the activity was closed.

Returns:

  • (Date-time)

    The date the activity was closed.



109
110
111
# File 'lib/lockstep_sdk/models/activity_model.rb', line 109

def date_closed
  @date_closed
end

#group_keyUuid

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).

Returns:

  • (Uuid)

    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).



69
70
71
# File 'lib/lockstep_sdk/models/activity_model.rb', line 69

def group_key
  @group_key
end

#is_archivedBoolean

Returns Activities may be archived when they should be hidden from the user. When this flag is true, this activity should be hidden.

Returns:

  • (Boolean)

    Activities may be archived when they should be hidden from the user. When this flag is true, this activity should be hidden.



149
150
151
# File 'lib/lockstep_sdk/models/activity_model.rb', line 149

def is_archived
  @is_archived
end

#is_openBoolean

Returns True if this activity is currently “open”, which indicates that the activitiy is currently in progress.

Returns:

  • (Boolean)

    True if this activity is currently “open”, which indicates that the activitiy is currently in progress.



93
94
95
# File 'lib/lockstep_sdk/models/activity_model.rb', line 93

def is_open
  @is_open
end

#is_unreadBoolean

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.

Returns:

  • (Boolean)

    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.



145
146
147
# File 'lib/lockstep_sdk/models/activity_model.rb', line 145

def is_unread
  @is_unread
end

#modifiedDate-time

Returns The date on which this activity was last modified.

Returns:

  • (Date-time)

    The date on which this activity was last modified.



125
126
127
# File 'lib/lockstep_sdk/models/activity_model.rb', line 125

def modified
  @modified
end

#modified_user_idUuid

Returns The ID of the user who last modified this activity.

Returns:

  • (Uuid)

    The ID of the user who last modified this activity.



129
130
131
# File 'lib/lockstep_sdk/models/activity_model.rb', line 129

def modified_user_id
  @modified_user_id
end

#notesNoteModel

Returns All notes attached to this applied activity. To retrieve this collection, specify `Notes` in the “Include” parameter for your query.

Returns:

  • (NoteModel)

    All notes attached to this applied activity. To retrieve this collection, specify `Notes` in the “Include” parameter for your query.



165
166
167
# File 'lib/lockstep_sdk/models/activity_model.rb', line 165

def notes
  @notes
end

#priorityString

Returns The priority of the activity.

Returns:

  • (String)

    The priority of the activity.



97
98
99
# File 'lib/lockstep_sdk/models/activity_model.rb', line 97

def priority
  @priority
end

#referencesActivityXRefModel

Returns All references attached to this applied activity. To retrieve this collection, specify `References` in the “Include” parameter for your query.

Returns:

  • (ActivityXRefModel)

    All references attached to this applied activity. To retrieve this collection, specify `References` in the “Include” parameter for your query.



177
178
179
# File 'lib/lockstep_sdk/models/activity_model.rb', line 177

def references
  @references
end

#snooze_until_dateDate-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.

Returns:

  • (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. Until that date arrives, the activity will remain hidden.



113
114
115
# File 'lib/lockstep_sdk/models/activity_model.rb', line 113

def snooze_until_date
  @snooze_until_date
end

#user_assigned_toUuid

Returns The ID of the user the activity is assigned to.

Returns:

  • (Uuid)

    The ID of the user the activity is assigned to.



101
102
103
# File 'lib/lockstep_sdk/models/activity_model.rb', line 101

def user_assigned_to
  @user_assigned_to
end

#user_assigned_to_nameString

Returns The name of the user the activity is assigned to.

Returns:

  • (String)

    The name of the user the activity is assigned to



157
158
159
# File 'lib/lockstep_sdk/models/activity_model.rb', line 157

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.

Returns:

  • (object)

    This object as a JSON key-value structure



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
211
212
213
# File 'lib/lockstep_sdk/models/activity_model.rb', line 181

def as_json(options={})
    {
        '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.

Returns:

  • (String)

    This object converted to a JSON string



217
218
219
# File 'lib/lockstep_sdk/models/activity_model.rb', line 217

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end