lockstep_rails 0.3.69 → 0.3.71

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +85 -53
  3. data/app/models/lockstep/invoice.rb +8 -3
  4. data/app/models/lockstep/workflow_status.rb +8 -0
  5. data/app/platform_api/schema/batch_sync.rb +2 -0
  6. data/app/platform_api/schema/company_magic_link_summary.rb +17 -13
  7. data/app/platform_api/schema/company_sync.rb +15 -0
  8. data/app/platform_api/schema/contact_sync.rb +10 -0
  9. data/app/platform_api/schema/credit_memo_applied.rb +4 -5
  10. data/app/platform_api/schema/financial_account.rb +2 -2
  11. data/app/platform_api/schema/invoice.rb +18 -5
  12. data/app/platform_api/schema/invoice_line.rb +4 -5
  13. data/app/platform_api/schema/invoice_line_sync.rb +10 -0
  14. data/app/platform_api/schema/invoice_sync.rb +23 -0
  15. data/app/platform_api/schema/invoice_workflow_status_history.rb +49 -0
  16. data/app/platform_api/schema/journal_entry.rb +5 -0
  17. data/app/platform_api/schema/journal_entry_line.rb +15 -2
  18. data/app/platform_api/schema/journal_entry_line_fetch_result.rb +26 -0
  19. data/app/platform_api/schema/journal_entry_line_sync.rb +96 -0
  20. data/app/platform_api/schema/journal_entry_sync.rb +66 -0
  21. data/app/platform_api/schema/payment.rb +4 -5
  22. data/app/platform_api/schema/payment_applied.rb +4 -5
  23. data/app/platform_api/schema/payment_applied_sync.rb +15 -0
  24. data/app/platform_api/schema/payment_sync.rb +10 -0
  25. data/app/platform_api/schema/sync_request.rb +2 -0
  26. data/app/platform_api/schema/workflow_status.rb +68 -0
  27. data/app/platform_api/schema/workflow_status_fetch_result.rb +26 -0
  28. data/app/platform_api/swagger.json +9746 -12351
  29. data/lib/lockstep_rails/version.rb +3 -2
  30. data/lib/tasks/update_api_schema.rake +5 -0
  31. metadata +9 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be229b382111dc6ed4c5abee4d372a09cadee483567a91dee3ed187f68e816a6
4
- data.tar.gz: f3c19f0557e2b586cab31dff0e04c8c1846acb354adb474fa8c061a8d847dc2d
3
+ metadata.gz: ddacef947d1ed34adf55183aad06872f45fc6d7b74e8ff2cc78ed3d6824d32f9
4
+ data.tar.gz: 1e79ee1495cf7730510f9a1e9ca2b9de68c2ac0bbd99d92c69c4cc6d1504efe3
5
5
  SHA512:
