Class: LockstepSdk::ContactModel
- Inherits:
-
Object
- Object
- LockstepSdk::ContactModel
- Defined in:
- lib/lockstep_sdk/models/contact_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.
Instance Attribute Summary collapse
-
#address1 ⇒ String
The first line of the address.
-
#address2 ⇒ String
The second line of the address.
-
#address3 ⇒ String
The third line of the address.
-
#app_enrollment_id ⇒ Uuid
AppEnrollmentId for this record; used for mapping purposes.
-
#attachments ⇒ AttachmentModel
All attachments attached to this company.
-
#city ⇒ String
The city of the address.
-
#company_id ⇒ Uuid
The ID of the company to which this contact belongs.
-
#contact_code ⇒ String
A friendly human-readable code that describes this Contact.
-
#contact_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#contact_name ⇒ String
The name of the contact.
-
#country_code ⇒ String
The two character country code of the address.
-
#created ⇒ Date-time
The date on which this record was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created this contact.
-
#custom_field_definitions ⇒ CustomFieldDefinitionModel
All definitions attached to this contact.
-
#custom_field_values ⇒ CustomFieldValueModel
All values attached to this contact.
-
#email_address ⇒ Email
The email address of the contact.
-
#erp_key ⇒ String
The unique ID of this record as it was known in its originating financial system.
-
#fax ⇒ String
The fax number of the contact.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#is_active ⇒ Boolean
Flag indicating if the contact is active.
-
#modified ⇒ Date-time
The date on which this record was last modified.
-
#modified_user_id ⇒ Uuid
The ID of the user who last modified this contact.
-
#notes ⇒ NoteModel
All notes attached to this company.
-
#phone ⇒ String
The phone number of the contact.
-
#picture_url ⇒ Uri
The picture/avatar url of the contact.
-
#postal_code ⇒ String
The postal/zip code of the address.
-
#role_code ⇒ String
The role code for the contact.
-
#state_region ⇒ String
The state/region of the address.
-
#title ⇒ String
The title of the contact.
-
#webpage_url ⇒ Uri
The webpage url of the contact.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ContactModel
constructor
Initialize the ContactModel using the provided prototype.
Constructor Details
#initialize(params = {}) ⇒ ContactModel
Initialize the ContactModel using the provided prototype
27 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/contact_model.rb', line 27 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) end |
Instance Attribute Details
#address1 ⇒ String
Returns The first line of the address.
83 84 85 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 83 def address1 @address1 end |
#address2 ⇒ String
Returns The second line of the address.
85 86 87 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 85 def address2 @address2 end |
#address3 ⇒ String
Returns The third line of the address.
87 88 89 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 87 def address3 @address3 end |
#app_enrollment_id ⇒ Uuid
Returns AppEnrollmentId for this record; used for mapping purposes.
111 112 113 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 111 def app_enrollment_id @app_enrollment_id end |
#attachments ⇒ AttachmentModel
Returns All attachments attached to this company. To retrieve this collection, specify `Attachments` in the “Include” parameter for your query.
115 116 117 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 115 def @attachments end |
#city ⇒ String
Returns The city of the address.
89 90 91 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 89 def city @city end |
#company_id ⇒ Uuid
Returns The ID of the company to which this contact belongs.
63 64 65 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 63 def company_id @company_id end |
#contact_code ⇒ String
Returns A friendly human-readable code that describes this Contact.
71 72 73 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 71 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`.
61 62 63 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 61 def contact_id @contact_id end |
#contact_name ⇒ String
Returns The name of the contact.
69 70 71 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 69 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/countries data set.
95 96 97 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 95 def country_code @country_code end |
#created ⇒ Date-time
Returns The date on which this record was created.
103 104 105 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 103 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created this contact.
105 106 107 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 105 def created_user_id @created_user_id end |
#custom_field_definitions ⇒ CustomFieldDefinitionModel
Returns All definitions attached to this contact. To retrieve this collection, specify `CustomFieldValues` in the “Include” parameter for your query.
117 118 119 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 117 def custom_field_definitions @custom_field_definitions end |
#custom_field_values ⇒ CustomFieldValueModel
Returns All values attached to this contact. To retrieve this collection, specify `Attachments` in the “Include” parameter for your query.
119 120 121 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 119 def custom_field_values @custom_field_values end |
#email_address ⇒ Email
Returns The email address of the contact.
77 78 79 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 77 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 company 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](developer.lockstep.io/docs/identity-columns).
67 68 69 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 67 def erp_key @erp_key end |
#fax ⇒ String
Returns The fax number of the contact.
81 82 83 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 81 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](developer.lockstep.io/docs/accounts-and-groupkeys).
65 66 67 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 65 def group_key @group_key end |
#is_active ⇒ Boolean
Returns Flag indicating if the contact is active.
97 98 99 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 97 def is_active @is_active end |
#modified ⇒ Date-time
Returns The date on which this record was last modified.
107 108 109 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 107 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID of the user who last modified this contact.
109 110 111 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 109 def modified_user_id @modified_user_id end |
#notes ⇒ NoteModel
Returns All notes attached to this company. To retrieve this collection, specify `Notes` in the “Include” parameter for your query.
113 114 115 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 113 def notes @notes end |
#phone ⇒ String
Returns The phone number of the contact.
79 80 81 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 79 def phone @phone end |
#picture_url ⇒ Uri
Returns The picture/avatar url of the contact.
101 102 103 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 101 def picture_url @picture_url end |
#postal_code ⇒ String
Returns The postal/zip code of the address.
93 94 95 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 93 def postal_code @postal_code end |
#role_code ⇒ String
Returns The role code for the contact.
75 76 77 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 75 def role_code @role_code end |
#state_region ⇒ String
Returns The state/region of the address.
91 92 93 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 91 def state_region @state_region end |
#title ⇒ String
Returns The title of the contact.
73 74 75 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 73 def title @title end |
#webpage_url ⇒ Uri
Returns The webpage url of the contact.
99 100 101 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 99 def webpage_url @webpage_url end |