Class: LockstepSdk::AccountingProfileRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/accounting_profile_request.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 = {}) ⇒ AccountingProfileRequest

Initialize the AccountingProfileRequest 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
# File 'lib/lockstep_sdk/models/accounting_profile_request.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)
    @primary_contact_id = params.dig(:primary_contact_id)
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.



57
58
59
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 57

def accounting_profile_id
  @accounting_profile_id
end

#address1String

Returns The first line of the address.

Returns:

  • (String)

    The first line of the address.



85
86
87
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 85

def address1
  @address1
end

#address2String

Returns The second line of the address.

Returns:

  • (String)

    The second line of the address.



89
90
91
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 89

def address2
  @address2
end

#address3String

Returns The third line of the address.

Returns:

  • (String)

    The third line of the address.



93
94
95
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 93

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:



133
134
135
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 133

def attachments
  @attachments
end

#cityString

Returns The city of the address.

Returns:

  • (String)

    The city of the address.



97
98
99
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 97

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.



61
62
63
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 61

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.



109
110
111
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 109

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.



113
114
115
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 113

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.



117
118
119
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 117

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:



137
138
139
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 137

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:



141
142
143
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 141

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.



77
78
79
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 77

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



65
66
67
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 65

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.



121
122
123
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 121

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.



125
126
127
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 125

def modified_user_id
  @modified_user_id
end

#nameString

Returns The name of the accounting profile.

Returns:

  • (String)

    The name of the accounting profile.



69
70
71
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 69

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:



129
130
131
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 129

def notes
  @notes
end

#phoneString

Returns The phone number associated with the accounting profile.

Returns:

  • (String)

    The phone number associated with the accounting profile.



81
82
83
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 81

def phone
  @phone
end

#postal_codeString

Returns The postal/zip code of the address.

Returns:

  • (String)

    The postal/zip code of the address.



105
106
107
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 105

def postal_code
  @postal_code
end

#primary_contact_idUuid

Returns The ID of the primary contact that is linked to this profile.

Returns:

  • (Uuid)

    The ID of the primary contact that is linked to this profile.



145
146
147
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 145

def primary_contact_id
  @primary_contact_id
end

#regionString

Returns The state/region of the address.

Returns:

  • (String)

    The state/region of the address.



101
102
103
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 101

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’



73
74
75
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 73

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



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 149

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,
        'primaryContactId' => @primary_contact_id,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



179
180
181
# File 'lib/lockstep_sdk/models/accounting_profile_request.rb', line 179

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