6
- metadata.gz: 14341156a0d680149d0fda239c5b3fa388512787e9c58f8fd5feaf1ba8afa2b578dfed511237d3d4c29f2b3ef70020d3b3ed52c61a299da093b6eca14f65f7bd
7
- data.tar.gz: 871c9274955aa5692bc779602987f31e1fbe0d4972787b9290c610093f59db5d5d175ba2f562d59789440f4c441d33f4c64ecfd152cf320b3b4a95f3d2bbe7f6
6
+ metadata.gz: 0cbd0d8c4f30a677fad4ecacec43e604142ea704bece161b3134dabff779ee21441a7ae7a04b61333684abbe116d71daa84e7a5b5ead07fb4d0780aed5375fb5
7
+ data.tar.gz: ac1b421df458023a385816388aab3fb3b09d14c2dfb4aa081a6721b6db827dcfd36001e2fc8e103b323ac7ef562e6fdd12106850c53ccc581ba53d05f36ebf60
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
- * ActiveRecord-like API, almost no learning curve
16
- * Validations
17
- * Rails forms and scaffolds **just work**
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
- * Lockstep::Account
43
- * Lockstep::ApiKey
44
- * Lockstep::AppEnrollment
45
- * Lockstep::Attachment
46
- * Lockstep::Connection
47
- * Lockstep::Contact
48
- * Lockstep::CustomerSummary
49
- * Lockstep::CompanyMagicLinkSummary
50
- * Lockstep::FeatureFlag
51
- * Lockstep::Invoice
52
- * Lockstep::InvoiceAtRiskSummary
53
- * Lockstep::InvoiceSummary
54
- * Lockstep::MagicLink
55
- * Lockstep::Note
56
- * Lockstep::Payments
57
- * Lockstep::PaymentApplied
58
- * Lockstep::PaymentSummary
59
- * Lockstep::ReportApAgingHeader
60
- * Lockstep::ReportArAgingHeader
61
- * Lockstep::ReportCashflow
62
- * Lockstep::ReportDailyPayableOutstanding
63
- * Lockstep::ReportDailyPayableOutstandingSummary
64
- * Lockstep::ReportDailySalesOutstanding
65
- * Lockstep::ReportPayableComingDue
66
- * Lockstep::ReportPayablesComingDueSummary
67
- * Lockstep::ReportPayableSummary
68
- * Lockstep::ReportRiskRate
69
- * Lockstep::ServiceFabricPayment
70
- * Lockstep::Status
71
- * Lockstep::TranscriptionValidationRequest
72
- * Lockstep::User
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
- Similar to ActiveRecord, you can search for records by calling `where`.
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 | Searchlight Query | Example |
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
- Using the rails standard queries generates searchlight compatible queries.
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
- * lockstep_has_many
218
- * lockstep_belongs_to
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 = "v1/Invoices"
3
- self.id_ref = "invoice_id"
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: "Lockstep::Connection", foreign_key: :customer_id
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
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Lockstep::WorkflowStatus < Lockstep::ApiRecord
4
+ self.model_name_uri = '/v1/workflow-statuses/'
5
+ self.id_ref = 'id'
6
+
7
+ load_schema(Schema::WorkflowStatus)
8
+ 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
@@ -14,23 +14,23 @@ end
14
14
  # @type: string
15
15
  field :company_name
16
16
 
17
- # This field indicates the type of company. It can be one of a limited number of values:
18
- # Company, Customer, Group, Vendor, or Third Party. A company that represents both a customer and a vendor
19
- # is identified as a CustomerVendor.
20
- #
21
- # * `Company` - This record represents a company that is part of the organization of the account holder.
22
- # * `Customer` - This record represents a business entity that purchases things from the account holder.
23
- # * `Group` - Only one record of type `GROUP` exists in each account. Contains your account profile.
24
- # * `Vendor` - This record represents a business entity that sells things to the account holder.
25
- # * `Third Party` - This record represents a business entity that is neither a customer nor vendor.
26
- # * `CustomerVendor` - Both a customer and a vendor.
17
+ # This field indicates the type of company. It can be one of a limited number of values:
18
+ # Company, Customer, Group, Vendor, or Third Party. A company that represents both a customer and a vendor
19
+ # is identified as a CustomerVendor.
20
+ #
21
+ # * `Company` - This record represents a company that is part of the organization of the account holder.
22
+ # * `Customer` - This record represents a business entity that purchases things from the account holder.
23
+ # * `Group` - Only one record of type `GROUP` exists in each account. Contains your account profile.
24
+ # * `Vendor` - This record represents a business entity that sells things to the account holder.
25
+ # * `Third Party` - This record represents a business entity that is neither a customer nor vendor.
26
+ # * `CustomerVendor` - Both a customer and a vendor.
27
27
  # * `CompanyProfile` - Profile for a Company, each Company should have at most 1 profile, used only for Profile Management.
28
28
  # @type: string
29
29
  field :company_type
30
30
 
31
- # The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
32
- # account will share the same GroupKey value. GroupKey values cannot be changed once created.
33
- #
31
+ # The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
32
+ # account will share the same GroupKey value. GroupKey values cannot be changed once created.
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
@@ -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
@@ -50,12 +50,11 @@ end
50
50
  # @type: string
51
51
  field :erp_key
52
52
 
53
- # Possible statuses for a record that supports ERP write.
54
- field :erp_write_status
53
+ # Possible statuses for a record that supports ERP Update.
54
+ field :erp_update_status
55
55
 
