Class: LockstepSdk::CompanyModel
- Inherits:
-
Object
- Object
- LockstepSdk::CompanyModel
- Defined in:
- lib/lockstep_sdk/models/company_model.rb
Overview
A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label.
See [Vendors, Customers, and Companies](developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
Instance Attribute Summary collapse
-
#address1 ⇒ String
Address info.
-
#address2 ⇒ String
Address info.
-
#address3 ⇒ String
Address info.
-
#ap_email_address ⇒ Email
AP (Accounts Payable) Email Address.
-
#app_enrollment_id ⇒ Uuid
The AppEnrollmentId of the application that imported this record.
-
#ar_email_address ⇒ Email
AR (Accounts Receivable) Email Address.
-
#attachments ⇒ AttachmentModel
A collection of attachments linked to this record.
-
#city ⇒ String
Address info.
-
#company_classification_code_def_id ⇒ Uuid
Identifier for classification of this company.
-
#company_classification_code_definition ⇒ CodeDefinitionModel
Classification code definition for this company.
-
#company_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#company_logo_url ⇒ String
The URL of this company’s logo, if known.
-
#company_name ⇒ String
The short name of the company.
-
#company_type ⇒ String
This field indicates the type of company.
-
#contacts ⇒ ContactModel
All contacts attached to this company.
-
#country ⇒ String
Address info.
-
#created ⇒ Date-time
The date this company was created.
-
#created_user_id ⇒ Uuid
The ID of the user who created this company.
-
#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.
-
#default_currency_code ⇒ String
The default currency code used by this business entity.
-
#description ⇒ String
Description of the company.
-
#domain_name ⇒ String
For companies that use a custom domain name for their email system, this is the domain name used by this company.
-
#duns_number ⇒ String
Dun & Bradstreet Number.
-
#email_address ⇒ Email
Company Email Address.
-
#enterprise_id ⇒ Uuid
For convenience, this field indicates the top-level parent company.
-
#erp_key ⇒ String
The unique ID of this record as it was known in its originating financial system.
-
#fax_number ⇒ String
Fax number.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#invoices ⇒ Object
All invoices attached to this company.
-
#is_active ⇒ Boolean
This flag indicates whether the company is currently active.
-
#is_verified ⇒ Boolean
This flag indicates whether the company is verified.
-
#last_verified_date ⇒ Date-time
The date this company was last verified.
-
#linked_in_url_slug ⇒ String
Linkedin Url.
-
#modified ⇒ Date-time
The date this company was last modified.
-
#modified_user_id ⇒ Uuid
The ID of the user who last modified this company.
-
#modified_user_name ⇒ String
The name of the user who last modified this company.
-
#notes ⇒ NoteModel
A collection of notes linked to this record.
-
#parent_company_id ⇒ Uuid
If this business entity is part of an organization, this value is non-null and it is set to the ‘CompanyId` value of the parent company of this business entity.
-
#phone_number ⇒ String
Phone number.
-
#postal_code ⇒ String
Address info.
-
#preferred_delivery_method ⇒ String
Indicates the preferred invoice delivery method.
-
#primary_contact_id ⇒ Uuid
The Lockstep ‘ContactId` of the primary contact for this company.
-
#public_url_slug ⇒ String
The public url slug for the Company.
-
#service_fabric_company_id ⇒ Uuid
The unique ID of this record within Service Fabric.
-
#service_fabric_org_id ⇒ Uuid
The unique ID of the Service Fabric organisation to which this record belongs.
-
#state_of_incorporation ⇒ String
The state where the company was registered.
-
#state_region ⇒ String
Address info.
-
#state_tax_id ⇒ String
State Tax ID.
-
#tax_id ⇒ String
Federal Tax ID.
-
#time_zone ⇒ String
Time zone.
-
#view_box_settings ⇒ ViewBoxSettingsModel
View box settings for the company logo.
-
#website ⇒ String
Website URL for this company.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ CompanyModel
constructor
Initialize the CompanyModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ CompanyModel
Initialize the CompanyModel using the provided prototype
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 29 def initialize(params = {}) @company_id = params.dig(:company_id) @company_name = params.dig(:company_name) @erp_key = params.dig(:erp_key) @company_type = params.dig(:company_type) @parent_company_id = params.dig(:parent_company_id) @enterprise_id = params.dig(:enterprise_id) @group_key = params.dig(:group_key) @is_active = params.dig(:is_active) @default_currency_code = params.dig(:default_currency_code) @company_logo_url = params.dig(:company_logo_url) @primary_contact_id = params.dig(:primary_contact_id) @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 = params.dig(:country) @time_zone = params.dig(:time_zone) @phone_number = params.dig(:phone_number) @fax_number = params.dig(:fax_number) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) @modified_user_name = params.dig(:modified_user_name) @tax_id = params.dig(:tax_id) @duns_number = params.dig(:duns_number) @ap_email_address = params.dig(:ap_email_address) @ar_email_address = params.dig(:ar_email_address) @preferred_delivery_method = params.dig(:preferred_delivery_method) @domain_name = params.dig(:domain_name) @company_classification_code_def_id = params.dig(:company_classification_code_def_id) @description = params.dig(:description) @website = params.dig(:website) @app_enrollment_id = params.dig(:app_enrollment_id) @email_address = params.dig(:email_address) @public_url_slug = params.dig(:public_url_slug) @state_tax_id = params.dig(:state_tax_id) @state_of_incorporation = params.dig(:state_of_incorporation) @linked_in_url_slug = params.dig(:linked_in_url_slug) @is_verified = params.dig(:is_verified) @last_verified_date = params.dig(:last_verified_date) @view_box_settings = params.dig(:view_box_settings) @service_fabric_org_id = params.dig(:service_fabric_org_id) @service_fabric_company_id = params.dig(:service_fabric_company_id) @notes = params.dig(:notes) @attachments = params.dig(:attachments) @contacts = params.dig(:contacts) @invoices = params.dig(:invoices) @custom_field_definitions = params.dig(:custom_field_definitions) @custom_field_values = params.dig(:custom_field_values) @company_classification_code_definition = params.dig(:company_classification_code_definition) end |
Instance Attribute Details
#address1 ⇒ String
Returns Address info.
131 132 133 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 131 def address1 @address1 end |
#address2 ⇒ String
Returns Address info.
135 136 137 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 135 def address2 @address2 end |
#address3 ⇒ String
Returns Address info.
139 140 141 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 139 def address3 @address3 end |
#ap_email_address ⇒ Email
Returns AP (Accounts Payable) Email Address.
199 200 201 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 199 def ap_email_address @ap_email_address 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.
227 228 229 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 227 def app_enrollment_id @app_enrollment_id end |
#ar_email_address ⇒ Email
Returns AR (Accounts Receivable) Email Address.
203 204 205 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 203 def ar_email_address @ar_email_address 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](developer.lockstep.io/reference/post_api-v1-attachments) endpoint with the `TableKey` to `Company` and the `ObjectKey` set to the `CompanyId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
275 276 277 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 275 def @attachments end |
#city ⇒ String
Returns Address info.
143 144 145 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 143 def city @city end |
#company_classification_code_def_id ⇒ Uuid
Returns Identifier for classification of this company.
215 216 217 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 215 def company_classification_code_def_id @company_classification_code_def_id end |
#company_classification_code_definition ⇒ CodeDefinitionModel
Returns Classification code definition for this company. To retrieve this collection, specify ‘Classification` in the “Include” parameter for your query.
295 296 297 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 295 def company_classification_code_definition @company_classification_code_definition end |
#company_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`.
87 88 89 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 87 def company_id @company_id end |
#company_logo_url ⇒ String
Returns The URL of this company’s logo, if known.
123 124 125 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 123 def company_logo_url @company_logo_url end |
#company_name ⇒ String
Returns The short name of the company.
91 92 93 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 91 def company_name @company_name end |
#company_type ⇒ String
Returns This field indicates the type of company. It can be one of a limited number of values: Company, Customer, Group, Vendor, or Third Party. A company that represents both a customer and a vendor is identified as a CustomerVendor. * ‘Company` - This record represents a company that is part of the organization of the account holder. * `Customer` - This record represents a business entity that purchases things from the account holder. * `Group` - Only one record of type `GROUP` exists in each account. Contains your account profile. * `Vendor` - This record represents a business entity that sells things to the account holder. * `Third Party` - This record represents a business entity that is neither a customer nor vendor. * `CustomerVendor` - Both a customer and a vendor.
99 100 101 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 99 def company_type @company_type end |
#contacts ⇒ ContactModel
Returns All contacts attached to this company. To retrieve this collection, specify ‘Contacts` in the “Include” parameter for your query.
279 280 281 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 279 def contacts @contacts end |
#country ⇒ String
Returns Address info.
155 156 157 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 155 def country @country end |
#created ⇒ Date-time
Returns The date this company was created.
171 172 173 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 171 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created this company.
175 176 177 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 175 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](developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the `TableKey` to `Company` and the `ObjectKey` set to the `CompanyId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
287 288 289 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 287 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](developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the `TableKey` to `Company` and the `ObjectKey` set to the `CompanyId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
291 292 293 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 291 def custom_field_values @custom_field_values end |
#default_currency_code ⇒ String
Returns The default currency code used by this business entity. This value can be overridden for invoices in a different currency code. For a list of defined currency codes, see [Query Currencies](developer.lockstep.io/reference/get_api-v1-definitions-currencies).
119 120 121 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 119 def default_currency_code @default_currency_code end |
#description ⇒ String
Returns Description of the company.
219 220 221 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 219 def description @description end |
#domain_name ⇒ String
Returns For companies that use a custom domain name for their email system, this is the domain name used by this company. If this value is known, new emails that come in from this domain will be connected to this company.
211 212 213 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 211 def domain_name @domain_name end |
#duns_number ⇒ String
Returns Dun & Bradstreet Number.
195 196 197 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 195 def duns_number @duns_number end |
#email_address ⇒ Email
Returns Company Email Address.
231 232 233 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 231 def email_address @email_address end |
#enterprise_id ⇒ Uuid
Returns For convenience, this field indicates the top-level parent company. This can be used to jump directly to the top parent in complex organizational hierarchies.
107 108 109 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 107 def enterprise_id @enterprise_id 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).
95 96 97 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 95 def erp_key @erp_key end |
#fax_number ⇒ String
Returns Fax number.
167 168 169 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 167 def fax_number @fax_number 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).
111 112 113 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 111 def group_key @group_key end |
#invoices ⇒ Object
Returns All invoices attached to this company. To retrieve this collection, specify ‘Invoices` in the “Include” parameter for your query. For more information on Invoices, see [InvoiceModel](developer.lockstep.io/reference/get_api-v1-invoices-id).
283 284 285 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 283 def invoices @invoices end |
#is_active ⇒ Boolean
Returns This flag indicates whether the company is currently active. An inactive company should be hidden from the user interface but will still be available for querying.
115 116 117 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 115 def is_active @is_active end |
#is_verified ⇒ Boolean
Returns This flag indicates whether the company is verified.
251 252 253 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 251 def is_verified @is_verified end |
#last_verified_date ⇒ Date-time
Returns The date this company was last verified.
255 256 257 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 255 def last_verified_date @last_verified_date end |
#linked_in_url_slug ⇒ String
Returns Linkedin Url.
247 248 249 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 247 def linked_in_url_slug @linked_in_url_slug end |
#modified ⇒ Date-time
Returns The date this company was last modified.
179 180 181 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 179 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID of the user who last modified this company.
183 184 185 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 183 def modified_user_id @modified_user_id end |
#modified_user_name ⇒ String
Returns The name of the user who last modified this company.
187 188 189 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 187 def modified_user_name @modified_user_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](developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `Company` and the `ObjectKey` set to the `CompanyId` for this record. For more information on extensibility, see [linking extensible metadata to objects](developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
271 272 273 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 271 def notes @notes end |
#parent_company_id ⇒ Uuid
Returns If this business entity is part of an organization, this value is non-null and it is set to the ‘CompanyId` value of the parent company of this business entity. If this value is null, this business entity is a standalone.
103 104 105 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 103 def parent_company_id @parent_company_id end |
#phone_number ⇒ String
Returns Phone number.
163 164 165 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 163 def phone_number @phone_number end |
#postal_code ⇒ String
Returns Address info.
151 152 153 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 151 def postal_code @postal_code end |
#preferred_delivery_method ⇒ String
Returns Indicates the preferred invoice delivery method. Examples include Print, Email, Fax.
207 208 209 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 207 def preferred_delivery_method @preferred_delivery_method end |
#primary_contact_id ⇒ Uuid
Returns The Lockstep ‘ContactId` of the primary contact for this company.
127 128 129 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 127 def primary_contact_id @primary_contact_id end |
#public_url_slug ⇒ String
Returns The public url slug for the Company.
235 236 237 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 235 def public_url_slug @public_url_slug end |
#service_fabric_company_id ⇒ Uuid
Returns The unique ID of this record within Service Fabric.
267 268 269 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 267 def service_fabric_company_id @service_fabric_company_id end |
#service_fabric_org_id ⇒ Uuid
Returns The unique ID of the Service Fabric organisation to which this record belongs.
263 264 265 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 263 def service_fabric_org_id @service_fabric_org_id end |
#state_of_incorporation ⇒ String
Returns The state where the company was registered.
243 244 245 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 243 def state_of_incorporation @state_of_incorporation end |
#state_region ⇒ String
Returns Address info.
147 148 149 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 147 def state_region @state_region end |
#state_tax_id ⇒ String
Returns State Tax ID.
239 240 241 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 239 def state_tax_id @state_tax_id end |
#tax_id ⇒ String
Returns Federal Tax ID.
191 192 193 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 191 def tax_id @tax_id end |
#time_zone ⇒ String
Returns Time zone.
159 160 161 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 159 def time_zone @time_zone end |
#view_box_settings ⇒ ViewBoxSettingsModel
Returns View box settings for the company logo.
259 260 261 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 259 def view_box_settings @view_box_settings end |
#website ⇒ String
Returns Website URL for this company.
223 224 225 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 223 def website @website end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 299 def as_json(={}) { 'companyId' => @company_id, 'companyName' => @company_name, 'erpKey' => @erp_key, 'companyType' => @company_type, 'parentCompanyId' => @parent_company_id, 'enterpriseId' => @enterprise_id, 'groupKey' => @group_key, 'isActive' => @is_active, 'defaultCurrencyCode' => @default_currency_code, 'companyLogoUrl' => @company_logo_url, 'primaryContactId' => @primary_contact_id, 'address1' => @address1, 'address2' => @address2, 'address3' => @address3, 'city' => @city, 'stateRegion' => @state_region, 'postalCode' => @postal_code, 'country' => @country, 'timeZone' => @time_zone, 'phoneNumber' => @phone_number, 'faxNumber' => @fax_number, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'modifiedUserName' => @modified_user_name, 'taxId' => @tax_id, 'dunsNumber' => @duns_number, 'apEmailAddress' => @ap_email_address, 'arEmailAddress' => @ar_email_address, 'preferredDeliveryMethod' => @preferred_delivery_method, 'domainName' => @domain_name, 'companyClassificationCodeDefId' => @company_classification_code_def_id, 'description' => @description, 'website' => @website, 'appEnrollmentId' => @app_enrollment_id, 'emailAddress' => @email_address, 'publicUrlSlug' => @public_url_slug, 'stateTaxId' => @state_tax_id, 'stateOfIncorporation' => @state_of_incorporation, 'linkedInUrlSlug' => @linked_in_url_slug, 'isVerified' => @is_verified, 'lastVerifiedDate' => @last_verified_date, 'viewBoxSettings' => @view_box_settings, 'serviceFabricOrgId' => @service_fabric_org_id, 'serviceFabricCompanyId' => @service_fabric_company_id, 'notes' => @notes, 'attachments' => @attachments, 'contacts' => @contacts, 'invoices' => @invoices, 'customFieldDefinitions' => @custom_field_definitions, 'customFieldValues' => @custom_field_values, 'companyClassificationCodeDefinition' => @company_classification_code_definition, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
359 360 361 |
# File 'lib/lockstep_sdk/models/company_model.rb', line 359 def to_json(*) "[#{as_json(*).to_json(*)}]" end |