lockstep_sdk 2023.7.7.0 → 2023.11.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lockstep_sdk/lockstep_api.rb +3 -8
- data/lib/lockstep_sdk/models/application_model.rb +2 -14
- data/lib/lockstep_sdk/models/attachment_model.rb +0 -24
- data/lib/lockstep_sdk/models/company_model.rb +6 -0
- data/lib/lockstep_sdk/models/company_sync_model.rb +7 -1
- data/lib/lockstep_sdk/models/contact_sync_model.rb +6 -0
- data/lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb +6 -0
- data/lib/lockstep_sdk/models/custom_field_sync_model.rb +6 -0
- data/lib/lockstep_sdk/models/developer_account_submit_model.rb +0 -6
- data/lib/lockstep_sdk/models/financial_account_sync_model.rb +6 -0
- data/lib/lockstep_sdk/models/group_account_model.rb +6 -0
- data/lib/lockstep_sdk/models/invoice_line_sync_model.rb +6 -0
- data/lib/lockstep_sdk/models/invoice_sync_model.rb +6 -0
- data/lib/lockstep_sdk/models/payment_applied_sync_model.rb +6 -0
- data/lib/lockstep_sdk/models/payment_model.rb +1 -1
- data/lib/lockstep_sdk/models/payment_sync_model.rb +6 -0
- data/lib/lockstep_sdk/models/status_model.rb +16 -10
- data/lib/lockstep_sdk/version.rb +1 -1
- metadata +2 -4
- data/lib/lockstep_sdk/clients/invoice_history_client.rb +0 -53
- data/lib/lockstep_sdk/models/invoice_history_model.rb +0 -247
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc1ed33c76a8102443c13fe87194a85b766cb7fe507f696d0ec6a32e5bff01d1
|
4
|
+
data.tar.gz: 381aae0f3e80a840b7aafa210df73d9e2349f0a380ef66562e8f5a00bc5b0a4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b104bc2508ef1428c60f3d3004af74d666697028cac43b7b289f5f9e8cec3b1f2333245603247cba12fec53fa6aa9676842aa6c576d0ae81837d1bcfc8477b46
|
7
|
+
data.tar.gz: 8ae4e1fc63e8c4181c1e4c4ed8ac9bf1a1eaf84cfc03b81144e9f63540e644355d8d3246c506ce4f9fe6d864817d9f3e0931752b59e639218b971df54ef3995f
|
@@ -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.11.28
|
13
13
|
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
14
14
|
#
|
15
15
|
|
@@ -108,10 +108,6 @@ module lockstep_sdk
|
|
108
108
|
# @return [InvoiceAddressesClient] Client object for InvoiceAddresses endpoints
|
109
109
|
attr_accessor :invoice_addresses
|
110
110
|
|
111
|
-
##
|
112
|
-
# @return [InvoiceHistoryClient] Client object for InvoiceHistory endpoints
|
113
|
-
attr_accessor :invoice_history
|
114
|
-
|
115
111
|
##
|
116
112
|
# @return [InvoiceLinesClient] Client object for InvoiceLines endpoints
|
117
113
|
attr_accessor :invoice_lines
|
@@ -198,7 +194,7 @@ module lockstep_sdk
|
|
198
194
|
#
|
199
195
|
# @param env [string] Either "sbx", "prd", or the URI of the server, ending in a slash (/)
|
200
196
|
def initialize(env)
|
201
|
-
@version = "2023.
|
197
|
+
@version = "2023.11.28.0"
|
202
198
|
@env = case env
|
203
199
|
when "sbx"
|
204
200
|
"https://api.sbx.lockstep.io/"
|
@@ -228,7 +224,6 @@ module lockstep_sdk
|
|
228
224
|
@financial_year_settings = FinancialYearSettingsClient.new(self)
|
229
225
|
@group_accounts = GroupAccountsClient.new(self)
|
230
226
|
@invoice_addresses = InvoiceAddressesClient.new(self)
|
231
|
-
@invoice_history = InvoiceHistoryClient.new(self)
|
232
227
|
@invoice_lines = InvoiceLinesClient.new(self)
|
233
228
|
@invoices = InvoicesClient.new(self)
|
234
229
|
@leads = LeadsClient.new(self)
|
@@ -312,7 +307,7 @@ module lockstep_sdk
|
|
312
307
|
request["Accept"] = 'application/json'
|
313
308
|
request["Content-Type"] = 'application/*+json'
|
314
309
|
request["SdkType"] = 'Ruby'
|
315
|
-
request["SdkVersion"] = '2023.
|
310
|
+
request["SdkVersion"] = '2023.11.28.0'
|
316
311
|
request["MachineName"] = Socket.gethostname
|
317
312
|
request.body = body
|
318
313
|
|
@@ -38,13 +38,11 @@ module LockstepSdk
|
|
38
38
|
@owner_id = params.dig(:owner_id)
|
39
39
|
@project_url = params.dig(:project_url)
|
40
40
|
@icon_url = params.dig(:icon_url)
|
41
|
-
@price_terms = params.dig(:price_terms)
|
42
41
|
@created_user_id = params.dig(:created_user_id)
|
43
42
|
@modified_user_id = params.dig(:modified_user_id)
|
44
43
|
@created = params.dig(:created)
|
45
44
|
@modified = params.dig(:modified)
|
46
45
|
@is_active = params.dig(:is_active)
|
47
|
-
@wiki_url = params.dig(:wiki_url)
|
48
46
|
@group_key = params.dig(:group_key)
|
49
47
|
@b2_cclient_id = params.dig(:b2_cclient_id)
|
50
48
|
@notes = params.dig(:notes)
|
@@ -74,17 +72,13 @@ module LockstepSdk
|
|
74
72
|
attr_accessor :owner_id
|
75
73
|
|
76
74
|
##
|
77
|
-
# @return [
|
75
|
+
# @return [String] The URL to visit for more information about this application
|
78
76
|
attr_accessor :project_url
|
79
77
|
|
80
78
|
##
|
81
|
-
# @return [
|
79
|
+
# @return [String] The URL for the icon for this application
|
82
80
|
attr_accessor :icon_url
|
83
81
|
|
84
|
-
##
|
85
|
-
# @return [String] The description of the price for this application
|
86
|
-
attr_accessor :price_terms
|
87
|
-
|
88
82
|
##
|
89
83
|
# @return [Uuid] The ID of the user who created this application
|
90
84
|
attr_accessor :created_user_id
|
@@ -105,10 +99,6 @@ module LockstepSdk
|
|
105
99
|
# @return [Boolean] Flag indicating if the application is active.
|
106
100
|
attr_accessor :is_active
|
107
101
|
|
108
|
-
##
|
109
|
-
# @return [Uri] URL to the Wiki for the Application
|
110
|
-
attr_accessor :wiki_url
|
111
|
-
|
112
102
|
##
|
113
103
|
# @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).
|
114
104
|
attr_accessor :group_key
|
@@ -144,13 +134,11 @@ module LockstepSdk
|
|
144
134
|
'ownerId' => @owner_id,
|
145
135
|
'projectUrl' => @project_url,
|
146
136
|
'iconUrl' => @icon_url,
|
147
|
-
'priceTerms' => @price_terms,
|
148
137
|
'createdUserId' => @created_user_id,
|
149
138
|
'modifiedUserId' => @modified_user_id,
|
150
139
|
'created' => @created,
|
151
140
|
'modified' => @modified,
|
152
141
|
'isActive' => @is_active,
|
153
|
-
'wikiURL' => @wiki_url,
|
154
142
|
'groupKey' => @group_key,
|
155
143
|
'b2CClientId' => @b2_cclient_id,
|
156
144
|
'notes' => @notes,
|
@@ -34,11 +34,7 @@ module LockstepSdk
|
|
34
34
|
@object_key = params.dig(:object_key)
|
35
35
|
@file_name = params.dig(:file_name)
|
36
36
|
@file_ext = params.dig(:file_ext)
|
37
|
-
@attachment_type_id = params.dig(:attachment_type_id)
|
38
37
|
@is_archived = params.dig(:is_archived)
|
39
|
-
@origin_attachment_id = params.dig(:origin_attachment_id)
|
40
|
-
@view_internal = params.dig(:view_internal)
|
41
|
-
@view_external = params.dig(:view_external)
|
42
38
|
@erp_key = params.dig(:erp_key)
|
43
39
|
@app_enrollment_id = params.dig(:app_enrollment_id)
|
44
40
|
@created = params.dig(:created)
|
@@ -70,26 +66,10 @@ module LockstepSdk
|
|
70
66
|
# @return [String] An Attachment represents a file that was uploaded to the Lockstep Platform. This field contains the original extension name of the file on disk.
|
71
67
|
attr_accessor :file_ext
|
72
68
|
|
73
|
-
##
|
74
|
-
# @return [Uuid] DEPRECATED: This field is replaced by `AttachmentType`.
|
75
|
-
attr_accessor :attachment_type_id
|
76
|
-
|
77
69
|
##
|
78
70
|
# @return [Boolean] A flag indicating whether this Attachment is archived (also known as hidden or deleted). When you call [ArchiveAttachment](https://developer.lockstep.io/reference/delete_api-v1-attachments-id) this field will be set to true. You should avoid displaying Attachments with the IsArchived field set to true in your user interface.
|
79
71
|
attr_accessor :is_archived
|
80
72
|
|
81
|
-
##
|
82
|
-
# @return [Uuid] DEPRECATED - Do not use
|
83
|
-
attr_accessor :origin_attachment_id
|
84
|
-
|
85
|
-
##
|
86
|
-
# @return [Boolean] Flag for if LS clients can see this file
|
87
|
-
attr_accessor :view_internal
|
88
|
-
|
89
|
-
##
|
90
|
-
# @return [Boolean] Flag for if Vendors and customers can see this file
|
91
|
-
attr_accessor :view_external
|
92
|
-
|
93
73
|
##
|
94
74
|
# @return [String] The unique ID of this record as it was known in its originating financial system. If this company 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 from a financial system, this value will be `null`. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
95
75
|
attr_accessor :erp_key
|
@@ -120,11 +100,7 @@ module LockstepSdk
|
|
120
100
|
'objectKey' => @object_key,
|
121
101
|
'fileName' => @file_name,
|
122
102
|
'fileExt' => @file_ext,
|
123
|
-
'attachmentTypeId' => @attachment_type_id,
|
124
103
|
'isArchived' => @is_archived,
|
125
|
-
'originAttachmentId' => @origin_attachment_id,
|
126
|
-
'viewInternal' => @view_internal,
|
127
|
-
'viewExternal' => @view_external,
|
128
104
|
'erpKey' => @erp_key,
|
129
105
|
'appEnrollmentId' => @app_enrollment_id,
|
130
106
|
'created' => @created,
|
@@ -73,6 +73,7 @@ module LockstepSdk
|
|
73
73
|
@view_box_settings = params.dig(:view_box_settings)
|
74
74
|
@service_fabric_org_id = params.dig(:service_fabric_org_id)
|
75
75
|
@service_fabric_company_id = params.dig(:service_fabric_company_id)
|
76
|
+
@company_registration_number = params.dig(:company_registration_number)
|
76
77
|
@notes = params.dig(:notes)
|
77
78
|
@attachments = params.dig(:attachments)
|
78
79
|
@contacts = params.dig(:contacts)
|
@@ -266,6 +267,10 @@ module LockstepSdk
|
|
266
267
|
# @return [Uuid] The unique ID of this record within Service Fabric.
|
267
268
|
attr_accessor :service_fabric_company_id
|
268
269
|
|
270
|
+
##
|
271
|
+
# @return [String] A unique identification number assigned to the company by the national registration office.
|
272
|
+
attr_accessor :company_registration_number
|
273
|
+
|
269
274
|
##
|
270
275
|
# @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 `Company` and the `ObjectKey` set to the `CompanyId` 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).
|
271
276
|
attr_accessor :notes
|
@@ -344,6 +349,7 @@ module LockstepSdk
|
|
344
349
|
'viewBoxSettings' => @view_box_settings,
|
345
350
|
'serviceFabricOrgId' => @service_fabric_org_id,
|
346
351
|
'serviceFabricCompanyId' => @service_fabric_company_id,
|
352
|
+
'companyRegistrationNumber' => @company_registration_number,
|
347
353
|
'notes' => @notes,
|
348
354
|
'attachments' => @attachments,
|
349
355
|
'contacts' => @contacts,
|
@@ -58,10 +58,11 @@ module LockstepSdk
|
|
58
58
|
@preferred_delivery_method = params.dig(:preferred_delivery_method)
|
59
59
|
@email_address = params.dig(:email_address)
|
60
60
|
@external_reference = params.dig(:external_reference)
|
61
|
+
@company_registration_number = params.dig(:company_registration_number)
|
61
62
|
end
|
62
63
|
|
63
64
|
##
|
64
|
-
# @return [
|
65
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
65
66
|
attr_accessor :on_match_action
|
66
67
|
|
67
68
|
##
|
@@ -168,6 +169,10 @@ module LockstepSdk
|
|
168
169
|
# @return [String] An external reference that identifies the Company from the originating ERP system, separate from the ErpKey.
|
169
170
|
attr_accessor :external_reference
|
170
171
|
|
172
|
+
##
|
173
|
+
# @return [String] A unique identification number assigned to the company by the national registration office.
|
174
|
+
attr_accessor :company_registration_number
|
175
|
+
|
171
176
|
##
|
172
177
|
# @return [object] This object as a JSON key-value structure
|
173
178
|
def as_json(options={})
|
@@ -199,6 +204,7 @@ module LockstepSdk
|
|
199
204
|
'preferredDeliveryMethod' => @preferred_delivery_method,
|
200
205
|
'emailAddress' => @email_address,
|
201
206
|
'externalReference' => @external_reference,
|
207
|
+
'companyRegistrationNumber' => @company_registration_number,
|
202
208
|
}
|
203
209
|
end
|
204
210
|
|
@@ -31,6 +31,7 @@ module LockstepSdk
|
|
31
31
|
##
|
32
32
|
# Initialize the ContactSyncModel using the provided prototype
|
33
33
|
def initialize(params = {})
|
34
|
+
@on_match_action = params.dig(:on_match_action)
|
34
35
|
@erp_key = params.dig(:erp_key)
|
35
36
|
@company_erp_key = params.dig(:company_erp_key)
|
36
37
|
@contact_name = params.dig(:contact_name)
|
@@ -54,6 +55,10 @@ module LockstepSdk
|
|
54
55
|
@modified = params.dig(:modified)
|
55
56
|
end
|
56
57
|
|
58
|
+
##
|
59
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
60
|
+
attr_accessor :on_match_action
|
61
|
+
|
57
62
|
##
|
58
63
|
# @return [String] This is the primary key of the Contact record. For this field, you should use whatever the contact's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your contact records in a database, whatever the primary key for the contact table is in the database should be the "ErpKey". As some ERP systems don't maintain a unique key for Contacts, we also support syncing Contacts with ERP keys of the form {prefix}|{index}, for example ContactPrefix|1, ContactPrefix|2 and so on. For this reason, please ensure that your Contact ERP keys don't otherwise contain the '|' symbol or that it is replaced by an alternate symbol if they do. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
59
64
|
attr_accessor :erp_key
|
@@ -142,6 +147,7 @@ module LockstepSdk
|
|
142
147
|
# @return [object] This object as a JSON key-value structure
|
143
148
|
def as_json(options={})
|
144
149
|
{
|
150
|
+
'onMatchAction' => @on_match_action,
|
145
151
|
'erpKey' => @erp_key,
|
146
152
|
'companyErpKey' => @company_erp_key,
|
147
153
|
'contactName' => @contact_name,
|
@@ -31,6 +31,7 @@ module LockstepSdk
|
|
31
31
|
##
|
32
32
|
# Initialize the CreditMemoAppliedSyncModel using the provided prototype
|
33
33
|
def initialize(params = {})
|
34
|
+
@on_match_action = params.dig(:on_match_action)
|
34
35
|
@erp_key = params.dig(:erp_key)
|
35
36
|
@invoice_erp_key = params.dig(:invoice_erp_key)
|
36
37
|
@credit_memo_invoice_erp_key = params.dig(:credit_memo_invoice_erp_key)
|
@@ -41,6 +42,10 @@ module LockstepSdk
|
|
41
42
|
@modified = params.dig(:modified)
|
42
43
|
end
|
43
44
|
|
45
|
+
##
|
46
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
47
|
+
attr_accessor :on_match_action
|
48
|
+
|
44
49
|
##
|
45
50
|
# @return [String] This is the primary key of the Credit Memo Application record. For this field, you should use whatever this transaction's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Since Credit Memo Applications are often considered transactions, a typical value to look for will be the transaction ID number, the payment confirmation number, or some other record of this payment. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
46
51
|
attr_accessor :erp_key
|
@@ -77,6 +82,7 @@ module LockstepSdk
|
|
77
82
|
# @return [object] This object as a JSON key-value structure
|
78
83
|
def as_json(options={})
|
79
84
|
{
|
85
|
+
'onMatchAction' => @on_match_action,
|
80
86
|
'erpKey' => @erp_key,
|
81
87
|
'invoiceErpKey' => @invoice_erp_key,
|
82
88
|
'creditMemoInvoiceErpKey' => @credit_memo_invoice_erp_key,
|
@@ -35,6 +35,7 @@ module LockstepSdk
|
|
35
35
|
##
|
36
36
|
# Initialize the CustomFieldSyncModel using the provided prototype
|
37
37
|
def initialize(params = {})
|
38
|
+
@on_match_action = params.dig(:on_match_action)
|
38
39
|
@erp_key = params.dig(:erp_key)
|
39
40
|
@table_key = params.dig(:table_key)
|
40
41
|
@custom_field_label = params.dig(:custom_field_label)
|
@@ -45,6 +46,10 @@ module LockstepSdk
|
|
45
46
|
@modified = params.dig(:modified)
|
46
47
|
end
|
47
48
|
|
49
|
+
##
|
50
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
51
|
+
attr_accessor :on_match_action
|
52
|
+
|
48
53
|
##
|
49
54
|
# @return [String] This is the primary key of the record to which you will attach this custom field. You should provide the identifying number as it is stored in the originating financial system. Search for a unique, non-changing number within the originating financial system for this record. Custom Fields are identified by the `TableKey` and `ErpKey` values together. Example: You have an invoice whose ID number is 100047878, and you wish to store a custom field on that invoice named "ApprovalStatusCode". For the `ErpKey` field, specify the value `100047878`. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
50
55
|
attr_accessor :erp_key
|
@@ -81,6 +86,7 @@ module LockstepSdk
|
|
81
86
|
# @return [object] This object as a JSON key-value structure
|
82
87
|
def as_json(options={})
|
83
88
|
{
|
89
|
+
'onMatchAction' => @on_match_action,
|
84
90
|
'erpKey' => @erp_key,
|
85
91
|
'tableKey' => @table_key,
|
86
92
|
'customFieldLabel' => @custom_field_label,
|
@@ -23,17 +23,12 @@ module LockstepSdk
|
|
23
23
|
##
|
24
24
|
# Initialize the DeveloperAccountSubmitModel using the provided prototype
|
25
25
|
def initialize(params = {})
|
26
|
-
@name = params.dig(:name)
|
27
26
|
@first_name = params.dig(:first_name)
|
28
27
|
@last_name = params.dig(:last_name)
|
29
28
|
@email = params.dig(:email)
|
30
29
|
@company_name = params.dig(:company_name)
|
31
30
|
end
|
32
31
|
|
33
|
-
##
|
34
|
-
# @return [String] The name of the developer.
|
35
|
-
attr_accessor :name
|
36
|
-
|
37
32
|
##
|
38
33
|
# @return [String] The first name of the person requesting the developer account.
|
39
34
|
attr_accessor :first_name
|
@@ -54,7 +49,6 @@ module LockstepSdk
|
|
54
49
|
# @return [object] This object as a JSON key-value structure
|
55
50
|
def as_json(options={})
|
56
51
|
{
|
57
|
-
'name' => @name,
|
58
52
|
'firstName' => @first_name,
|
59
53
|
'lastName' => @last_name,
|
60
54
|
'email' => @email,
|
@@ -31,6 +31,7 @@ module LockstepSdk
|
|
31
31
|
##
|
32
32
|
# Initialize the FinancialAccountSyncModel using the provided prototype
|
33
33
|
def initialize(params = {})
|
34
|
+
@on_match_action = params.dig(:on_match_action)
|
34
35
|
@code = params.dig(:code)
|
35
36
|
@erp_key = params.dig(:erp_key)
|
36
37
|
@name = params.dig(:name)
|
@@ -42,6 +43,10 @@ module LockstepSdk
|
|
42
43
|
@subcategory = params.dig(:subcategory)
|
43
44
|
end
|
44
45
|
|
46
|
+
##
|
47
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
48
|
+
attr_accessor :on_match_action
|
49
|
+
|
45
50
|
##
|
46
51
|
# @return [String] The code for the Financial Account. Can either be a general ledger or an account code.
|
47
52
|
attr_accessor :code
|
@@ -82,6 +87,7 @@ module LockstepSdk
|
|
82
87
|
# @return [object] This object as a JSON key-value structure
|
83
88
|
def as_json(options={})
|
84
89
|
{
|
90
|
+
'onMatchAction' => @on_match_action,
|
85
91
|
'code' => @code,
|
86
92
|
'erpKey' => @erp_key,
|
87
93
|
'name' => @name,
|
@@ -34,6 +34,7 @@ module LockstepSdk
|
|
34
34
|
@created_user_id = params.dig(:created_user_id)
|
35
35
|
@modified = params.dig(:modified)
|
36
36
|
@modified_user_id = params.dig(:modified_user_id)
|
37
|
+
@country_code = params.dig(:country_code)
|
37
38
|
end
|
38
39
|
|
39
40
|
##
|
@@ -80,6 +81,10 @@ module LockstepSdk
|
|
80
81
|
# @return [Uuid] The ID of the user who last modified this group account
|
81
82
|
attr_accessor :modified_user_id
|
82
83
|
|
84
|
+
##
|
85
|
+
# @return [String] The 2-letter ISO country code for the group
|
86
|
+
attr_accessor :country_code
|
87
|
+
|
83
88
|
##
|
84
89
|
# @return [object] This object as a JSON key-value structure
|
85
90
|
def as_json(options={})
|
@@ -95,6 +100,7 @@ module LockstepSdk
|
|
95
100
|
'createdUserId' => @created_user_id,
|
96
101
|
'modified' => @modified,
|
97
102
|
'modifiedUserId' => @modified_user_id,
|
103
|
+
'countryCode' => @country_code,
|
98
104
|
}
|
99
105
|
end
|
100
106
|
|
@@ -31,6 +31,7 @@ module LockstepSdk
|
|
31
31
|
##
|
32
32
|
# Initialize the InvoiceLineSyncModel using the provided prototype
|
33
33
|
def initialize(params = {})
|
34
|
+
@on_match_action = params.dig(:on_match_action)
|
34
35
|
@erp_key = params.dig(:erp_key)
|
35
36
|
@invoice_erp_key = params.dig(:invoice_erp_key)
|
36
37
|
@line_number = params.dig(:line_number)
|
@@ -75,6 +76,10 @@ module LockstepSdk
|
|
75
76
|
@modified = params.dig(:modified)
|
76
77
|
end
|
77
78
|
|
79
|
+
##
|
80
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
81
|
+
attr_accessor :on_match_action
|
82
|
+
|
78
83
|
##
|
79
84
|
# @return [String] This is the primary key of the Invoice Line record. For this field, you should use whatever the contact's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your invoice line records in a database, whatever the primary key for the invoice line table is in the database should be the "ErpKey". For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
80
85
|
attr_accessor :erp_key
|
@@ -247,6 +252,7 @@ module LockstepSdk
|
|
247
252
|
# @return [object] This object as a JSON key-value structure
|
248
253
|
def as_json(options={})
|
249
254
|
{
|
255
|
+
'onMatchAction' => @on_match_action,
|
250
256
|
'erpKey' => @erp_key,
|
251
257
|
'invoiceErpKey' => @invoice_erp_key,
|
252
258
|
'lineNumber' => @line_number,
|
@@ -31,6 +31,7 @@ module LockstepSdk
|
|
31
31
|
##
|
32
32
|
# Initialize the InvoiceSyncModel using the provided prototype
|
33
33
|
def initialize(params = {})
|
34
|
+
@on_match_action = params.dig(:on_match_action)
|
34
35
|
@erp_key = params.dig(:erp_key)
|
35
36
|
@company_erp_key = params.dig(:company_erp_key)
|
36
37
|
@customer_erp_key = params.dig(:customer_erp_key)
|
@@ -92,6 +93,10 @@ module LockstepSdk
|
|
92
93
|
@base_currency_outstanding_balance_amount = params.dig(:base_currency_outstanding_balance_amount)
|
93
94
|
end
|
94
95
|
|
96
|
+
##
|
97
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
98
|
+
attr_accessor :on_match_action
|
99
|
+
|
95
100
|
##
|
96
101
|
# @return [String] This is the primary key of the Invoice record. For this field, you should use whatever the invoice's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your invoice records in a database, whatever the primary key for the invoice table is in the database should be the "ErpKey". For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
97
102
|
attr_accessor :erp_key
|
@@ -332,6 +337,7 @@ module LockstepSdk
|
|
332
337
|
# @return [object] This object as a JSON key-value structure
|
333
338
|
def as_json(options={})
|
334
339
|
{
|
340
|
+
'onMatchAction' => @on_match_action,
|
335
341
|
'erpKey' => @erp_key,
|
336
342
|
'companyErpKey' => @company_erp_key,
|
337
343
|
'customerErpKey' => @customer_erp_key,
|
@@ -31,6 +31,7 @@ module LockstepSdk
|
|
31
31
|
##
|
32
32
|
# Initialize the PaymentAppliedSyncModel using the provided prototype
|
33
33
|
def initialize(params = {})
|
34
|
+
@on_match_action = params.dig(:on_match_action)
|
34
35
|
@erp_key = params.dig(:erp_key)
|
35
36
|
@invoice_erp_key = params.dig(:invoice_erp_key)
|
36
37
|
@payment_erp_key = params.dig(:payment_erp_key)
|
@@ -41,6 +42,10 @@ module LockstepSdk
|
|
41
42
|
@modified = params.dig(:modified)
|
42
43
|
end
|
43
44
|
|
45
|
+
##
|
46
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
47
|
+
attr_accessor :on_match_action
|
48
|
+
|
44
49
|
##
|
45
50
|
# @return [String] This is the primary key of the Payment Application record. For this field, you should use whatever this transaction's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Since Payment Applications are often considered transactions, a typical value to look for will be the transaction ID number, the payment confirmation number, or some other record of this payment. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
46
51
|
attr_accessor :erp_key
|
@@ -77,6 +82,7 @@ module LockstepSdk
|
|
77
82
|
# @return [object] This object as a JSON key-value structure
|
78
83
|
def as_json(options={})
|
79
84
|
{
|
85
|
+
'onMatchAction' => @on_match_action,
|
80
86
|
'erpKey' => @erp_key,
|
81
87
|
'invoiceErpKey' => @invoice_erp_key,
|
82
88
|
'paymentErpKey' => @payment_erp_key,
|
@@ -110,7 +110,7 @@ module LockstepSdk
|
|
110
110
|
attr_accessor :unapplied_amount
|
111
111
|
|
112
112
|
##
|
113
|
-
# @return [String] The ISO 4217 currency code for this payment. For a list of ISO 4217 currency codes, see [Query Currencies](https://developer.lockstep.io/reference/get_api-v1-definitions-currencies).
|
113
|
+
# @return [String] The ISO 4217 currency code for this payment. For a list of ISO 4217 currency codes, see [Query Currencies](https://developer.lockstep.io/reference/get_api-v1-definitions-currencies).
|
114
114
|
attr_accessor :currency_code
|
115
115
|
|
116
116
|
##
|
@@ -31,6 +31,7 @@ module LockstepSdk
|
|
31
31
|
##
|
32
32
|
# Initialize the PaymentSyncModel using the provided prototype
|
33
33
|
def initialize(params = {})
|
34
|
+
@on_match_action = params.dig(:on_match_action)
|
34
35
|
@erp_key = params.dig(:erp_key)
|
35
36
|
@company_erp_key = params.dig(:company_erp_key)
|
36
37
|
@payment_type = params.dig(:payment_type)
|
@@ -52,6 +53,10 @@ module LockstepSdk
|
|
52
53
|
@base_currency_unapplied_amount = params.dig(:base_currency_unapplied_amount)
|
53
54
|
end
|
54
55
|
|
56
|
+
##
|
57
|
+
# @return [MatchAction] Indicates what action to take when an existing object has been found during the sync process.
|
58
|
+
attr_accessor :on_match_action
|
59
|
+
|
55
60
|
##
|
56
61
|
# @return [String] This is the primary key of the Payment record. For this field, you should use whatever the payment's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your payment records in a database, whatever the primary key for the payment table is in the database should be the "ErpKey". For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
57
62
|
attr_accessor :erp_key
|
@@ -132,6 +137,7 @@ module LockstepSdk
|
|
132
137
|
# @return [object] This object as a JSON key-value structure
|
133
138
|
def as_json(options={})
|
134
139
|
{
|
140
|
+
'onMatchAction' => @on_match_action,
|
135
141
|
'erpKey' => @erp_key,
|
136
142
|
'companyErpKey' => @company_erp_key,
|
137
143
|
'paymentType' => @payment_type,
|
@@ -38,14 +38,15 @@ module LockstepSdk
|
|
38
38
|
@environment = params.dig(:environment)
|
39
39
|
@version = params.dig(:version)
|
40
40
|
@onboarding_scheduled = params.dig(:onboarding_scheduled)
|
41
|
+
@base_currency_code = params.dig(:base_currency_code)
|
42
|
+
@country_code = params.dig(:country_code)
|
41
43
|
@magic_link_id = params.dig(:magic_link_id)
|
42
44
|
@magic_link_company_id = params.dig(:magic_link_company_id)
|
43
45
|
@magic_link = params.dig(:magic_link)
|
44
46
|
@support_access = params.dig(:support_access)
|
45
47
|
@is_impersonated = params.dig(:is_impersonated)
|
46
|
-
@dependencies = params.dig(:dependencies)
|
47
48
|
@user_groups = params.dig(:user_groups)
|
48
|
-
@
|
49
|
+
@dependencies = params.dig(:dependencies)
|
49
50
|
end
|
50
51
|
|
51
52
|
##
|
@@ -108,6 +109,14 @@ module LockstepSdk
|
|
108
109
|
# @return [Boolean] If authentication is successful, contains the onboarding session status of the logged-in user's group account.
|
109
110
|
attr_accessor :onboarding_scheduled
|
110
111
|
|
112
|
+
##
|
113
|
+
# @return [String] Base Currency of the group
|
114
|
+
attr_accessor :base_currency_code
|
115
|
+
|
116
|
+
##
|
117
|
+
# @return [String] Country code of the group
|
118
|
+
attr_accessor :country_code
|
119
|
+
|
111
120
|
##
|
112
121
|
# @return [Uuid] The id of the Magic link used to authenticate.
|
113
122
|
attr_accessor :magic_link_id
|
@@ -128,17 +137,13 @@ module LockstepSdk
|
|
128
137
|
# @return [Boolean] True if the user is being impersonated by the Lockstep support team.
|
129
138
|
attr_accessor :is_impersonated
|
130
139
|
|
131
|
-
##
|
132
|
-
# @return [Object] Statuses for the dependencies of this api. OK if the dependency is working.
|
133
|
-
attr_accessor :dependencies
|
134
|
-
|
135
140
|
##
|
136
141
|
# @return [UserGroupModel] The set of Groups that the user has access to. You can use the /api/v1/useraccounts/change-group endpoint to change your active group.
|
137
142
|
attr_accessor :user_groups
|
138
143
|
|
139
144
|
##
|
140
|
-
# @return [
|
141
|
-
attr_accessor :
|
145
|
+
# @return [Object] Statuses for the dependencies of this api. OK if the dependency is working.
|
146
|
+
attr_accessor :dependencies
|
142
147
|
|
143
148
|
##
|
144
149
|
# @return [object] This object as a JSON key-value structure
|
@@ -159,14 +164,15 @@ module LockstepSdk
|
|
159
164
|
'environment' => @environment,
|
160
165
|
'version' => @version,
|
161
166
|
'onboardingScheduled' => @onboarding_scheduled,
|
167
|
+
'baseCurrencyCode' => @base_currency_code,
|
168
|
+
'countryCode' => @country_code,
|
162
169
|
'magicLinkId' => @magic_link_id,
|
163
170
|
'magicLinkCompanyId' => @magic_link_company_id,
|
164
171
|
'magicLink' => @magic_link,
|
165
172
|
'supportAccess' => @support_access,
|
166
173
|
'isImpersonated' => @is_impersonated,
|
167
|
-
'dependencies' => @dependencies,
|
168
174
|
'userGroups' => @user_groups,
|
169
|
-
'
|
175
|
+
'dependencies' => @dependencies,
|
170
176
|
}
|
171
177
|
end
|
172
178
|
|
data/lib/lockstep_sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockstep_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2023.
|
4
|
+
version: 2023.11.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lockstep
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awrence
|
@@ -51,7 +51,6 @@ files:
|
|
51
51
|
- lib/lockstep_sdk/clients/financial_year_settings_client.rb
|
52
52
|
- lib/lockstep_sdk/clients/group_accounts_client.rb
|
53
53
|
- lib/lockstep_sdk/clients/invoice_addresses_client.rb
|
54
|
-
- lib/lockstep_sdk/clients/invoice_history_client.rb
|
55
54
|
- lib/lockstep_sdk/clients/invoice_lines_client.rb
|
56
55
|
- lib/lockstep_sdk/clients/invoices_client.rb
|
57
56
|
- lib/lockstep_sdk/clients/leads_client.rb
|
@@ -139,7 +138,6 @@ files:
|
|
139
138
|
- lib/lockstep_sdk/models/invite_model.rb
|
140
139
|
- lib/lockstep_sdk/models/invite_submit_model.rb
|
141
140
|
- lib/lockstep_sdk/models/invoice_address_model.rb
|
142
|
-
- lib/lockstep_sdk/models/invoice_history_model.rb
|
143
141
|
- lib/lockstep_sdk/models/invoice_line_model.rb
|
144
142
|
- lib/lockstep_sdk/models/invoice_line_sync_model.rb
|
145
143
|
- lib/lockstep_sdk/models/invoice_model.rb
|
@@ -1,53 +0,0 @@
|
|
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 InvoiceHistoryClient
|
18
|
-
|
19
|
-
##
|
20
|
-
# Initialize the InvoiceHistoryClient 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 history of the Invoice specified by this unique identifier.
|
29
|
-
#
|
30
|
-
# An Invoice represents a bill sent from one company to another. The Lockstep Platform tracks changes to each Invoice so that you can observe the changes over time. You can view the InvoiceHistory list to monitor and observe the changes of this Invoice and track the dates when changes occurred.
|
31
|
-
#
|
32
|
-
# @param id [uuid] The unique Lockstep Platform ID number of this invoice; NOT the customer's ERP key
|
33
|
-
def retrieve_invoice_history(id:)
|
34
|
-
path = "/api/v1/InvoiceHistory/#{id}"
|
35
|
-
@connection.request(:get, path, nil, nil)
|
36
|
-
end
|
37
|
-
|
38
|
-
##
|
39
|
-
# Queries Invoice History for this account using the specified filtering, sorting, and pagination rules requested.
|
40
|
-
#
|
41
|
-
# An Invoice represents a bill sent from one company to another. The Lockstep Platform tracks changes to each Invoice so that you can observe the changes over time. You can view the InvoiceHistory list to monitor and observe the changes of this Invoice and track the dates when changes occurred.
|
42
|
-
#
|
43
|
-
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
44
|
-
# @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.
|
45
|
-
# @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
46
|
-
# @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)
|
47
|
-
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
48
|
-
def query_invoice_history(filter:, include_param:, order:, page_size:, page_number:)
|
49
|
-
path = "/api/v1/InvoiceHistory/query"
|
50
|
-
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
51
|
-
@connection.request(:get, path, nil, params)
|
52
|
-
end
|
53
|
-
end
|
@@ -1,247 +0,0 @@
|
|
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
|
-
# An Invoice represents a bill sent from one company to another. The Lockstep Platform tracks changes to
|
21
|
-
# each Invoice so that you can observe the changes over time. You can view the InvoiceHistory list to
|
22
|
-
# monitor and observe the changes of this Invoice and track the dates when changes occurred.
|
23
|
-
class InvoiceHistoryModel
|
24
|
-
|
25
|
-
##
|
26
|
-
# Initialize the InvoiceHistoryModel using the provided prototype
|
27
|
-
def initialize(params = {})
|
28
|
-
@group_key = params.dig(:group_key)
|
29
|
-
@invoice_history_id = params.dig(:invoice_history_id)
|
30
|
-
@invoice_id = params.dig(:invoice_id)
|
31
|
-
@company_id = params.dig(:company_id)
|
32
|
-
@customer_id = params.dig(:customer_id)
|
33
|
-
@erp_key = params.dig(:erp_key)
|
34
|
-
@purchase_order_code = params.dig(:purchase_order_code)
|
35
|
-
@reference_code = params.dig(:reference_code)
|
36
|
-
@salesperson_code = params.dig(:salesperson_code)
|
37
|
-
@salesperson_name = params.dig(:salesperson_name)
|
38
|
-
@invoice_type_code = params.dig(:invoice_type_code)
|
39
|
-
@invoice_status_code = params.dig(:invoice_status_code)
|
40
|
-
@terms_code = params.dig(:terms_code)
|
41
|
-
@special_terms = params.dig(:special_terms)
|
42
|
-
@currency_code = params.dig(:currency_code)
|
43
|
-
@total_amount = params.dig(:total_amount)
|
44
|
-
@sales_tax_amount = params.dig(:sales_tax_amount)
|
45
|
-
@discount_amount = params.dig(:discount_amount)
|
46
|
-
@outstanding_balance_amount = params.dig(:outstanding_balance_amount)
|
47
|
-
@invoice_date = params.dig(:invoice_date)
|
48
|
-
@discount_date = params.dig(:discount_date)
|
49
|
-
@posted_date = params.dig(:posted_date)
|
50
|
-
@invoice_closed_date = params.dig(:invoice_closed_date)
|
51
|
-
@payment_due_date = params.dig(:payment_due_date)
|
52
|
-
@imported_date = params.dig(:imported_date)
|
53
|
-
@primary_origin_address_id = params.dig(:primary_origin_address_id)
|
54
|
-
@primary_bill_to_address_id = params.dig(:primary_bill_to_address_id)
|
55
|
-
@primary_ship_to_address_id = params.dig(:primary_ship_to_address_id)
|
56
|
-
@created = params.dig(:created)
|
57
|
-
@created_user_id = params.dig(:created_user_id)
|
58
|
-
@modified = params.dig(:modified)
|
59
|
-
@modified_user_id = params.dig(:modified_user_id)
|
60
|
-
@app_enrollment_id = params.dig(:app_enrollment_id)
|
61
|
-
@currency_rate = params.dig(:currency_rate)
|
62
|
-
end
|
63
|
-
|
64
|
-
##
|
65
|
-
# @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).
|
66
|
-
attr_accessor :group_key
|
67
|
-
|
68
|
-
##
|
69
|
-
# @return [Uuid] The unique ID number of this invoice history entry.
|
70
|
-
attr_accessor :invoice_history_id
|
71
|
-
|
72
|
-
##
|
73
|
-
# @return [Uuid] The unique ID of the Invoice represented by this history entry. This ID was automatically assigned by Lockstep to the Invoice record when it was added to the Lockstep platform. For the ID of this record in its originating financial system, see `ErpKey`.
|
74
|
-
attr_accessor :invoice_id
|
75
|
-
|
76
|
-
##
|
77
|
-
# @return [Uuid] The ID number of the company that created this invoice.
|
78
|
-
attr_accessor :company_id
|
79
|
-
|
80
|
-
##
|
81
|
-
# @return [Uuid] The ID number of the counterparty for the invoice, for example, a customer or vendor.
|
82
|
-
attr_accessor :customer_id
|
83
|
-
|
84
|
-
##
|
85
|
-
# @return [String] The unique ID of this record as it was known in its originating financial system. If this company 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).
|
86
|
-
attr_accessor :erp_key
|
87
|
-
|
88
|
-
##
|
89
|
-
# @return [String] The purchase order code as it exists in the user's ERP or accounting system.
|
90
|
-
attr_accessor :purchase_order_code
|
91
|
-
|
92
|
-
##
|
93
|
-
# @return [String] An additional reference code that is sometimes used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.
|
94
|
-
attr_accessor :reference_code
|
95
|
-
|
96
|
-
##
|
97
|
-
# @return [String] A code identifying the salesperson responsible for writing this invoice.
|
98
|
-
attr_accessor :salesperson_code
|
99
|
-
|
100
|
-
##
|
101
|
-
# @return [String] A string identifying the salesperson responsible for writing this invoice.
|
102
|
-
attr_accessor :salesperson_name
|
103
|
-
|
104
|
-
##
|
105
|
-
# @return [String] A code identifying the type of this invoice.
|
106
|
-
attr_accessor :invoice_type_code
|
107
|
-
|
108
|
-
##
|
109
|
-
# @return [String] A code identifying the status of this invoice.
|
110
|
-
attr_accessor :invoice_status_code
|
111
|
-
|
112
|
-
##
|
113
|
-
# @return [String] A code identifying the terms given to the purchaser.
|
114
|
-
attr_accessor :terms_code
|
115
|
-
|
116
|
-
##
|
117
|
-
# @return [String] If the customer negotiated any special terms different from the standard terms above, describe them here.
|
118
|
-
attr_accessor :special_terms
|
119
|
-
|
120
|
-
##
|
121
|
-
# @return [String] The three-character ISO 4217 currency code used for this invoice. This will be validated by the /api/v1/definitions/currencies data set
|
122
|
-
attr_accessor :currency_code
|
123
|
-
|
124
|
-
##
|
125
|
-
# @return [Double] The total value of this invoice, inclusive of all taxes and line items.
|
126
|
-
attr_accessor :total_amount
|
127
|
-
|
128
|
-
##
|
129
|
-
# @return [Double] The total sales (or transactional) tax calculated for this invoice.
|
130
|
-
attr_accessor :sales_tax_amount
|
131
|
-
|
132
|
-
##
|
133
|
-
# @return [Double] The total discounts given by the seller to the buyer on this invoice.
|
134
|
-
attr_accessor :discount_amount
|
135
|
-
|
136
|
-
##
|
137
|
-
# @return [Double] The remaining balance value of this invoice.
|
138
|
-
attr_accessor :outstanding_balance_amount
|
139
|
-
|
140
|
-
##
|
141
|
-
# @return [Date] The reporting date for this invoice.
|
142
|
-
attr_accessor :invoice_date
|
143
|
-
|
144
|
-
##
|
145
|
-
# @return [Date] The date when discounts were adjusted for this invoice.
|
146
|
-
attr_accessor :discount_date
|
147
|
-
|
148
|
-
##
|
149
|
-
# @return [Date] The date when this invoice posted to the company's general ledger.
|
150
|
-
attr_accessor :posted_date
|
151
|
-
|
152
|
-
##
|
153
|
-
# @return [Date] The date when the invoice was closed and finalized after completion of all payments and delivery of all products and services.
|
154
|
-
attr_accessor :invoice_closed_date
|
155
|
-
|
156
|
-
##
|
157
|
-
# @return [Date] The date when the remaining outstanding balance is due.
|
158
|
-
attr_accessor :payment_due_date
|
159
|
-
|
160
|
-
##
|
161
|
-
# @return [Date-time] The date and time when this record was imported from the user's ERP or accounting system.
|
162
|
-
attr_accessor :imported_date
|
163
|
-
|
164
|
-
##
|
165
|
-
# @return [Uuid] The ID number of the invoice's origination address
|
166
|
-
attr_accessor :primary_origin_address_id
|
167
|
-
|
168
|
-
##
|
169
|
-
# @return [Uuid] The ID number of the invoice's bill-to address
|
170
|
-
attr_accessor :primary_bill_to_address_id
|
171
|
-
|
172
|
-
##
|
173
|
-
# @return [Uuid] The ID number of the invoice's ship-to address
|
174
|
-
attr_accessor :primary_ship_to_address_id
|
175
|
-
|
176
|
-
##
|
177
|
-
# @return [Date-time] The date on which this invoice record was created.
|
178
|
-
attr_accessor :created
|
179
|
-
|
180
|
-
##
|
181
|
-
# @return [Uuid] The ID number of the user who created this invoice.
|
182
|
-
attr_accessor :created_user_id
|
183
|
-
|
184
|
-
##
|
185
|
-
# @return [Date-time] The date on which this invoice record was last modified.
|
186
|
-
attr_accessor :modified
|
187
|
-
|
188
|
-
##
|
189
|
-
# @return [Uuid] The ID number of the user who most recently modified this invoice.
|
190
|
-
attr_accessor :modified_user_id
|
191
|
-
|
192
|
-
##
|
193
|
-
# @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.
|
194
|
-
attr_accessor :app_enrollment_id
|
195
|
-
|
196
|
-
##
|
197
|
-
# @return [Double] The Currency Rate used to get from the account's base currency to the invoice amount.
|
198
|
-
attr_accessor :currency_rate
|
199
|
-
|
200
|
-
##
|
201
|
-
# @return [object] This object as a JSON key-value structure
|
202
|
-
def as_json(options={})
|
203
|
-
{
|
204
|
-
'groupKey' => @group_key,
|
205
|
-
'invoiceHistoryId' => @invoice_history_id,
|
206
|
-
'invoiceId' => @invoice_id,
|
207
|
-
'companyId' => @company_id,
|
208
|
-
'customerId' => @customer_id,
|
209
|
-
'erpKey' => @erp_key,
|
210
|
-
'purchaseOrderCode' => @purchase_order_code,
|
211
|
-
'referenceCode' => @reference_code,
|
212
|
-
'salespersonCode' => @salesperson_code,
|
213
|
-
'salespersonName' => @salesperson_name,
|
214
|
-
'invoiceTypeCode' => @invoice_type_code,
|
215
|
-
'invoiceStatusCode' => @invoice_status_code,
|
216
|
-
'termsCode' => @terms_code,
|
217
|
-
'specialTerms' => @special_terms,
|
218
|
-
'currencyCode' => @currency_code,
|
219
|
-
'totalAmount' => @total_amount,
|
220
|
-
'salesTaxAmount' => @sales_tax_amount,
|
221
|
-
'discountAmount' => @discount_amount,
|
222
|
-
'outstandingBalanceAmount' => @outstanding_balance_amount,
|
223
|
-
'invoiceDate' => @invoice_date,
|
224
|
-
'discountDate' => @discount_date,
|
225
|
-
'postedDate' => @posted_date,
|
226
|
-
'invoiceClosedDate' => @invoice_closed_date,
|
227
|
-
'paymentDueDate' => @payment_due_date,
|
228
|
-
'importedDate' => @imported_date,
|
229
|
-
'primaryOriginAddressId' => @primary_origin_address_id,
|
230
|
-
'primaryBillToAddressId' => @primary_bill_to_address_id,
|
231
|
-
'primaryShipToAddressId' => @primary_ship_to_address_id,
|
232
|
-
'created' => @created,
|
233
|
-
'createdUserId' => @created_user_id,
|
234
|
-
'modified' => @modified,
|
235
|
-
'modifiedUserId' => @modified_user_id,
|
236
|
-
'appEnrollmentId' => @app_enrollment_id,
|
237
|
-
'currencyRate' => @currency_rate,
|
238
|
-
}
|
239
|
-
end
|
240
|
-
|
241
|
-
##
|
242
|
-
# @return [String] This object converted to a JSON string
|
243
|
-
def to_json(*options)
|
244
|
-
"[#{as_json(*options).to_json(*options)}]"
|
245
|
-
end
|
246
|
-
end
|
247
|
-
end
|