Class: LockstepSdk::AccountingProfileModel
- Inherits:
-
Object
- Object
- LockstepSdk::AccountingProfileModel
- Defined in:
- lib/lockstep_sdk/models/accounting_profile_model.rb
Overview
An Accounting Profile is a child of a Company Profile, and collectively, they comprise the identity and necessary information for an accounting team to work with trading partners, financial institutions, auditors, and others. You can use Accounting Profiles to define an accounting function by what the function does and how to interface with the function.
Instance Attribute Summary collapse
-
#accounting_profile_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#address1 ⇒ String
The first line of the address.
-
#address2 ⇒ String
The second line of the address.
-
#address3 ⇒ String
The third line of the address.
-
#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 profile to which this accounting profile belongs.
-
#country ⇒ 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 accounting profile.
-
#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 associated with the accounting profile.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#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 accounting profile.
-
#name ⇒ String
The name of the accounting profile.
-
#notes ⇒ NoteModel
A collection of notes linked to this record.
-
#phone ⇒ String
The phone number associated with the accounting profile.
-
#postal_code ⇒ String
The postal/zip code of the address.
-
#region ⇒ String
The state/region of the address.
-
#type ⇒ String
The type of the accounting profile.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ AccountingProfileModel
constructor
Initialize the AccountingProfileModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ AccountingProfileModel
Initialize the AccountingProfileModel 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 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 29 def initialize(params = {}) @accounting_profile_id = params.dig(:accounting_profile_id) @company_id = params.dig(:company_id) @group_key = params.dig(:group_key) @name = params.dig(:name) @type = params.dig(:type) @email_address = params.dig(:email_address) @phone = params.dig(:phone) @address1 = params.dig(:address1) @address2 = params.dig(:address2) @address3 = params.dig(:address3) @city = params.dig(:city) @region = params.dig(:region) @postal_code = params.dig(:postal_code) @country = params.dig(:country) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_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
#accounting_profile_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
56 57 58 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 56 def accounting_profile_id @accounting_profile_id end |
#address1 ⇒ String
Returns The first line of the address.
84 85 86 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 84 def address1 @address1 end |
#address2 ⇒ String
Returns The second line of the address.
88 89 90 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 88 def address2 @address2 end |
#address3 ⇒ String
Returns The third line of the address.
92 93 94 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 92 def address3 @address3 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 `AccountingProfile` and the `ObjectKey` set to the `AccountingProfileId` 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).
132 133 134 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 132 def @attachments end |
#city ⇒ String
Returns The city of the address.
96 97 98 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 96 def city @city end |
#company_id ⇒ Uuid
Returns The ID of the company profile to which this accounting profile belongs.
60 61 62 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 60 def company_id @company_id end |
#country ⇒ String
Returns The two character country code of the address.
108 109 110 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 108 def country @country end |
#created ⇒ Date-time
Returns The date on which this record was created.
112 113 114 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 112 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID of the user who created this accounting profile.
116 117 118 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 116 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 `AccountingProfile` and the `ObjectKey` set to the `AccountingProfileId` 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).
136 137 138 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 136 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 `AccountingProfile` and the `ObjectKey` set to the `AccountingProfileId` 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).
140 141 142 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 140 def custom_field_values @custom_field_values end |
#email_address ⇒ Email
Returns The email address associated with the accounting profile.
76 77 78 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 76 def email_address @email_address 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).
64 65 66 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 64 def group_key @group_key end |
#modified ⇒ Date-time
Returns The date on which this record was last modified.
120 121 122 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 120 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID of the user who last modified this accounting profile.
124 125 126 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 124 def modified_user_id @modified_user_id end |
#name ⇒ String
Returns The name of the accounting profile.
68 69 70 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 68 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](developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `AccountingProfile` and the `ObjectKey` set to the `AccountingProfileId` 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).
128 129 130 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 128 def notes @notes end |
#phone ⇒ String
Returns The phone number associated with the accounting profile.
80 81 82 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 80 def phone @phone end |
#postal_code ⇒ String
Returns The postal/zip code of the address.
104 105 106 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 104 def postal_code @postal_code end |
#region ⇒ String
Returns The state/region of the address.
100 101 102 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 100 def region @region end |
#type ⇒ String
Returns The type of the accounting profile. Some examples include ‘AR’, ‘AP’, ‘AR+AP’, ‘General Accounting’, ‘Treasury’, ‘Payroll’, ‘Finance’.
72 73 74 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 72 def type @type end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
144 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/accounting_profile_model.rb', line 144 def as_json(={}) { 'accountingProfileId' => @accounting_profile_id, 'companyId' => @company_id, 'groupKey' => @group_key, 'name' => @name, 'type' => @type, 'emailAddress' => @email_address, 'phone' => @phone, 'address1' => @address1, 'address2' => @address2, 'address3' => @address3, 'city' => @city, 'region' => @region, 'postalCode' => @postal_code, 'country' => @country, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'notes' => @notes, 'attachments' => @attachments, 'customFieldDefinitions' => @custom_field_definitions, 'customFieldValues' => @custom_field_values, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
173 174 175 |
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 173 def to_json(*) "[#{as_json(*).to_json(*)}]" end |