lockstep_sdk 2023.3.18.0 → 2023.5.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lockstep_sdk/clients/attachment_links_client.rb +91 -0
- data/lib/lockstep_sdk/clients/profiles_accounting_client.rb +1 -12
- data/lib/lockstep_sdk/clients/profiles_accounting_contacts_client.rb +27 -7
- data/lib/lockstep_sdk/lockstep_api.rb +8 -3
- data/lib/lockstep_sdk/models/accounting_profile_contact_model.rb +6 -0
- data/lib/lockstep_sdk/models/accounting_profile_contact_result_model.rb +251 -0
- data/lib/lockstep_sdk/models/accounting_profile_model.rb +0 -6
- data/lib/lockstep_sdk/models/accounting_profile_request.rb +183 -0
- data/lib/lockstep_sdk/models/app_enrollment_reconnect_info.rb +7 -1
- data/lib/lockstep_sdk/models/attachment_link_model.rb +77 -0
- data/lib/lockstep_sdk/models/company_model.rb +12 -0
- data/lib/lockstep_sdk/models/invoice_model.rb +28 -4
- data/lib/lockstep_sdk/models/invoice_summary_model_invoice_summary_totals_model_summary_fetch_result.rb +6 -6
- data/lib/lockstep_sdk/models/invoice_sync_model.rb +28 -4
- data/lib/lockstep_sdk/models/payment_model.rb +14 -2
- data/lib/lockstep_sdk/models/payment_summary_model_payment_summary_totals_model_summary_fetch_result.rb +6 -6
- data/lib/lockstep_sdk/models/payment_sync_model.rb +14 -2
- data/lib/lockstep_sdk/models/sync_request_model.rb +6 -0
- data/lib/lockstep_sdk/models/transaction_model_transaction_summary_total_model_summary_fetch_result.rb +6 -6
- data/lib/lockstep_sdk/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b06b739d27da3c8618d99c4cea51a76e4769602282bf13b05058fb4dc0e42c1
|
4
|
+
data.tar.gz: 692323ba26707d5fe17e9245463bb113429c460d603bd902741dc5106123eceb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 047d3352db233820fba39cc8d6451694c12fda70855181ee75f51cb30de1c93390d7dd2651f4f48779d5f8cddc90ee51d60ff5d16e97cd1dc49cae3e41aadfd9
|
7
|
+
data.tar.gz: 3909a5125f2836863f53c79c2c25fc989c6077bafcea250e01b0dee1c56b75e03ef6391793a3a4deb3d71c80202a018c6e13c0bd4791ac770111bf466f5948a6
|
@@ -0,0 +1,91 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2023 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2023 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'awrence'
|
16
|
+
|
17
|
+
class AttachmentLinksClient
|
18
|
+
|
19
|
+
##
|
20
|
+
# Initialize the AttachmentLinksClient class with an API client instance.
|
21
|
+
# @param connection [LockstepApi] The API client object for this connection
|
22
|
+
def initialize(connection)
|
23
|
+
@connection = connection
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
##
|
28
|
+
# Retrieves the Attachment Link with the provided Attachment Link identifier.
|
29
|
+
#
|
30
|
+
# An Attachment Link is a link that associates one Attachment with one object within Lockstep.
|
31
|
+
#
|
32
|
+
# See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
|
33
|
+
#
|
34
|
+
# @param attachment_id [uuid]
|
35
|
+
# @param object_key [uuid]
|
36
|
+
# @param table_name [string]
|
37
|
+
def retrieve_attachment_link(attachment_id:, object_key:, table_name:)
|
38
|
+
path = "/api/v1/AttachmentLinks"
|
39
|
+
params = {:attachmentId => attachment_id, :objectKey => object_key, :tableName => table_name}
|
40
|
+
@connection.request(:get, path, nil, params)
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Creates one Attachment Link from the provided arguments.
|
45
|
+
#
|
46
|
+
# An Attachment Link is a link that associates one Attachment with one object within Lockstep.
|
47
|
+
#
|
48
|
+
# See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
|
49
|
+
#
|
50
|
+
# @param body [AttachmentLinkModel]
|
51
|
+
def upload_attachment(body:)
|
52
|
+
path = "/api/v1/AttachmentLinks"
|
53
|
+
@connection.request(:post, path, body, nil)
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Delete the specified link between an object and its attachment.
|
58
|
+
#
|
59
|
+
# An Attachment Link is a link that associates one Attachment with one object within Lockstep.
|
60
|
+
#
|
61
|
+
# See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
|
62
|
+
#
|
63
|
+
# @param attachment_id [uuid]
|
64
|
+
# @param object_key [uuid]
|
65
|
+
# @param table_name [string]
|
66
|
+
def delete_attachment_link(attachment_id:, object_key:, table_name:)
|
67
|
+
path = "/api/v1/AttachmentLinks"
|
68
|
+
params = {:attachmentId => attachment_id, :objectKey => object_key, :tableName => table_name}
|
69
|
+
@connection.request(:delete, path, nil, params)
|
70
|
+
end
|
71
|
+
|
72
|
+
##
|
73
|
+
# Queries Attachment Links for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
|
74
|
+
#
|
75
|
+
# More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
|
76
|
+
#
|
77
|
+
# An Attachment Link is a link that associates one Attachment with one object within Lockstep.
|
78
|
+
#
|
79
|
+
# See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
|
80
|
+
#
|
81
|
+
# @param filter [string] The filter to use to select from the list of available Attachments, in the [Searchlight query syntax](https://github.com/tspence/csharp-searchlight).
|
82
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. No collections are currently available for querying but may be available in the future.
|
83
|
+
# @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
|
84
|
+
# @param page_size [int32] The page size for results (default 250, maximum of 500)
|
85
|
+
# @param page_number [int32] The page number for results (default 0)
|
86
|
+
def query_attachment_links(filter:, include_param:, order:, page_size:, page_number:)
|
87
|
+
path = "/api/v1/AttachmentLinks/query"
|
88
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
89
|
+
@connection.request(:get, path, nil, params)
|
90
|
+
end
|
91
|
+
end
|
@@ -67,7 +67,7 @@ class ProfilesAccountingClient
|
|
67
67
|
#
|
68
68
|
# 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.
|
69
69
|
#
|
70
|
-
# @param body [
|
70
|
+
# @param body [AccountingProfileRequest] The Accounting Profiles to create
|
71
71
|
def create_accounting_profiles(body:)
|
72
72
|
path = "/api/v1/profiles/accounting"
|
73
73
|
@connection.request(:post, path, body, nil)
|
@@ -90,15 +90,4 @@ class ProfilesAccountingClient
|
|
90
90
|
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
91
91
|
@connection.request(:get, path, nil, params)
|
92
92
|
end
|
93
|
-
|
94
|
-
##
|
95
|
-
# Retrieves all the Contacts associated with the Accounting Profile by this unique identifier, optionally including nested data sets.
|
96
|
-
#
|
97
|
-
# A Contact has a link to a Contact that is associated with your company's Accounting Profile.
|
98
|
-
#
|
99
|
-
# @param id [uuid] The unique Lockstep Platform ID number of this Accounting Profile
|
100
|
-
def retrieve_all_accounting_profile_contacts(id:)
|
101
|
-
path = "/api/v1/profiles/accounting/#{id}/contacts/models"
|
102
|
-
@connection.request(:get, path, nil, nil)
|
103
|
-
end
|
104
93
|
end
|
@@ -27,7 +27,7 @@ class ProfilesAccountingContactsClient
|
|
27
27
|
##
|
28
28
|
# Retrieves the Accounting Profile Contact specified by this unique identifier, optionally including nested data sets.
|
29
29
|
#
|
30
|
-
# A Contact has a link to a Contact that is associated with your company's Accounting Profile.
|
30
|
+
# A Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.
|
31
31
|
#
|
32
32
|
# @param id [uuid] The unique Lockstep Platform ID number of this Accounting Profile Contact
|
33
33
|
def retrieve_accounting_profile_contact(id:)
|
@@ -38,7 +38,7 @@ class ProfilesAccountingContactsClient
|
|
38
38
|
##
|
39
39
|
# Delete the Accounting Profile Contact referred to by this unique identifier.
|
40
40
|
#
|
41
|
-
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile.
|
41
|
+
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.
|
42
42
|
#
|
43
43
|
# @param id [uuid] The unique Lockstep Platform ID number of the Accounting Profile Contact to delete
|
44
44
|
def delete_accounting_profile_contact(id:)
|
@@ -49,7 +49,7 @@ class ProfilesAccountingContactsClient
|
|
49
49
|
##
|
50
50
|
# Creates one or more Accounting Profile Contacts from a given model.
|
51
51
|
#
|
52
|
-
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile.
|
52
|
+
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.
|
53
53
|
#
|
54
54
|
# @param body [AccountingProfileContactModel] The Accounting Profile Contacts to create
|
55
55
|
def create_accounting_profile_contacts(body:)
|
@@ -62,7 +62,7 @@ class ProfilesAccountingContactsClient
|
|
62
62
|
#
|
63
63
|
# The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
|
64
64
|
#
|
65
|
-
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile.
|
65
|
+
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.
|
66
66
|
#
|
67
67
|
# @param id [uuid] The unique Lockstep Platform ID number of the Accounting Profile Contact to update
|
68
68
|
# @param contact_id [uuid] The ID of the contact to link to this Accounting Profile Contact
|
@@ -76,7 +76,7 @@ class ProfilesAccountingContactsClient
|
|
76
76
|
#
|
77
77
|
# More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
|
78
78
|
#
|
79
|
-
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile.
|
79
|
+
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.
|
80
80
|
#
|
81
81
|
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
82
82
|
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: None
|
@@ -89,13 +89,33 @@ class ProfilesAccountingContactsClient
|
|
89
89
|
@connection.request(:get, path, nil, params)
|
90
90
|
end
|
91
91
|
|
92
|
+
##
|
93
|
+
# Queries Accounting Profile Contacts and Contacts for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
|
94
|
+
#
|
95
|
+
# More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
|
96
|
+
#
|
97
|
+
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.
|
98
|
+
#
|
99
|
+
# A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices.
|
100
|
+
#
|
101
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
102
|
+
# @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
103
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: None
|
104
|
+
# @param page_size [int32] The page size for results (default 250, maximum of 500). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
105
|
+
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
106
|
+
def query_linked_accounting_profile_contacts(filter:, order:, include_param:, page_size:, page_number:)
|
107
|
+
path = "/api/v1/profiles/accounting/contacts/query/models"
|
108
|
+
params = {:filter => filter, :order => order, :include => include_param, :pageSize => page_size, :pageNumber => page_number}
|
109
|
+
@connection.request(:get, path, nil, params)
|
110
|
+
end
|
111
|
+
|
92
112
|
##
|
93
113
|
# Updates an accounting profile contact that matches the specified id with the primary contact attached to the accounting profile
|
94
114
|
#
|
95
|
-
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile.
|
115
|
+
# An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. A profile has one primary contact and any number of secondary contacts.
|
96
116
|
#
|
97
117
|
# @param id [uuid] The unique Lockstep Platform ID number of the Accounting Profile Contact to update
|
98
|
-
def
|
118
|
+
def set_secondary_contact_as_primary(id:)
|
99
119
|
path = "/api/v1/profiles/accounting/contacts/#{id}/primary"
|
100
120
|
@connection.request(:patch, path, nil, nil)
|
101
121
|
end
|
@@ -9,7 +9,7 @@
|
|
9
9
|
# @author Lockstep Network <support@lockstep.io>
|
10
10
|
# Manish Narayan B S <manish.n@lockstep.io>, Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
11
11
|
# @copyright 2021-2023 Lockstep, Inc.
|
12
|
-
# @version 2023.
|
12
|
+
# @version 2023.5.21
|
13
13
|
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
14
14
|
#
|
15
15
|
|
@@ -44,6 +44,10 @@ module lockstep_sdk
|
|
44
44
|
# @return [ApplicationsClient] Client object for Applications endpoints
|
45
45
|
attr_accessor :applications
|
46
46
|
|
47
|
+
##
|
48
|
+
# @return [AttachmentLinksClient] Client object for AttachmentLinks endpoints
|
49
|
+
attr_accessor :attachment_links
|
50
|
+
|
47
51
|
##
|
48
52
|
# @return [AttachmentsClient] Client object for Attachments endpoints
|
49
53
|
attr_accessor :attachments
|
@@ -194,7 +198,7 @@ module lockstep_sdk
|
|
194
198
|
#
|
195
199
|
# @param env [string] Either "sbx", "prd", or the URI of the server, ending in a slash (/)
|
196
200
|
def initialize(env)
|
197
|
-
@version = "2023.
|
201
|
+
@version = "2023.5.21.0"
|
198
202
|
@env = case env
|
199
203
|
when "sbx"
|
200
204
|
"https://api.sbx.lockstep.io/"
|
@@ -208,6 +212,7 @@ module lockstep_sdk
|
|
208
212
|
@api_keys = ApiKeysClient.new(self)
|
209
213
|
@app_enrollments = AppEnrollmentsClient.new(self)
|
210
214
|
@applications = ApplicationsClient.new(self)
|
215
|
+
@attachment_links = AttachmentLinksClient.new(self)
|
211
216
|
@attachments = AttachmentsClient.new(self)
|
212
217
|
@code_definitions = CodeDefinitionsClient.new(self)
|
213
218
|
@companies = CompaniesClient.new(self)
|
@@ -307,7 +312,7 @@ module lockstep_sdk
|
|
307
312
|
request["Accept"] = 'application/json'
|
308
313
|
request["Content-Type"] = 'application/*+json'
|
309
314
|
request["SdkType"] = 'Ruby'
|
310
|
-
request["SdkVersion"] = '2023.
|
315
|
+
request["SdkVersion"] = '2023.5.21.0'
|
311
316
|
request["MachineName"] = Socket.gethostname
|
312
317
|
request.body = body
|
313
318
|
|
@@ -27,6 +27,7 @@ module LockstepSdk
|
|
27
27
|
@accounting_profile_contact_id = params.dig(:accounting_profile_contact_id)
|
28
28
|
@accounting_profile_id = params.dig(:accounting_profile_id)
|
29
29
|
@contact_id = params.dig(:contact_id)
|
30
|
+
@is_primary = params.dig(:is_primary)
|
30
31
|
@group_key = params.dig(:group_key)
|
31
32
|
@created = params.dig(:created)
|
32
33
|
@created_user_id = params.dig(:created_user_id)
|
@@ -46,6 +47,10 @@ module LockstepSdk
|
|
46
47
|
# @return [Uuid] The ID of the contact that is linked to this profile.
|
47
48
|
attr_accessor :contact_id
|
48
49
|
|
50
|
+
##
|
51
|
+
# @return [Boolean] Determines whether the contact is primary or secondary.
|
52
|
+
attr_accessor :is_primary
|
53
|
+
|
49
54
|
##
|
50
55
|
# @return [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](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
51
56
|
attr_accessor :group_key
|
@@ -73,6 +78,7 @@ module LockstepSdk
|
|
73
78
|
'accountingProfileContactId' => @accounting_profile_contact_id,
|
74
79
|
'accountingProfileId' => @accounting_profile_id,
|
75
80
|
'contactId' => @contact_id,
|
81
|
+
'isPrimary' => @is_primary,
|
76
82
|
'groupKey' => @group_key,
|
77
83
|
'created' => @created,
|
78
84
|
'createdUserId' => @created_user_id,
|
@@ -0,0 +1,251 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2023 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2023 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'json'
|
16
|
+
|
17
|
+
module LockstepSdk
|
18
|
+
|
19
|
+
##
|
20
|
+
# A Contact contains information about a person or role within a Company.
|
21
|
+
# You can use Contacts to track information about who is responsible for a specific project,
|
22
|
+
# who handles invoices, or information about which role at a particular customer or
|
23
|
+
# vendor you should speak with about invoices.
|
24
|
+
#
|
25
|
+
# An Accounting Profile Contact has a link to a Contact that is associated with your company's
|
26
|
+
# Accounting Profile. These Contacts are secondary contacts to the primary that is on the profile.
|
27
|
+
class AccountingProfileContactResultModel
|
28
|
+
|
29
|
+
##
|
30
|
+
# Initialize the AccountingProfileContactResultModel using the provided prototype
|
31
|
+
def initialize(params = {})
|
32
|
+
@contact_id = params.dig(:contact_id)
|
33
|
+
@company_id = params.dig(:company_id)
|
34
|
+
@group_key = params.dig(:group_key)
|
35
|
+
@erp_key = params.dig(:erp_key)
|
36
|
+
@contact_name = params.dig(:contact_name)
|
37
|
+
@contact_code = params.dig(:contact_code)
|
38
|
+
@title = params.dig(:title)
|
39
|
+
@role_code = params.dig(:role_code)
|
40
|
+
@email_address = params.dig(:email_address)
|
41
|
+
@phone = params.dig(:phone)
|
42
|
+
@fax = params.dig(:fax)
|
43
|
+
@address1 = params.dig(:address1)
|
44
|
+
@address2 = params.dig(:address2)
|
45
|
+
@address3 = params.dig(:address3)
|
46
|
+
@city = params.dig(:city)
|
47
|
+
@state_region = params.dig(:state_region)
|
48
|
+
@postal_code = params.dig(:postal_code)
|
49
|
+
@country_code = params.dig(:country_code)
|
50
|
+
@is_active = params.dig(:is_active)
|
51
|
+
@webpage_url = params.dig(:webpage_url)
|
52
|
+
@picture_url = params.dig(:picture_url)
|
53
|
+
@created = params.dig(:created)
|
54
|
+
@created_user_id = params.dig(:created_user_id)
|
55
|
+
@modified = params.dig(:modified)
|
56
|
+
@modified_user_id = params.dig(:modified_user_id)
|
57
|
+
@app_enrollment_id = params.dig(:app_enrollment_id)
|
58
|
+
@notes = params.dig(:notes)
|
59
|
+
@attachments = params.dig(:attachments)
|
60
|
+
@custom_field_definitions = params.dig(:custom_field_definitions)
|
61
|
+
@custom_field_values = params.dig(:custom_field_values)
|
62
|
+
@is_primary = params.dig(:is_primary)
|
63
|
+
@accounting_profile_id = params.dig(:accounting_profile_id)
|
64
|
+
@accounting_profile_contact_id = params.dig(:accounting_profile_contact_id)
|
65
|
+
@name = params.dig(:name)
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# @return [Uuid] 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`.
|
70
|
+
attr_accessor :contact_id
|
71
|
+
|
72
|
+
##
|
73
|
+
# @return [Uuid] The ID of the company to which this contact belongs.
|
74
|
+
attr_accessor :company_id
|
75
|
+
|
76
|
+
##
|
77
|
+
# @return [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](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
78
|
+
attr_accessor :group_key
|
79
|
+
|
80
|
+
##
|
81
|
+
# @return [String] The unique ID of this record as it was known in its originating financial system. If this contact 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](https://developer.lockstep.io/docs/identity-columns).
|
82
|
+
attr_accessor :erp_key
|
83
|
+
|
84
|
+
##
|
85
|
+
# @return [String] The name of the contact.
|
86
|
+
attr_accessor :contact_name
|
87
|
+
|
88
|
+
##
|
89
|
+
# @return [String] A friendly human-readable code that describes this Contact.
|
90
|
+
attr_accessor :contact_code
|
91
|
+
|
92
|
+
##
|
93
|
+
# @return [String] The title of the contact.
|
94
|
+
attr_accessor :title
|
95
|
+
|
96
|
+
##
|
97
|
+
# @return [String] The role code for the contact.
|
98
|
+
attr_accessor :role_code
|
99
|
+
|
100
|
+
##
|
101
|
+
# @return [Email] The email address of the contact.
|
102
|
+
attr_accessor :email_address
|
103
|
+
|
104
|
+
##
|
105
|
+
# @return [String] The phone number of the contact.
|
106
|
+
attr_accessor :phone
|
107
|
+
|
108
|
+
##
|
109
|
+
# @return [String] The fax number of the contact.
|
110
|
+
attr_accessor :fax
|
111
|
+
|
112
|
+
##
|
113
|
+
# @return [String] The first line of the address.
|
114
|
+
attr_accessor :address1
|
115
|
+
|
116
|
+
##
|
117
|
+
# @return [String] The second line of the address.
|
118
|
+
attr_accessor :address2
|
119
|
+
|
120
|
+
##
|
121
|
+
# @return [String] The third line of the address.
|
122
|
+
attr_accessor :address3
|
123
|
+
|
124
|
+
##
|
125
|
+
# @return [String] The city of the address.
|
126
|
+
attr_accessor :city
|
127
|
+
|
128
|
+
##
|
129
|
+
# @return [String] The state/region of the address.
|
130
|
+
attr_accessor :state_region
|
131
|
+
|
132
|
+
##
|
133
|
+
# @return [String] The postal/zip code of the address.
|
134
|
+
attr_accessor :postal_code
|
135
|
+
|
136
|
+
##
|
137
|
+
# @return [String] The two character country code of the address. This will be validated by the /api/v1/definitions/countries data set
|
138
|
+
attr_accessor :country_code
|
139
|
+
|
140
|
+
##
|
141
|
+
# @return [Boolean] Flag indicating if the contact is active.
|
142
|
+
attr_accessor :is_active
|
143
|
+
|
144
|
+
##
|
145
|
+
# @return [Uri] The webpage url of the contact.
|
146
|
+
attr_accessor :webpage_url
|
147
|
+
|
148
|
+
##
|
149
|
+
# @return [Uri] The picture/avatar url of the contact.
|
150
|
+
attr_accessor :picture_url
|
151
|
+
|
152
|
+
##
|
153
|
+
# @return [Date-time] The date on which this record was created.
|
154
|
+
attr_accessor :created
|
155
|
+
|
156
|
+
##
|
157
|
+
# @return [Uuid] The ID of the user who created this contact.
|
158
|
+
attr_accessor :created_user_id
|
159
|
+
|
160
|
+
##
|
161
|
+
# @return [Date-time] The date on which this record was last modified.
|
162
|
+
attr_accessor :modified
|
163
|
+
|
164
|
+
##
|
165
|
+
# @return [Uuid] The ID of the user who last modified this contact.
|
166
|
+
attr_accessor :modified_user_id
|
167
|
+
|
168
|
+
##
|
169
|
+
# @return [Uuid] 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.
|
170
|
+
attr_accessor :app_enrollment_id
|
171
|
+
|
172
|
+
##
|
173
|
+
# @return [NoteModel] 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](https://developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `Contact` and the `ObjectKey` set to the `ContactId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
|
174
|
+
attr_accessor :notes
|
175
|
+
|
176
|
+
##
|
177
|
+
# @return [AttachmentModel] 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](https://developer.lockstep.io/reference/post_api-v1-attachments) endpoint with the `TableKey` to `Contact` and the `ObjectKey` set to the `ContactId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
|
178
|
+
attr_accessor :attachments
|
179
|
+
|
180
|
+
##
|
181
|
+
# @return [CustomFieldDefinitionModel] 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](https://developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the `TableKey` to `Contact` and the `ObjectKey` set to the `ContactId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
|
182
|
+
attr_accessor :custom_field_definitions
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [CustomFieldValueModel] 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](https://developer.lockstep.io/reference/post_api-v1-customfieldvalues) endpoint with the `TableKey` to `Contact` and the `ObjectKey` set to the `ContactId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
|
186
|
+
attr_accessor :custom_field_values
|
187
|
+
|
188
|
+
##
|
189
|
+
# @return [Boolean] Determines whether the contact is primary or secondary.
|
190
|
+
attr_accessor :is_primary
|
191
|
+
|
192
|
+
##
|
193
|
+
# @return [Uuid] The ID of the profile this contact belongs to.
|
194
|
+
attr_accessor :accounting_profile_id
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [Uuid] The ID of the accounting profile contact this contact matches.
|
198
|
+
attr_accessor :accounting_profile_contact_id
|
199
|
+
|
200
|
+
##
|
201
|
+
# @return [String] The Name of the profile this contact belongs to.
|
202
|
+
attr_accessor :name
|
203
|
+
|
204
|
+
##
|
205
|
+
# @return [object] This object as a JSON key-value structure
|
206
|
+
def as_json(options={})
|
207
|
+
{
|
208
|
+
'contactId' => @contact_id,
|
209
|
+
'companyId' => @company_id,
|
210
|
+
'groupKey' => @group_key,
|
211
|
+
'erpKey' => @erp_key,
|
212
|
+
'contactName' => @contact_name,
|
213
|
+
'contactCode' => @contact_code,
|
214
|
+
'title' => @title,
|
215
|
+
'roleCode' => @role_code,
|
216
|
+
'emailAddress' => @email_address,
|
217
|
+
'phone' => @phone,
|
218
|
+
'fax' => @fax,
|
219
|
+
'address1' => @address1,
|
220
|
+
'address2' => @address2,
|
221
|
+
'address3' => @address3,
|
222
|
+
'city' => @city,
|
223
|
+
'stateRegion' => @state_region,
|
224
|
+
'postalCode' => @postal_code,
|
225
|
+
'countryCode' => @country_code,
|
226
|
+
'isActive' => @is_active,
|
227
|
+
'webpageUrl' => @webpage_url,
|
228
|
+
'pictureUrl' => @picture_url,
|
229
|
+
'created' => @created,
|
230
|
+
'createdUserId' => @created_user_id,
|
231
|
+
'modified' => @modified,
|
232
|
+
'modifiedUserId' => @modified_user_id,
|
233
|
+
'appEnrollmentId' => @app_enrollment_id,
|
234
|
+
'notes' => @notes,
|
235
|
+
'attachments' => @attachments,
|
236
|
+
'customFieldDefinitions' => @custom_field_definitions,
|
237
|
+
'customFieldValues' => @custom_field_values,
|
238
|
+
'isPrimary' => @is_primary,
|
239
|
+
'accountingProfileId' => @accounting_profile_id,
|
240
|
+
'accountingProfileContactId' => @accounting_profile_contact_id,
|
241
|
+
'name' => @name,
|
242
|
+
}
|
243
|
+
end
|
244
|
+
|
245
|
+
##
|
246
|
+
# @return [String] This object converted to a JSON string
|
247
|
+
def to_json(*options)
|
248
|
+
"[#{as_json(*options).to_json(*options)}]"
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
@@ -41,7 +41,6 @@ module LockstepSdk
|
|
41
41
|
@region = params.dig(:region)
|
42
42
|
@postal_code = params.dig(:postal_code)
|
43
43
|
@country = params.dig(:country)
|
44
|
-
@primary_contact_id = params.dig(:primary_contact_id)
|
45
44
|
@created = params.dig(:created)
|
46
45
|
@created_user_id = params.dig(:created_user_id)
|
47
46
|
@modified = params.dig(:modified)
|
@@ -108,10 +107,6 @@ module LockstepSdk
|
|
108
107
|
# @return [String] The two character country code of the address.
|
109
108
|
attr_accessor :country
|
110
109
|
|
111
|
-
##
|
112
|
-
# @return [Uuid] The ID of the primary contact with which this accounting profile is associated.
|
113
|
-
attr_accessor :primary_contact_id
|
114
|
-
|
115
110
|
##
|
116
111
|
# @return [Date-time] The date on which this record was created.
|
117
112
|
attr_accessor :created
|
@@ -162,7 +157,6 @@ module LockstepSdk
|
|
162
157
|
'region' => @region,
|
163
158
|
'postalCode' => @postal_code,
|
164
159
|
'country' => @country,
|
165
|
-
'primaryContactId' => @primary_contact_id,
|
166
160
|
'created' => @created,
|
167
161
|
'createdUserId' => @created_user_id,
|
168
162
|
'modified' => @modified,
|