Class: LockstepSdk::AccountingProfileContactResultModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb

Overview

A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices.

An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. These Contacts are secondary contacts to the primary that is on the profile.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ AccountingProfileContactResultModel

Initialize the AccountingProfileContactResultModel 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
62
63
64
65
66
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 31

def initialize(params = {})
    @contact_id = params.dig(:contact_id)
    @company_id = params.dig(:company_id)
    @group_key = params.dig(:group_key)
    @erp_key = params.dig(:erp_key)
    @contact_name = params.dig(:contact_name)
    @contact_code = params.dig(:contact_code)
    @title = params.dig(:title)
    @role_code = params.dig(:role_code)
    @email_address = params.dig(:email_address)
    @phone = params.dig(:phone)
    @fax = params.dig(:fax)
    @address1 = params.dig(:address1)
    @address2 = params.dig(:address2)
    @address3 = params.dig(:address3)
    @city = params.dig(:city)
    @state_region = params.dig(:state_region)
    @postal_code = params.dig(:postal_code)
    @country_code = params.dig(:country_code)
    @is_active = params.dig(:is_active)
    @webpage_url = params.dig(:webpage_url)
    @picture_url = params.dig(:picture_url)
    @created = params.dig(:created)
    @created_user_id = params.dig(:created_user_id)
    @modified = params.dig(:modified)
    @modified_user_id = params.dig(:modified_user_id)
    @app_enrollment_id = params.dig(:app_enrollment_id)
    @notes = params.dig(:notes)
    @attachments = params.dig(:attachments)
    @custom_field_definitions = params.dig(:custom_field_definitions)
    @custom_field_values = params.dig(:custom_field_values)
    @is_primary = params.dig(:is_primary)
    @accounting_profile_id = params.dig(:accounting_profile_id)
    @accounting_profile_contact_id = params.dig(:accounting_profile_contact_id)
    @name = params.dig(:name)
end

Instance Attribute Details

#accounting_profile_contact_id ⇒ Uuid

Returns The ID of the accounting profile contact this contact matches.

Returns:

  • (Uuid) —

    The ID of the accounting profile contact this contact matches.



198
199
200
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 198

def accounting_profile_contact_id
  @accounting_profile_contact_id
end

#accounting_profile_id ⇒ Uuid

Returns The ID of the profile this contact belongs to.

Returns:

  • (Uuid) —

    The ID of the profile this contact belongs to.



194
195
196
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 194

def accounting_profile_id
  @accounting_profile_id
end

#address1 ⇒ String

Returns The first line of the address.

Returns:

  • (String) —

    The first line of the address.



114
115
116
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 114

def address1
  @address1
end

#address2 ⇒ String

Returns The second line of the address.

Returns:

  • (String) —

    The second line of the address.



118
119
120
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 118

def address2
  @address2
end

#address3 ⇒ String

Returns The third line of the address.

Returns:

  • (String) —

    The third line of the address.



122
123
124
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 122

def address3
  @address3
end

#app_enrollment_id ⇒ Uuid

Returns The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.

Returns:

  • (Uuid) —

    The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.



170
171
172
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 170

def app_enrollment_id
  @app_enrollment_id
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 endpoint with the TableKey to Contact and the ObjectKey set to the ContactId for this record. For more information on extensibility, see linking extensible metadata to objects.

Returns:

  • (AttachmentModel) —

    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 endpoint with the TableKey to Contact and the ObjectKey set to the ContactId for this record. For more information on extensibility, see linking extensible metadata to objects.



178
179
180
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 178

def attachments
  @attachments
end

#city ⇒ String

Returns The city of the address.

Returns:

  • (String) —

    The city of the address.



126
127
128
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 126

def city
  @city
end

#company_id ⇒ Uuid

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

Returns:

  • (Uuid) —

    The ID of the company to which this contact belongs.



74
75
76
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 74

def company_id
  @company_id
end

#contact_code ⇒ String

Returns A friendly human-readable code that describes this Contact.

Returns:

  • (String) —

    A friendly human-readable code that describes this Contact.



90
91
92
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 90

def contact_code
  @contact_code
end

#contact_id ⇒ Uuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. For the ID of this record in its originating financial system, see ErpKey.

Returns:

  • (Uuid) —

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform. For the ID of this record in its originating financial system, see ErpKey.



70
71
72
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 70

def contact_id
  @contact_id
end

#contact_name ⇒ String

Returns The name of the contact.

Returns:

  • (String) —

    The name of the contact.



86
87
88
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 86

def contact_name
  @contact_name
end

#country_code ⇒ String

Returns The two character country code of the address. This will be validated by the /api/v1/definitions/countries data set.

Returns:

  • (String) —

    The two character country code of the address. This will be validated by the /api/v1/definitions/countries data set



138
139
140
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 138

def country_code
  @country_code
end

#created ⇒ Date-time

Returns The date on which this record was created.

Returns:

  • (Date-time) —

    The date on which this record was created.



154
155
156
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 154

def created
  @created
end

#created_user_id ⇒ Uuid

Returns The ID of the user who created this contact.

Returns:

  • (Uuid) —

    The ID of the user who created this contact.



158
159
160
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 158

def created_user_id
  @created_user_id
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 endpoint with the TableKey to Contact and the ObjectKey set to the ContactId for this record. For more information on extensibility, see linking extensible metadata to objects.

Returns:

  • (CustomFieldDefinitionModel) —

    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 endpoint with the TableKey to Contact and the ObjectKey set to the ContactId for this record. For more information on extensibility, see linking extensible metadata to objects.



