Class: LockstepSdk::AccountingProfileModel

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.

Returns:

  • (Uuid)

    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

#address1String

Returns The first line of the address.

Returns:

  • (String)

    The first line of the address.



84
85
86
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 84

def address1
  @address1
end

#address2String

Returns The second line of the address.

Returns:

  • (String)

    The second line of the address.



88
89
90
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 88

def address2
  @address2
end

#address3String

Returns The third line of the address.

Returns:

  • (String)

    The third line of the address.



92
93
94
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 92

def address3
  @address3
end

#attachmentsAttachmentModel

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).

Returns:



132
133
134
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 132

def attachments
  @attachments
end

#cityString

Returns The city of the address.

Returns:

  • (String)

    The city of the address.



96
97
98
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 96

def city
  @city
end

#company_idUuid

Returns The ID of the company profile to which this accounting profile belongs.

Returns:

  • (Uuid)

    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

#countryString

Returns The two character country code of the address.

Returns:

  • (String)

    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

#createdDate-time

Returns The date on which this record was created.

Returns:

  • (Date-time)

    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_idUuid

Returns The ID of the user who created this accounting profile.

Returns:

  • (Uuid)

    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_definitionsCustomFieldDefinitionModel

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).

Returns:



136
137
138
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 136

def custom_field_definitions
  @custom_field_definitions
end

#custom_field_valuesCustomFieldValueModel

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).

Returns:



140
141
142
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 140

def custom_field_values
  @custom_field_values
end

#email_addressEmail

Returns The email address associated with the accounting profile.

Returns:

  • (Email)

    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_keyUuid

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).

Returns:

  • (Uuid)

    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

#modifiedDate-time

Returns The date on which this record was last modified.

Returns:

  • (Date-time)

    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_idUuid

Returns The ID of the user who last modified this accounting profile.

Returns:

  • (Uuid)

    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

#nameString

Returns The name of the accounting profile.

Returns:

  • (String)

    The name of the accounting profile.



68
69
70
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 68

def name
  @name
end

#notesNoteModel

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).

Returns:



128
129
130
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 128

def notes
  @notes
end

#phoneString

Returns The phone number associated with the accounting profile.

Returns:

  • (String)

    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_codeString

Returns The postal/zip code of the address.

Returns:

  • (String)

    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

#regionString

Returns The state/region of the address.

Returns:

  • (String)

    The state/region of the address.



100
101
102
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 100

def region
  @region
end

#typeString

Returns The type of the accounting profile. Some examples include ‘AR’, ‘AP’, ‘AR+AP’, ‘General Accounting’, ‘Treasury’, ‘Payroll’, ‘Finance’.

Returns:

  • (String)

    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.

Returns:

  • (object)

    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(options={})
    {
        '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.

Returns:

  • (String)

    This object converted to a JSON string



173
174
175
# File 'lib/lockstep_sdk/models/accounting_profile_model.rb', line 173

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end