lockstep_rails 0.3.69 → 0.3.70
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/README.md +85 -53
- data/app/models/lockstep/invoice.rb +8 -3
- data/app/models/lockstep/workflow_status.rb +8 -0
- data/app/platform_api/schema/batch_sync.rb +2 -0
- data/app/platform_api/schema/company_magic_link_summary.rb +7 -3
- data/app/platform_api/schema/company_sync.rb +15 -0
- data/app/platform_api/schema/contact_sync.rb +10 -0
- data/app/platform_api/schema/invoice_line_sync.rb +10 -0
- data/app/platform_api/schema/invoice_sync.rb +15 -0
- data/app/platform_api/schema/journal_entry.rb +22 -17
- data/app/platform_api/schema/journal_entry_line.rb +27 -18
- data/app/platform_api/schema/journal_entry_line_fetch_result.rb +26 -0
- data/app/platform_api/schema/journal_entry_line_sync.rb +92 -0
- data/app/platform_api/schema/journal_entry_sync.rb +66 -0
- data/app/platform_api/schema/payment_applied_sync.rb +15 -0
- data/app/platform_api/schema/payment_sync.rb +10 -0
- data/app/platform_api/schema/workflow_status.rb +65 -0
- data/app/platform_api/schema/workflow_status_fetch_result.rb +26 -0
- data/app/platform_api/swagger.json +10449 -12939
- data/lib/lockstep_rails/version.rb +3 -2
- data/lib/tasks/update_api_schema.rake +5 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24dea20381afb07c0769964a66d6654ac72b20912a5cfcb3f31b308495024752
|
4
|
+
data.tar.gz: e884043d30e05e7382f9d50016b0cfb37363c4a9192b2494cb99fb491f4a0b56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a7898f08919efef7f7b7f9047865d9cf306aac6b36b9aeedc050c05f6df70b6bd96f3996d2081fb78013c35ffbe27c2db434337737d14ba962ee398bfd42fb5
|
7
|
+
data.tar.gz: 782a7e8e7bd14969ce43aea26cf7576cd8d3a61366ae4b1f879ba5d5902c94fceee006ab83fe1224e21b95381baf27feb80313bd6475320e48e75abbb4e8e091
|
data/README.md
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
# Lockstep
|
2
|
+
|
2
3
|
A financial service SDK for rails for innovative accounting solutions providers.
|
3
4
|
|
4
5
|
### Who are we?
|
6
|
+
|
5
7
|
Lockstep automates accounting workflows to improve your operational efficiency and cash flow. Accelerate payments through automated customer communications, enhanced collections activity management, and innovative forecasting and reporting.
|
6
8
|
|
7
9
|
### lockstep_rails
|
10
|
+
|
8
11
|
lockstep_rails makes it easy to interact with lockstep.io's REST API. It adheres to the ActiveRecord pattern. LockstepRails is fully ActiveModel compliant, meaning you can use validations and Rails forms.
|
9
12
|
|
10
13
|
Ruby/Rails developers should feel right at home.
|
@@ -12,11 +15,13 @@ Ruby/Rails developers should feel right at home.
|
|
12
15
|
If you're used to `Lockstep::Contact.create(:email_address => "test@emaildomain.com")`, then this is for you.
|
13
16
|
|
14
17
|
### Features
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
|
19
|
+
- ActiveRecord-like API, almost no learning curve
|
20
|
+
- Validations
|
21
|
+
- Rails forms and scaffolds **just work**
|
18
22
|
|
19
23
|
## Installation
|
24
|
+
|
20
25
|
Add this line to your application's Gemfile:
|
21
26
|
|
22
27
|
```ruby
|
@@ -24,58 +29,64 @@ gem 'lockstep_rails'
|
|
24
29
|
```
|
25
30
|
|
26
31
|
And then execute:
|
32
|
+
|
27
33
|
```bash
|
28
34
|
$ bundle
|
29
35
|
```
|
30
36
|
|
31
37
|
Or install it yourself as:
|
38
|
+
|
32
39
|
```bash
|
33
40
|
$ gem install lockstep_rails
|
34
41
|
```
|
35
42
|
|
36
43
|
## License
|
44
|
+
|
37
45
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
38
46
|
|
39
47
|
# Usage
|
40
48
|
|
41
49
|
### Available Records
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
50
|
+
|
51
|
+
- Lockstep::Account
|
52
|
+
- Lockstep::ApiKey
|
53
|
+
- Lockstep::AppEnrollment
|
54
|
+
- Lockstep::Attachment
|
55
|
+
- Lockstep::Connection
|
56
|
+
- Lockstep::Contact
|
57
|
+
- Lockstep::CustomerSummary
|
58
|
+
- Lockstep::CompanyMagicLinkSummary
|
59
|
+
- Lockstep::FeatureFlag
|
60
|
+
- Lockstep::Invoice
|
61
|
+
- Lockstep::InvoiceAtRiskSummary
|
62
|
+
- Lockstep::InvoiceSummary
|
63
|
+
- Lockstep::MagicLink
|
64
|
+
- Lockstep::Note
|
65
|
+
- Lockstep::Payments
|
66
|
+
- Lockstep::PaymentApplied
|
67
|
+
- Lockstep::PaymentSummary
|
68
|
+
- Lockstep::ReportApAgingHeader
|
69
|
+
- Lockstep::ReportArAgingHeader
|
70
|
+
- Lockstep::ReportCashflow
|
71
|
+
- Lockstep::ReportDailyPayableOutstanding
|
72
|
+
- Lockstep::ReportDailyPayableOutstandingSummary
|
73
|
+
- Lockstep::ReportDailySalesOutstanding
|
74
|
+
- Lockstep::ReportPayableComingDue
|
75
|
+
- Lockstep::ReportPayablesComingDueSummary
|
76
|
+
- Lockstep::ReportPayableSummary
|
77
|
+
- Lockstep::ReportRiskRate
|
78
|
+
- Lockstep::ServiceFabricPayment
|
79
|
+
- Lockstep::Status
|
80
|
+
- Lockstep::TranscriptionValidationRequest
|
81
|
+
- Lockstep::User
|
82
|
+
- Lockstep::WorkflowStatus
|
73
83
|
|
74
84
|
## ActiveModel Interfaces
|
75
85
|
|
76
86
|
`lockstep_rails` supports the standard CRUD interface of ActiveRecord.
|
77
87
|
|
78
88
|
### Create
|
89
|
+
|
79
90
|
You can create a record by calling `new` or `create`
|
80
91
|
|
81
92
|
```ruby
|
@@ -83,15 +94,18 @@ Lockstep::Contact.create(email_address: "inbox@companyemail.com")
|
|
83
94
|
```
|
84
95
|
|
85
96
|
You can create records from associations as well. This will automatically association the relationship with the parent record
|
97
|
+
|
86
98
|
```ruby
|
87
99
|
connection = Lockstep::Connection.find(company_id: "17544da8-7be8-4ee2-8c62-cbd81428c68b")
|
88
100
|
connection.contacts.create(email_address: "inbox@companyemail.com")
|
89
101
|
```
|
90
102
|
|
91
103
|
### Update
|
104
|
+
|
92
105
|
Similar to ActiveRecord, you can update a record by calling `update`, `update_attributes` or `update_attribute`
|
93
106
|
|
94
107
|
Examples:
|
108
|
+
|
95
109
|
```ruby
|
96
110
|
connection = Lockstep::Connection.find(company_id: "17544da8-7be8-4ee2-8c62-cbd81428c68b")
|
97
111
|
connection.update(company_name: "New name")
|
@@ -104,9 +118,11 @@ connection.update_attribute(:company_name, "New name")
|
|
104
118
|
```
|
105
119
|
|
106
120
|
### Find
|
121
|
+
|
107
122
|
Similar to ActiveRecord, you can find a record by calling `find`, `find_by` or `find_by_company_id`
|
108
123
|
|
109
124
|
Examples:
|
125
|
+
|
110
126
|
```ruby
|
111
127
|
connection = Lockstep::Connection.find(company_id: "17544da8-7be8-4ee2-8c62-cbd81428c68b")
|
112
128
|
connection.update(company_name: "New name")
|
@@ -119,16 +135,19 @@ connection.update_attribute(:company_name, "New name")
|
|
119
135
|
```
|
120
136
|
|
121
137
|
### Where
|
122
|
-
|
138
|
+
|
139
|
+
Similar to ActiveRecord, you can search for records by calling `where`.
|
123
140
|
|
124
141
|
Unless you are accessing the record via `first`, you will have to call `execute` to fetch the records
|
125
142
|
|
126
143
|
Examples:
|
144
|
+
|
127
145
|
```ruby
|
128
146
|
Lockstep::Connection.where(status: "Active").execute
|
129
147
|
```
|
130
148
|
|
131
149
|
#### Chaining
|
150
|
+
|
132
151
|
You can chain queries while calling where.
|
133
152
|
|
134
153
|
```ruby
|
@@ -136,6 +155,7 @@ Lockstep::Connection.where(status: "Active").where(default_currency_code: "USD")
|
|
136
155
|
```
|
137
156
|
|
138
157
|
#### OR Query
|
158
|
+
|
139
159
|
You can build an or query by calling `or`
|
140
160
|
|
141
161
|
```ruby
|
@@ -143,24 +163,26 @@ Lockstep::Connection.where(status: "Active").or(Lockstep::Connection.where(defau
|
|
143
163
|
```
|
144
164
|
|
145
165
|
#### Advanced Queries
|
166
|
+
|
146
167
|
[Searchlight](https://developer.lockstep.io/docs/querying-with-searchlight) supports building complex comparisons in the query.
|
147
168
|
|
148
|
-
| Suffice
|
149
|
-
|
150
|
-
| _eq | Equals | where(name_eq: "Test Name")
|
151
|
-
| _gt | Greater Than | where(amount_gt: 100)
|
152
|
-
| _ge | Greater Than Or Equal | where(amount_ge: 100)
|
153
|
-
| _lt | Less Than | where(amount_lt: 100)
|
154
|
-
| _le | Less Than Or Equal | where(amount_le: 100)
|
155
|
-
| _ne | Not Equal | where(name_ne: "tak")
|
156
|
-
| _in | IN | where(name_in: ["tik", "tok"])
|
157
|
-
| _contains | CONTAINS | where(name_contains: "kit")
|
158
|
-
| _starts_with | STARTSWITH | where(name_starts_with: "tik")
|
159
|
-
| _ends_with | ENDSWITH | where(name_ends_with: "tok")
|
160
|
-
| _is | IS | where(name_is: nil) where(name_is: "NOT NULL")
|
169
|
+
| Suffice | Searchlight Query | Example |
|
170
|
+
| ------------- | --------------------- | ---------------------------------------------- |
|
171
|
+
| \_eq | Equals | where(name_eq: "Test Name") |
|
172
|
+
| \_gt | Greater Than | where(amount_gt: 100) |
|
173
|
+
| \_ge | Greater Than Or Equal | where(amount_ge: 100) |
|
174
|
+
| \_lt | Less Than | where(amount_lt: 100) |
|
175
|
+
| \_le | Less Than Or Equal | where(amount_le: 100) |
|
176
|
+
| \_ne | Not Equal | where(name_ne: "tak") |
|
177
|
+
| \_in | IN | where(name_in: ["tik", "tok"]) |
|
178
|
+
| \_contains | CONTAINS | where(name_contains: "kit") |
|
179
|
+
| \_starts_with | STARTSWITH | where(name_starts_with: "tik") |
|
180
|
+
| \_ends_with | ENDSWITH | where(name_ends_with: "tok") |
|
181
|
+
| \_is | IS | where(name_is: nil) where(name_is: "NOT NULL") |
|
161
182
|
|
162
183
|
#### Searchlight Queries
|
163
|
-
|
184
|
+
|
185
|
+
Using the rails standard queries generates searchlight compatible queries.
|
164
186
|
if you wish, you can always write raw [Searchlight](https://developer.lockstep.io/docs/querying-with-searchlight) queries by passing a string in the where block
|
165
187
|
|
166
188
|
```ruby
|
@@ -168,6 +190,7 @@ Lockstep::Connection.where("isActive is true OR default_currency_code in ('USD',
|
|
168
190
|
```
|
169
191
|
|
170
192
|
### Destroy and Destroy all
|
193
|
+
|
171
194
|
You can destroy a single object by calling destroy method on one object
|
172
195
|
Lockstep::Connection.find(company_id: "17544da8-7be8-4ee2-8c62-cbd81428c68b").destroy
|
173
196
|
|
@@ -176,6 +199,7 @@ You can also destroy multiple objects at once by calling it on the model class a
|
|
176
199
|
Lockstep::Connection.destroy_all(id: ["17544da8-7be8-4ee2-8c62-cbd81428c68b"])
|
177
200
|
|
178
201
|
### Count
|
202
|
+
|
179
203
|
You can fetch the count of available records by calling `count`
|
180
204
|
|
181
205
|
```ruby
|
@@ -185,12 +209,16 @@ Lockstep::Connection.count
|
|
185
209
|
Lockstep::Connection.where(status: "Active").count
|
186
210
|
# 100
|
187
211
|
```
|
212
|
+
|
188
213
|
### With Count
|
214
|
+
|
189
215
|
```ruby
|
190
216
|
records , count = Lockstep::Connection.where(status: "active").with_count(true).execute
|
191
217
|
# records get the records for the query and the with count if used will return the total number of records present for that query.
|
192
218
|
```
|
219
|
+
|
193
220
|
### Limit
|
221
|
+
|
194
222
|
You can limit the number of records being fetched by passing `limit`
|
195
223
|
|
196
224
|
The default limit is 200.
|
@@ -202,6 +230,7 @@ Lockstep::Connection.where(status: "Active").limit(100).execute
|
|
202
230
|
```
|
203
231
|
|
204
232
|
### Pagination
|
233
|
+
|
205
234
|
You can paginate the records by passing the `page`
|
206
235
|
|
207
236
|
```ruby
|
@@ -211,11 +240,13 @@ Lockstep::Connection.where(status: "Active").limit(100).page(2).execute
|
|
211
240
|
```
|
212
241
|
|
213
242
|
## Adding relationships with ActiveRecord
|
243
|
+
|
214
244
|
If you would like to link the `Lockstep::ApiRecord` with an `ActiveRecord::Base`, you can do so by including `Lockstep::ActiveRecords::Association`
|
215
245
|
|
216
246
|
This gives you access to 2 methods for defining relationships
|
217
|
-
|
218
|
-
|
247
|
+
|
248
|
+
- lockstep_has_many
|
249
|
+
- lockstep_belongs_to
|
219
250
|
|
220
251
|
```ruby
|
221
252
|
class User < ActiveRecord::Base
|
@@ -223,11 +254,12 @@ class User < ActiveRecord::Base
|
|
223
254
|
|
224
255
|
lockstep_has_many :connections, class_name: "Lockstep::Connection", primary_key: 'company_id', foreign_key: "lockstep_company_id"
|
225
256
|
lockstep_belongs_to :account, class_name: "Lockstep::Account", primary_key: 'company_id', foreign_key: "lockstep_company_id"
|
226
|
-
|
257
|
+
|
227
258
|
end
|
228
259
|
```
|
229
260
|
|
230
261
|
#### Loader
|
262
|
+
|
231
263
|
You could define your own loader for fetching the records by passing a `loader` Proc
|
232
264
|
|
233
265
|
```ruby
|
@@ -236,7 +268,7 @@ class User < ActiveRecord::Base
|
|
236
268
|
|
237
269
|
lockstep_has_many :connections, class_name: "Lockstep::Connection", loader: -> (record) { Lockstep::Connection.where(is_active: true).where(company_id: record.lockstep_company_id) }
|
238
270
|
lockstep_belongs_to :account, class_name: "Lockstep::Account", loader: -> (record) { Lockstep::Account.where(is_active: true).first }
|
239
|
-
|
271
|
+
|
240
272
|
end
|
241
273
|
```
|
242
274
|
|
@@ -1,7 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class Lockstep::Invoice < Lockstep::ApiRecord
|
2
|
-
self.model_name_uri =
|
3
|
-
self.id_ref =
|
4
|
+
self.model_name_uri = 'v1/Invoices'
|
5
|
+
self.id_ref = 'invoice_id'
|
4
6
|
load_schema(Schema::Invoice)
|
5
7
|
|
6
|
-
belongs_to :connection, class_name:
|
8
|
+
belongs_to :connection, class_name: 'Lockstep::Connection', foreign_key: :customer_id
|
9
|
+
|
10
|
+
scope :einvoices, -> { include_object(:customer, :lines) }
|
11
|
+
scope :received_einvoices, -> { einvoices.where(invoice_type_code: 'AP E-Invoice') }
|
7
12
|
end
|
@@ -27,5 +27,7 @@ end
|
|
27
27
|
has_many :financial_accounts, {:class_name=>"Schema::FinancialAccountSync", :included=>true}
|
28
28
|
has_many :financial_account_balance_histories, {:class_name=>"Schema::FinancialAccountBalanceHistorySync", :included=>true}
|
29
29
|
has_many :base_currencies, {:class_name=>"Schema::BaseCurrencySync", :included=>true}
|
30
|
+
has_many :journal_entries, {:class_name=>"Schema::JournalEntrySync", :included=>true}
|
31
|
+
has_many :journal_entry_lines, {:class_name=>"Schema::JournalEntryLineSync", :included=>true}
|
30
32
|
|
31
33
|
end
|
@@ -17,7 +17,7 @@ end
|
|
17
17
|
# This field indicates the type of company. It can be one of a limited number of values:
|
18
18
|
# Company, Customer, Group, Vendor, or Third Party. A company that represents both a customer and a vendor
|
19
19
|
# is identified as a CustomerVendor.
|
20
|
-
#
|
20
|
+
#
|
21
21
|
# * `Company` - This record represents a company that is part of the organization of the account holder.
|
22
22
|
# * `Customer` - This record represents a business entity that purchases things from the account holder.
|
23
23
|
# * `Group` - Only one record of type `GROUP` exists in each account. Contains your account profile.
|
@@ -30,7 +30,7 @@ end
|
|
30
30
|
|
31
31
|
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
32
32
|
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
33
|
-
#
|
33
|
+
#
|
34
34
|
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
35
35
|
# @type: string
|
36
36
|
# @format: uuid
|
@@ -44,6 +44,10 @@ end
|
|
44
44
|
# @type: string
|
45
45
|
field :primary_contact_email_address
|
46
46
|
|
47
|
+
# The point of contact for this company
|
48
|
+
# @type: string
|
49
|
+
field :point_of_contact
|
50
|
+
|
47
51
|
# The total outstanding amount for this company
|
48
52
|
# @type: integer
|
49
53
|
# @format: int32
|
@@ -86,4 +90,4 @@ end
|
|
86
90
|
belongs_to :account, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
87
91
|
|
88
92
|
|
89
|
-
end
|
93
|
+
end
|
@@ -8,6 +8,11 @@ end
|
|
8
8
|
# Indicates what action to take when an existing object has been found during the sync process.
|
9
9
|
field :on_match_action
|
10
10
|
|
11
|
+
# The unique identifier of this object in the Sage Network platform.
|
12
|
+
# @type: string
|
13
|
+
# @format: uuid
|
14
|
+
field :network_id
|
15
|
+
|
11
16
|
# This is the primary key of the Company record. For this field, you should use whatever the company's unique
|
12
17
|
# identifying number is in the originating system. Search for a unique, non-changing number within the
|
13
18
|
# originating financial system for this record.
|
@@ -49,6 +54,11 @@ end
|
|
49
54
|
# @type: string
|
50
55
|
field :parent_company_erp_key
|
51
56
|
|
57
|
+
# The network id of the parent Company.
|
58
|
+
# @type: string
|
59
|
+
# @format: uuid
|
60
|
+
field :parent_company_network_id
|
61
|
+
|
52
62
|
# This flag indicates whether the company is currently active. An inactive company will be hidden from the
|
53
63
|
# user interface but will still be available for querying.
|
54
64
|
# @type: boolean
|
@@ -68,6 +78,11 @@ end
|
|
68
78
|
# @type: string
|
69
79
|
field :primary_contact_erp_key
|
70
80
|
|
81
|
+
# The network id of the primary Contact.
|
82
|
+
# @type: string
|
83
|
+
# @format: uuid
|
84
|
+
field :primary_contact_network_id
|
85
|
+
|
71
86
|
# The company's primary mailing address information
|
72
87
|
# @type: string
|
73
88
|
field :address1
|
@@ -8,6 +8,11 @@ end
|
|
8
8
|
# Indicates what action to take when an existing object has been found during the sync process.
|
9
9
|
field :on_match_action
|
10
10
|
|
11
|
+
# The unique identifier of this object in the Sage Network platform.
|
12
|
+
# @type: string
|
13
|
+
# @format: uuid
|
14
|
+
field :network_id
|
15
|
+
|
11
16
|
# This is the primary key of the Contact record. For this field, you should use whatever the contact's unique
|
12
17
|
# identifying number is in the originating system. Search for a unique, non-changing number within the
|
13
18
|
# originating financial system for this record.
|
@@ -31,6 +36,11 @@ end
|
|
31
36
|
# @type: string
|
32
37
|
field :company_erp_key
|
33
38
|
|
39
|
+
# The network id of the related Company.
|
40
|
+
# @type: string
|
41
|
+
# @format: uuid
|
42
|
+
field :company_network_id
|
43
|
+
|
34
44
|
# The name of the contact.
|
35
45
|
# @type: string
|
36
46
|
field :contact_name
|
@@ -8,6 +8,11 @@ end
|
|
8
8
|
# Indicates what action to take when an existing object has been found during the sync process.
|
9
9
|
field :on_match_action
|
10
10
|
|
11
|
+
# The unique identifier of this object in the Sage Network platform.
|
12
|
+
# @type: string
|
13
|
+
# @format: uuid
|
14
|
+
field :network_id
|
15
|
+
|
11
16
|
# This is the primary key of the Invoice Line record. For this field, you should use whatever the contact's unique
|
12
17
|
# identifying number is in the originating system. Search for a unique, non-changing number within the
|
13
18
|
# originating financial system for this record.
|
@@ -25,6 +30,11 @@ end
|
|
25
30
|
# @type: string
|
26
31
|
field :invoice_erp_key
|
27
32
|
|
33
|
+
# The network id of the parent Invoice.
|
34
|
+
# @type: string
|
35
|
+
# @format: uuid
|
36
|
+
field :invoice_network_id
|
37
|
+
|
28
38
|
# The line number of this line, as defined in the originating ERP or accounting system. You can sort on this number to
|
29
39
|
# get the original view of lines within the invoice.
|
30
40
|
# @type: string
|
@@ -8,6 +8,11 @@ end
|
|
8
8
|
# Indicates what action to take when an existing object has been found during the sync process.
|
9
9
|
field :on_match_action
|
10
10
|
|
11
|
+
# The unique identifier of this object in the Sage Network platform.
|
12
|
+
# @type: string
|
13
|
+
# @format: uuid
|
14
|
+
field :network_id
|
15
|
+
|
11
16
|
# This is the primary key of the Invoice record. For this field, you should use whatever the invoice's unique
|
12
17
|
# identifying number is in the originating system. Search for a unique, non-changing number within the
|
13
18
|
# originating financial system for this record.
|
@@ -29,6 +34,11 @@ end
|
|
29
34
|
# @type: string
|
30
35
|
field :company_erp_key
|
31
36
|
|
37
|
+
# The network id of the related Company.
|
38
|
+
# @type: string
|
39
|
+
# @format: uuid
|
40
|
+
field :company_network_id
|
41
|
+
|
32
42
|
# The original primary key or unique ID of the company to which this invoice was sent. This value should
|
33
43
|
# match the [Company ErpKey](https://developer.lockstep.io/docs/importing-companies#erpkey) field on the
|
34
44
|
# [CompanySyncModel](https://developer.lockstep.io/docs/importing-companies).
|
@@ -39,6 +49,11 @@ end
|
|
39
49
|
# @type: string
|
40
50
|
field :customer_erp_key
|
41
51
|
|
52
|
+
# The network id of the related Customer.
|
53
|
+
# @type: string
|
54
|
+
# @format: uuid
|
55
|
+
field :customer_network_id
|
56
|
+
|
42
57
|
# The name of the salesperson that wrote this invoice. This is just text, it is not a reference to the
|
43
58
|
# "Contacts" table. You will not receive an error if this field does not match a known contact person.
|
44
59
|
# @type: string
|
@@ -5,41 +5,41 @@ def self.id_ref
|
|
5
5
|
nil
|
6
6
|
end
|
7
7
|
|
8
|
-
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
9
|
-
# added to the Lockstep platform.
|
10
|
-
#
|
8
|
+
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
9
|
+
# added to the Lockstep platform.
|
10
|
+
#
|
11
11
|
# For the ID of this record in its originating financial system, see `ErpKey`.
|
12
12
|
# @type: string
|
13
13
|
# @format: uuid
|
14
14
|
field :journal_entry_id
|
15
15
|
|
16
|
-
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
17
|
-
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
18
|
-
#
|
16
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
17
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
18
|
+
#
|
19
19
|
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
20
20
|
# @type: string
|
21
21
|
# @format: uuid
|
22
22
|
field :group_key
|
23
23
|
|
24
|
-
# The AppEnrollmentId of the application that imported this record. For accounts
|
25
|
-
# with more than one financial system connected, this field identifies the originating
|
26
|
-
# financial system that produced this record. This value is null if this record
|
24
|
+
# The AppEnrollmentId of the application that imported this record. For accounts
|
25
|
+
# with more than one financial system connected, this field identifies the originating
|
26
|
+
# financial system that produced this record. This value is null if this record
|
27
27
|
# was not loaded from an external ERP or financial system.
|
28
28
|
# @type: string
|
29
29
|
# @format: uuid
|
30
30
|
field :app_enrollment_id
|
31
31
|
|
32
|
-
# The unique ID of this record as it was known in its originating financial system.
|
33
|
-
#
|
34
|
-
# If this journal entry record was imported from a financial system, it will have the value `ErpKey`
|
35
|
-
# set to the original primary key number of the record as it was known in the originating financial
|
36
|
-
# system. If this record was not imported, this value will be `null`.
|
37
|
-
#
|
32
|
+
# The unique ID of this record as it was known in its originating financial system.
|
33
|
+
#
|
34
|
+
# If this journal entry record was imported from a financial system, it will have the value `ErpKey`
|
35
|
+
# set to the original primary key number of the record as it was known in the originating financial
|
36
|
+
# system. If this record was not imported, this value will be `null`.
|
37
|
+
#
|
38
38
|
# For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
39
39
|
# @type: string
|
40
40
|
field :erp_key
|
41
41
|
|
42
|
-
# The ERP’s identifier for this journal entry, usually has meaning to the user.
|
42
|
+
# The ERP’s identifier for this journal entry, usually has meaning to the user.
|
43
43
|
# May be the same value of the ERP Key.
|
44
44
|
# @type: string
|
45
45
|
field :journal_id
|
@@ -92,10 +92,15 @@ end
|
|
92
92
|
# @format: uuid
|
93
93
|
field :modified_user_id
|
94
94
|
|
95
|
+
# The date on which this record was last modified in source ERP.
|
96
|
+
# @type: string
|
97
|
+
# @format: date-time
|
98
|
+
field :source_modified_date, Types::Params::DateTime
|
99
|
+
|
95
100
|
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
96
101
|
belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
|
97
102
|
|
98
103
|
has_many :lines, {:class_name=>"Schema::JournalEntryLine", :included=>true}
|
99
104
|
has_many :attachments, {:class_name=>"Schema::Attachment", :included=>true}
|
100
105
|
|
101
|
-
end
|
106
|
+
end
|
@@ -5,9 +5,9 @@ def self.id_ref
|
|
5
5
|
nil
|
6
6
|
end
|
7
7
|
|
8
|
-
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
9
|
-
# added to the Lockstep platform.
|
10
|
-
#
|
8
|
+
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
9
|
+
# added to the Lockstep platform.
|
10
|
+
#
|
11
11
|
# For the ID of this record in its originating financial system, see `ErpKey`.
|
12
12
|
# @type: string
|
13
13
|
# @format: uuid
|
@@ -18,28 +18,28 @@ end
|
|
18
18
|
# @format: uuid
|
19
19
|
field :journal_entry_id
|
20
20
|
|
21
|
-
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
22
|
-
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
23
|
-
#
|
21
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
22
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
23
|
+
#
|
24
24
|
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
25
25
|
# @type: string
|
26
26
|
# @format: uuid
|
27
27
|
field :group_key
|
28
28
|
|
29
|
-
# The AppEnrollmentId of the application that imported this record. For accounts
|
30
|
-
# with more than one financial system connected, this field identifies the originating
|
31
|
-
# financial system that produced this record. This value is null if this record
|
29
|
+
# The AppEnrollmentId of the application that imported this record. For accounts
|
30
|
+
# with more than one financial system connected, this field identifies the originating
|
31
|
+
# financial system that produced this record. This value is null if this record
|
32
32
|
# was not loaded from an external ERP or financial system.
|
33
33
|
# @type: string
|
34
34
|
# @format: uuid
|
35
35
|
field :app_enrollment_id
|
36
36
|
|
37
|
-
# The unique ID of this record as it was known in its originating financial system.
|
38
|
-
#
|
39
|
-
# If this journal entry record was imported from a financial system, it will have the value `ErpKey`
|
40
|
-
# set to the original primary key number of the record as it was known in the originating financial
|
41
|
-
# system. If this record was not imported, this value will be `null`.
|
42
|
-
#
|
37
|
+
# The unique ID of this record as it was known in its originating financial system.
|
38
|
+
#
|
39
|
+
# If this journal entry record was imported from a financial system, it will have the value `ErpKey`
|
40
|
+
# set to the original primary key number of the record as it was known in the originating financial
|
41
|
+
# system. If this record was not imported, this value will be `null`.
|
42
|
+
#
|
43
43
|
# For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
44
44
|
# @type: string
|
45
45
|
field :erp_key
|
@@ -69,7 +69,7 @@ end
|
|
69
69
|
|
70
70
|
# The transaction currency in which the entry is recorded, especially useful for multi-currency environments.
|
71
71
|
# @type: string
|
72
|
-
field :
|
72
|
+
field :currency_code
|
73
73
|
|
74
74
|
# The base currency debit amount for the account.
|
75
75
|
# @type: number
|
@@ -83,7 +83,7 @@ end
|
|
83
83
|
|
84
84
|
# The base currency in which the entry is recorded, especially useful for multi-currency environments.
|
85
85
|
# @type: string
|
86
|
-
field :
|
86
|
+
field :base_currency_code
|
87
87
|
|
88
88
|
# The ERP’s identifier for the user who recorded the journal entry line.
|
89
89
|
# @type: string
|
@@ -113,8 +113,17 @@ end
|
|
113
113
|
# @format: uuid
|
114
114
|
field :modified_user_id
|
115
115
|
|
116
|
+
# The date on which this record was last modified in source ERP.
|
117
|
+
# @type: string
|
118
|
+
# @format: date-time
|
119
|
+
field :source_modified_date, Types::Params::DateTime
|
120
|
+
|
121
|
+
# The journal entry for this journal entry line.
|
122
|
+
# To retrieve this item, specify `JournalEntry` in the "Include" parameter for your query.
|
123
|
+
field :journal_entry
|
124
|
+
|
116
125
|
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
117
126
|
belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
|
118
127
|
|
119
128
|
|
120
|
-
end
|
129
|
+
end
|