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
The AppEnrollmentId of the application that imported this record.
-
#attachments ⇒ AttachmentModel
A collection of attachments linked to this record.
-
#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
A collection of custom fields linked to this record.
-
#custom_field_values ⇒ CustomFieldValueModel
A collection of custom fields linked to this record.
-
#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
A collection of notes linked to this record.
-
#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
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ContactModel
constructor
Initialize the ContactModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ContactModel
Initialize the ContactModel using the provided prototype
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 59 60 61 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 30 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
109 110 111 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 109 def address1 @address1 end |
#address2 ⇒ String
113 114 115 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 113 def address2 @address2 end |
#address3 ⇒ String
117 118 119 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 117 def address3 @address3 end |
#app_enrollment_id ⇒ Uuid
165 166 167 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 165 def app_enrollment_id @app_enrollment_id end |
#attachments ⇒ AttachmentModel
173 174 175 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 173 def @attachments end |
#city ⇒ String
121 122 123 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 121 def city @city end |
#company_id ⇒ Uuid
69 70 71 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 69 def company_id @company_id end |
#contact_code ⇒ String
85 86 87 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 85 def contact_code @contact_code end |
#contact_id ⇒ Uuid
65 66 67 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 65 def contact_id @contact_id end |
#contact_name ⇒ String
81 82 83 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 81 def contact_name @contact_name end |
#country_code ⇒ String
133 134 135 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 133 def country_code @country_code end |
#created ⇒ Date-time
149 150 151 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 149 def created @created end |
#created_user_id ⇒ Uuid
153 154 155 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 153 def created_user_id @created_user_id end |
#custom_field_definitions ⇒ CustomFieldDefinitionModel
177 178 179 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 177 def custom_field_definitions @custom_field_definitions end |
#custom_field_values ⇒ CustomFieldValueModel
181 182 183 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 181 def custom_field_values @custom_field_values end |
#email_address ⇒ Email
97 98 99 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 97 def email_address @email_address end |
#erp_key ⇒ String
77 78 79 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 77 def erp_key @erp_key end |
#fax ⇒ String
105 106 107 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 105 def fax @fax end |
#group_key ⇒ Uuid
73 74 75 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 73 def group_key @group_key end |
#is_active ⇒ Boolean
137 138 139 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 137 def is_active @is_active end |
#modified ⇒ Date-time
157 158 159 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 157 def modified @modified end |
#modified_user_id ⇒ Uuid
161 162 163 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 161 def modified_user_id @modified_user_id end |
#notes ⇒ NoteModel
169 170 171 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 169 def notes @notes end |
#phone ⇒ String
101 102 103 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 101 def phone @phone end |
#picture_url ⇒ Uri
145 146 147 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 145 def picture_url @picture_url end |
#postal_code ⇒ String
129 130 131 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 129 def postal_code @postal_code end |
#role_code ⇒ String
93 94 95 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 93 def role_code @role_code end |
#state_region ⇒ String
125 126 127 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 125 def state_region @state_region end |
#title ⇒ String
89 90 91 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 89 def title @title end |
#webpage_url ⇒ Uri
141 142 143 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 141 def webpage_url @webpage_url end |
Instance Method Details
#as_json(options = {}) ⇒ object
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 214 215 216 217 218 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 185 def as_json(={}) { '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, } end |
#to_json(*options) ⇒ String
222 223 224 |
# File 'lib/lockstep_sdk/models/contact_model.rb', line 222 def to_json(*) "[#{as_json(*).to_json(*)}]" end |