Class: LockstepSdk::ContactSyncModel
- Inherits:
-
Object
- Object
- LockstepSdk::ContactSyncModel
- Defined in:
- lib/lockstep_sdk/models/contact_sync_model.rb
Overview
The ContactSyncModel represents information coming into Lockstep from an external financial system or other enterprise resource planning system. To import data from an external system, convert your original data into the ContactSyncModel format and call the [Upload Sync File API](developer.lockstep.io/reference/post_api-v1-sync-zip). This API retrieves all of the data you uploaded in a compressed ZIP file and imports it into the Lockstep platform.
Once imported, this record will be available in the Lockstep API as a [ContactModel](developer.lockstep.io/docs/contactmodel).
For more information on writing your own connector, see [Connector Data](developer.lockstep.io/docs/connector-data).
Instance Attribute Summary collapse
-
#address1 ⇒ String
The mailing address information for this contact.
-
#address2 ⇒ String
The mailing address information for this contact.
-
#address3 ⇒ String
The mailing address information for this contact.
-
#city ⇒ String
The mailing address information for this contact.
-
#company_erp_key ⇒ String
The original primary key or unique ID of the company to which this contact belongs.
-
#contact_code ⇒ String
A friendly human-readable code that describes this Contact.
-
#contact_name ⇒ String
The name of the contact.
-
#country_code ⇒ String
The mailing address information for this contact.
-
#created ⇒ Date-time
If known, the date when this record was created according to the originating financial system in which this record is maintained.
-
#email_address ⇒ String
The email address of the contact.
-
#erp_key ⇒ String
This is the primary key of the Contact record.
-
#fax ⇒ String
The fax number of the contact.
-
#is_active ⇒ Boolean
True if this contact is considered “active”.
-
#modified ⇒ Date-time
If known, the date when this record was most recently modified according to the originating financial system in which this record is maintained.
-
#phone ⇒ String
The phone number of the contact.
-
#picture_url ⇒ String
If available, the URL of a photograph that shows this contact.
-
#postal_code ⇒ String
The mailing address information for this contact.
-
#role_code ⇒ String
The role code for the contact.
-
#state_region ⇒ String
The mailing address information for this contact.
-
#title ⇒ String
The title of the contact.
-
#webpage_url ⇒ String
A webpage URL for more information about this contact.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ContactSyncModel
constructor
Initialize the ContactSyncModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ContactSyncModel
Initialize the ContactSyncModel using the provided prototype
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 35 def initialize(params = {}) @erp_key = params.dig(:erp_key) @company_erp_key = params.dig(:company_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) @modified = params.dig(:modified) end |
Instance Attribute Details
#address1 ⇒ String
97 98 99 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 97 def address1 @address1 end |
#address2 ⇒ String
101 102 103 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 101 def address2 @address2 end |
#address3 ⇒ String
105 106 107 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 105 def address3 @address3 end |
#city ⇒ String
109 110 111 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 109 def city @city end |
#company_erp_key ⇒ String
65 66 67 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 65 def company_erp_key @company_erp_key end |
#contact_code ⇒ String
73 74 75 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 73 def contact_code @contact_code end |
#contact_name ⇒ String
69 70 71 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 69 def contact_name @contact_name end |
#country_code ⇒ String
121 122 123 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 121 def country_code @country_code end |
#created ⇒ Date-time
137 138 139 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 137 def created @created end |
#email_address ⇒ String
85 86 87 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 85 def email_address @email_address end |
#erp_key ⇒ String
61 62 63 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 61 def erp_key @erp_key end |
#fax ⇒ String
93 94 95 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 93 def fax @fax end |
#is_active ⇒ Boolean
125 126 127 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 125 def is_active @is_active end |
#modified ⇒ Date-time
141 142 143 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 141 def modified @modified end |
#phone ⇒ String
89 90 91 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 89 def phone @phone end |
#picture_url ⇒ String
133 134 135 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 133 def picture_url @picture_url end |
#postal_code ⇒ String
117 118 119 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 117 def postal_code @postal_code end |
#role_code ⇒ String
81 82 83 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 81 def role_code @role_code end |
#state_region ⇒ String
113 114 115 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 113 def state_region @state_region end |
#title ⇒ String
77 78 79 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 77 def title @title end |
#webpage_url ⇒ String
129 130 131 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 129 def webpage_url @webpage_url end |
Instance Method Details
#as_json(options = {}) ⇒ object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 145 def as_json(={}) { 'erpKey' => @erp_key, 'companyErpKey' => @company_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, 'modified' => @modified, } end |
#to_json(*options) ⇒ String
173 174 175 |
# File 'lib/lockstep_sdk/models/contact_sync_model.rb', line 173 def to_json(*) "[#{as_json(*).to_json(*)}]" end |