182
183
184
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 182

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 endpoint with the TableKey to Contact and the ObjectKey set to the ContactId for this record. For more information on extensibility, see linking extensible metadata to objects.

Returns:

  • (CustomFieldValueModel) —

    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 endpoint with the TableKey to Contact and the ObjectKey set to the ContactId for this record. For more information on extensibility, see linking extensible metadata to objects.



186
187
188
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 186

def custom_field_values
  @custom_field_values
end

#email_address ⇒ Email

Returns The email address of the contact.

Returns:

  • (Email) —

    The email address of the contact.



102
103
104
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 102

def email_address
  @email_address
end

#erp_key ⇒ String

Returns The unique ID of this record as it was known in its originating financial system. If this contact record was imported from a financial system, it will have the value ErpKey set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be null. For more information, see Identity Columns.

Returns:

  • (String) —

    The unique ID of this record as it was known in its originating financial system. If this contact record was imported from a financial system, it will have the value ErpKey set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be null. For more information, see Identity Columns.



82
83
84
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 82

def erp_key
  @erp_key
end

#fax ⇒ String

Returns The fax number of the contact.

Returns:

  • (String) —

    The fax number of the contact.



110
111
112
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 110

def fax
  @fax
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.

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.



78
79
80
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 78

def group_key
  @group_key
end

#is_active ⇒ Boolean

Returns Flag indicating if the contact is active.

Returns:

  • (Boolean) —

    Flag indicating if the contact is active.



142
143
144
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 142

def is_active
  @is_active
end

#is_primary ⇒ Boolean

Returns Determines whether the contact is primary or secondary.

Returns:

  • (Boolean) —

    Determines whether the contact is primary or secondary.



190
191
192
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 190

def is_primary
  @is_primary
end

#modified ⇒ Date-time

Returns The date on which this record was last modified.

Returns:

  • (Date-time) —

    The date on which this record was last modified.



162
163
164
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 162

def modified
  @modified
end

#modified_user_id ⇒ Uuid

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

Returns:

  • (Uuid) —

    The ID of the user who last modified this contact.



166
167
168
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 166

def modified_user_id
  @modified_user_id
end

#name ⇒ String

Returns The Name of the profile this contact belongs to.

Returns:

  • (String) —

    The Name of the profile this contact belongs to.



202
203
204
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 202

def name
  @name
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 endpoint with the TableKey to Contact and the ObjectKey set to the ContactId for this record. For more information on extensibility, see linking extensible metadata to objects.

Returns:

  • (NoteModel) —

    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 endpoint with the TableKey to Contact and the ObjectKey set to the ContactId for this record. For more information on extensibility, see linking extensible metadata to objects.



174
175
176
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 174

def notes
  @notes
end

#phone ⇒ String

Returns The phone number of the contact.

Returns:

  • (String) —

    The phone number of the contact.



106
107
108
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 106

def phone
  @phone
end

#picture_url ⇒ Uri

Returns The picture/avatar url of the contact.

Returns:

  • (Uri) —

    The picture/avatar url of the contact.



150
151
152
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 150

def picture_url
  @picture_url
end

#postal_code ⇒ String

Returns The postal/zip code of the address.

Returns:

  • (String) —

    The postal/zip code of the address.



134
135
136
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 134

def postal_code
  @postal_code
end

#role_code ⇒ String

Returns The role code for the contact.

Returns:

  • (String) —

    The role code for the contact.



98
99
100
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 98

def role_code
  @role_code
end

#state_region ⇒ String

Returns The state/region of the address.

Returns:

  • (String) —

    The state/region of the address.



130
131
132
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 130

def state_region
  @state_region
end

#title ⇒ String

Returns The title of the contact.

Returns:

  • (String) —

    The title of the contact.



94
95
96
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 94

def title
  @title
end

#webpage_url ⇒ Uri

Returns The webpage url of the contact.

Returns:

  • (Uri) —

    The webpage url of the contact.



146
147
148
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 146

def webpage_url
  @webpage_url
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



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 206

def as_json(options={})
    {
        'contactId' => @contact_id,
        'companyId' => @company_id,
        'groupKey' => @group_key,
        'erpKey' => @erp_key,
        'contactName' => @contact_name,
        'contactCode' => @contact_code,
        'title' => @title,
        'roleCode' => @role_code,
        'emailAddress' => @email_address,
        'phone' => @phone,
        'fax' => @fax,
        'address1' => @address1,
        'address2' => @address2,
        'address3' => @address3,
        'city' => @city,
        'stateRegion' => @state_region,
        'postalCode' => @postal_code,
        'countryCode' => @country_code,
        'isActive' => @is_active,
        'webpageUrl' => @webpage_url,
        'pictureUrl' => @picture_url,
        'created' => @created,
        'createdUserId' => @created_user_id,
        'modified' => @modified,
        'modifiedUserId' => @modified_user_id,
        'appEnrollmentId' => @app_enrollment_id,
        'notes' => @notes,
        'attachments' => @attachments,
        'customFieldDefinitions' => @custom_field_definitions,
        'customFieldValues' => @custom_field_values,
        'isPrimary' => @is_primary,
        'accountingProfileId' => @accounting_profile_id,
        'accountingProfileContactId' => @accounting_profile_contact_id,
        'name' => @name,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String) —

    This object converted to a JSON string



247
248
249
# File 'lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb', line 247

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