56
- # The name of the ErpWriteStatus for this credit memo application
57
- # @type: string
58
- field :erp_write_status_name
56
+ # Possible actions for a record that supports ERP Update.
57
+ field :erp_update_action
59
58
 
60
59
  # Reference number for the applied credit memo.
61
60
  # @type: integer
@@ -36,8 +36,8 @@ end
36
36
  # @type: string
37
37
  field :name
38
38
 
39
- # The status of the Financial Account. Possible values are active,
40
- # inactive, deleted or archived.
39
+ # The status of the Financial Account. Possible values are Active,
40
+ # Inactive, Deleted or Archived.
41
41
  # @type: string
42
42
  field :status
43
43
 
@@ -78,6 +78,15 @@ end
78
78
  # @type: string
79
79
  field :invoice_status_code
80
80
 
81
+ # The id of the work flow status associated with this invoice.
82
+ # @type: string
83
+ # @format: uuid
84
+ field :workflow_status_id
85
+
86
+ # A description of the current workflow status of this invoice.
87
+ # @type: string
88
+ field :workflow_status_notes
89
+
81
90
  # A code identifying the terms given to the purchaser. This field is imported directly from the originating
82
91
  # financial system and does not follow a specified format.
83
92
  # @type: string
@@ -226,12 +235,11 @@ end
226
235
  # @format: double
227
236
  field :base_currency_outstanding_balance_amount
228
237
 
229
- # Possible statuses for a record that supports ERP write.
230
- field :erp_write_status
238
+ # Possible statuses for a record that supports ERP Update.
239
+ field :erp_update_status
231
240
 
232
- # The name of the ErpWriteStatus for this Invoice
233
- # @type: string
234
- field :erp_write_status_name
241
+ # Possible actions for a record that supports ERP Update.
242
+ field :erp_update_action
235
243
 
236
244
  # The date on which this record was last modified in source ERP.
237
245
  # @type: string
@@ -250,6 +258,10 @@ end
250
258
  # To retrieve this item, specify `Customer` in the "Include" parameter for your query.
251
259
  field :customer_primary_contact
252
260
 
261
+ # Indicates if the invoice an E-Invoice or not
262
+ # @type: boolean
263
+ field :is_e_invoice
264
+
253
265
  belongs_to :company, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
254
266
  belongs_to :account, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
255
267
  belongs_to :customer, {:class_name=>"Lockstep::Connection", :primary_key=>:company_id, :foreign_key=>"customer_id"}
@@ -257,6 +269,7 @@ end
257
269
  belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
258
270
  belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
259
271
 
272
+ has_many :workflow_statuses, {:class_name=>"Schema::InvoiceWorkflowStatusHistory", :included=>true}
260
273
  has_many :addresses, {:class_name=>"Schema::InvoiceAddress", :included=>true}
261
274
  has_many :lines, {:class_name=>"Schema::InvoiceLine", :included=>true}
262
275
  has_many :payments, {:class_name=>"Schema::InvoicePaymentDetail", :included=>true}
@@ -133,12 +133,11 @@ end
133
133
  # @format: uuid
134
134
  field :app_enrollment_id
135
135
 
136
- # Possible statuses for a record that supports ERP write.
137
- field :erp_write_status
136
+ # Possible statuses for a record that supports ERP Update.
137
+ field :erp_update_status
138
138
 
139
- # The name of the ErpWriteStatus for this Invoice
140
- # @type: string
141
- field :erp_write_status_name
139
+ # Possible actions for a record that supports ERP Update.
140
+ field :erp_update_action
142
141
 
143
142
  # The date on which this record was last modified in source ERP.
144
143
  # @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 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
@@ -308,6 +323,14 @@ end
308
323
  # @format: double
309
324
  field :base_currency_outstanding_balance_amount
310
325
 
326
+ # True if the invoice is an E-Invoice
327
+ # @type: boolean
328
+ field :is_e_invoice
329
+
330
+ # True if the E-Invoice should be sent to gov/other recipients immediately
331
+ # @type: boolean
332
+ field :send_immediately
333
+
311
334
 
312
335
 
313
336
  end