lockstep_sdk 2023.3.18.0 → 2023.7.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d1f5c4c48104c1fbe168d5100f83ab22c372c3a1b4193dc231b05d375fd9e14
4
- data.tar.gz: 76a4033fccfb500befa34a06e9fcbe00727e90ce356eb6e5e40cf98d7e552983
3
+ metadata.gz: e3c12325f8f3062e6b2f3d0e35abb0bd5c944f21e5fb0f2d98f23d2e65622952
4
+ data.tar.gz: a7aa6c606e4ffeabf18003028860d241ad8a519ce2bfa46bfa5657683e7b28bc
5
5
  SHA512:
6
- metadata.gz: e960627ab90c321e409354ab713217d1fda12ccad5f068443a64fdeac75eecc8ccd7f3fdd8e8ad44b42c8e83fed41576dff1a4a4e7e41552f92e5226f321437f
7
- data.tar.gz: de3cd0ac9c19ef2211d1c7c13414a9c9851335f6d50b16fb5bd992872e7de825ac3945c10e2266da84fbf118dbd8105e6444789979a6b9bfe4e9a1949b228a05
6
+ metadata.gz: 9ef25212f3308858fa81871ec3a82c404c809dc353890420fcdb6fcbe6f57867aa3f14cf5d6caa09b4cacf451cc9b072ea4ff82e1e989a729bd85f9774ce9cd0
7
+ data.tar.gz: 0b05410aac2c8246eafee1fa7fff4dee557267bdfd2ac8c432ad3621c134aae4d552d119d5b882102e8387cb8fb9d2889e15b101cbd47282b9dca14c25ef7ab5
@@ -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 [AccountingProfileModel] The Accounting Profiles to create
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. These Contacts are secondary contacts to the primary that is on the 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. These Contacts are secondary contacts to the primary that is on the 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. These Contacts are secondary contacts to the primary that is on the 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:)
@@ -58,44 +58,50 @@ class ProfilesAccountingContactsClient
58
58
  end
59
59
 
60
60
  ##
61
- # Updates an accounting profile contact that matches the specified id with the requested information.
61
+ # Queries Accounting Profile Contacts for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
62
62
  #
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.
63
+ # 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.
64
64
  #
65
- # An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. These Contacts are secondary contacts to the primary that is on the 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
- # @param id [uuid] The unique Lockstep Platform ID number of the Accounting Profile Contact to update
68
- # @param contact_id [uuid] The ID of the contact to link to this Accounting Profile Contact
69
- def update_accounting_profile_contact(id:, contact_id:)
70
- path = "/api/v1/profiles/accounting/contacts/#{id}/#{contactId}"
71
- @connection.request(:patch, path, nil, nil)
67
+ # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
68
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: None
69
+ # @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
70
+ # @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)
71
+ # @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
72
+ def query_accounting_profile_contacts(filter:, include_param:, order:, page_size:, page_number:)
73
+ path = "/api/v1/profiles/accounting/contacts/query"
74
+ params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
75
+ @connection.request(:get, path, nil, params)
72
76
  end
73
77
 
74
78
  ##
75
- # Queries Accounting Profile Contacts for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
79
+ # Queries Accounting Profile Contacts and Contacts for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
76
80
  #
77
81
  # 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
82
  #
79
- # An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. These Contacts are secondary contacts to the primary that is on the profile.
83
+ # 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.
84
+ #
85
+ # 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.
80
86
  #
81
87
  # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
82
- # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: None
83
88
  # @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
89
+ # @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: None
84
90
  # @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)
85
91
  # @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
86
- def query_accounting_profile_contacts(filter:, include_param:, order:, page_size:, page_number:)
87
- path = "/api/v1/profiles/accounting/contacts/query"
88
- params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
92
+ def query_linked_accounting_profile_contacts(filter:, order:, include_param:, page_size:, page_number:)
93
+ path = "/api/v1/profiles/accounting/contacts/query/models"
94
+ params = {:filter => filter, :order => order, :include => include_param, :pageSize => page_size, :pageNumber => page_number}
89
95
  @connection.request(:get, path, nil, params)
90
96
  end
91
97
 
92
98
  ##
93
- # Updates an accounting profile contact that matches the specified id with the primary contact attached to the accounting profile
99
+ # Reverses the isPrimary fields on the primary and secondary contact to reflect a swap and returns the new primary accounting profile contact model.
94
100
  #
95
- # An Accounting Profile Contact has a link to a Contact that is associated with your company's Accounting Profile. These Contacts are secondary contacts to the primary that is on the profile.
101
+ # 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
102
  #
97
- # @param id [uuid] The unique Lockstep Platform ID number of the Accounting Profile Contact to update
98
- def swap_secondary_and_primary_contact(id:)
103
+ # @param id [uuid] The unique Lockstep Platform ID number of the Accounting Profile Contact to set as primary
104
+ def set_secondary_contact_as_primary(id:)
99
105
  path = "/api/v1/profiles/accounting/contacts/#{id}/primary"
100
106
  @connection.request(:patch, path, nil, nil)
101
107
  end
@@ -53,10 +53,13 @@ class SyncClient
53
53
  #
54
54
  # A Sync task represents an action performed by an Application for a particular account. An Application can provide many different tasks as part of their capabilities. Sync tasks are executed in the background and will continue running after they are created. Use one of the creation APIs to request execution of a task. To check on the progress of the task, call GetSync or QuerySync.
55
55
  #
56
+ # @param app_enrollment_id [uuid] The optional existing app enrollment to associate with the data in the zip file.
57
+ # @param is_full_sync [boolean] True if this is a full sync, false if this is a partial sync. Defaults to false.
56
58
  # @param filename [File] The full path of a file to upload to the API
57
- def upload_sync_file(filename:)
59
+ def upload_sync_file(app_enrollment_id:, is_full_sync:, filename:)
58
60
  path = "/api/v1/Sync/zip"
59
- @connection.request(:post, path, nil, nil)
61
+ params = {:appEnrollmentId => app_enrollment_id, :isFullSync => is_full_sync}
62
+ @connection.request(:post, path, nil, params)
60
63
  end
61
64
 
62
65
  ##
@@ -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.3.18
12
+ # @version 2023.7.7
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.3.18.0"
201
+ @version = "2023.7.7.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.3.18.0'
315
+ request["SdkVersion"] = '2023.7.7.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,