lockstep_rails 0.3.70 → 0.3.72

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24dea20381afb07c0769964a66d6654ac72b20912a5cfcb3f31b308495024752
4
- data.tar.gz: e884043d30e05e7382f9d50016b0cfb37363c4a9192b2494cb99fb491f4a0b56
3
+ metadata.gz: d917ee0f2d4b07dd2d13151701c17c42bc77a61f95363e18fb62480c5b51c59e
4
+ data.tar.gz: bce93413a0d1b60decdb69dc137c323555dd0a272992ecc43260ee84831bc2d7
5
5
  SHA512:
6
- metadata.gz: 9a7898f08919efef7f7b7f9047865d9cf306aac6b36b9aeedc050c05f6df70b6bd96f3996d2081fb78013c35ffbe27c2db434337737d14ba962ee398bfd42fb5
7
- data.tar.gz: 782a7e8e7bd14969ce43aea26cf7576cd8d3a61366ae4b1f879ba5d5902c94fceee006ab83fe1224e21b95381baf27feb80313bd6475320e48e75abbb4e8e091
6
+ metadata.gz: 47831ddf735b0510a5e63b31aeb2f4a249155463f738d68084239d63e9e83318666394210f3bb5aa2765bd3d520197b508ee1818fe54fd7a1e72169e9d0bc986
7
+ data.tar.gz: 8b6a4ca48837595396e0d5e9cedf6a530b5b3143f6f89547804ce0130676b525f78ee3b7409971274f04dbc9d55a980ba5c23bf523eb0593d660f97f47974b29
@@ -175,4 +175,4 @@ module Lockstep
175
175
  block.call
176
176
  end
177
177
  end
178
- end
178
+ end
@@ -7,6 +7,7 @@ class Lockstep::Invoice < Lockstep::ApiRecord
7
7
 
8
8
  belongs_to :connection, class_name: 'Lockstep::Connection', foreign_key: :customer_id
9
9
 
10
- scope :einvoices, -> { include_object(:customer, :lines) }
11
- scope :received_einvoices, -> { einvoices.where(invoice_type_code: 'AP E-Invoice') }
10
+ scope :einvoices, -> { where(is_e_invoice: true).include_object(:customer, :lines) }
11
+ scope :received_einvoices, -> { einvoices.where(invoice_type_code: 'AP Invoice') }
12
+ scope :sent_einvoices, -> { einvoices.where(invoice_type_code: 'AR Invoice') }
12
13
  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
@@ -83,11 +83,11 @@ end
83
83
  # @format: uuid
84
84
  field :latest_magic_link_id
85
85
 
86
- # Possible statuses for a Magic Link.
86
+ # Status of the most recent magic link made for this company
87
87
  field :latest_magic_link_status
88
88
 
89
89
  belongs_to :company, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
90
90
  belongs_to :account, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
91
91
 
92
92
 
93
- end
93
+ end
@@ -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
@@ -323,6 +323,14 @@ end
323
323
  # @format: double
324
324
  field :base_currency_outstanding_balance_amount
325
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
+
326
334
 
327
335
 
328
336
  end
@@ -0,0 +1,49 @@
1
+ class Schema::InvoiceWorkflowStatusHistory < Lockstep::ApiRecord
2
+
3
+ # ApiRecord will crash unless `id_ref` is defined
4
+ def self.id_ref
5
+ nil
6
+ end
7
+
8
+ # The unique ID of this record, automatically assigned by Lockstep when this record is
9
+ # added to the Accounting Data Services platform.
10
+ # @type: string
11
+ # @format: uuid
12
+ field :invoice_workflow_status_history_id
13
+
14
+ # The invoice ID associated with the invoice workflow status history.
15
+ # @type: string
16
+ # @format: uuid
17
+ field :invoice_id
18
+
19
+ # The workflow status ID associated with the invoice workflow status history.
20
+ # @type: string
21
+ # @format: uuid
22
+ field :workflow_status_id
23
+
24
+ # The GroupKey uniquely identifies a single Accounting Data Services Platform account. All records for this
25
+ # account will share the same GroupKey value. GroupKey values cannot be changed once created.
26
+ #
27
+ # For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
28
+ # @type: string
29
+ # @format: uuid
30
+ field :group_key
31
+
32
+ # The notes for the invoice workflow status history.
33
+ # @type: string
34
+ field :workflow_status_notes
35
+
36
+ # The date that the invoice workflow status history was created.
37
+ # @type: string
38
+ # @format: date-time
39
+ field :created, Types::Params::DateTime
40
+
41
+ # The ID of the user who created the invoice workflow status history.
42
+ # @type: string
43
+ # @format: uuid
44
+ field :created_user_id
45
+
46
+ belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
47
+
48
+
49
+ end
@@ -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
@@ -103,4 +103,4 @@ end
103
103
  has_many :lines, {:class_name=>"Schema::JournalEntryLine", :included=>true}
104
104
  has_many :attachments, {:class_name=>"Schema::Attachment", :included=>true}
105
105
 
106
- 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
@@ -93,6 +93,10 @@ end
93
93
  # @type: string
94
94
  field :memo
95
95
 
96
+ # Dimensions for this journal entry line.
97
+ # @type: object
98
+ field :dimensions
99
+
96
100
  # The date that the journal entry line was created.
97
101
  # @type: string
98
102
  # @format: date-time
@@ -118,7 +122,7 @@ end
118
122
  # @format: date-time
119
123
  field :source_modified_date, Types::Params::DateTime
120
124
 
121
- # The journal entry for this journal entry line.
125
+ # The journal entry for this journal entry line.
122
126
  # To retrieve this item, specify `JournalEntry` in the "Include" parameter for your query.
123
127
  field :journal_entry
124
128
 
@@ -126,4 +130,4 @@ end
126
130
  belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
127
131
 
128
132
 
129
- end
133
+ end
@@ -73,6 +73,10 @@ end
73
73
  # @type: string
74
74
  field :memo
75
75
 
76
+ # A JSON string representing the dimensions for this journal entry line.
77
+ # @type: object
78
+ field :dimensions
79
+
76
80
  # If known, the date when this record was created according to the originating financial system
77
81
  # in which this record is maintained. If the originating financial system does not maintain a
78
82
  # created-date, leave this field null.
@@ -36,12 +36,11 @@ end
36
36
  # @type: string
37
37
  field :erp_key
38
38
 
39
- # Possible statuses for a record that supports ERP write.
40
- field :erp_write_status
39
+ # Possible statuses for a record that supports ERP Update.
40
+ field :erp_update_status
41
41
 
42
- # The name of the ErpWriteStatus for this Payment
43
- # @type: string
44
- field :erp_write_status_name
42
+ # Possible actions for a record that supports ERP Update.
43
+ field :erp_update_action
45
44
 
46
45
  # The type of payment, AR Payment or AP Payment.
47
46
  #
@@ -41,12 +41,11 @@ end
41
41
  # @type: string
42
42
  field :erp_key
43
43
 
44
- # Possible statuses for a record that supports ERP write.
45
- field :erp_write_status
44
+ # Possible statuses for a record that supports ERP Update.
45
+ field :erp_update_status
46
46
 
47
- # The name of the ErpWriteStatus for this payment application
48
- # @type: string
49
- field :erp_write_status_name
47
+ # Possible actions for a record that supports ERP Update.
48
+ field :erp_update_action
50
49
 
51
50
  # The entry number of this payment application. This is often a journal entry number, confirmation code,
52
51
  # or other identifying field for this payment application.
@@ -20,11 +20,13 @@ end
20
20
  field :group_key
21
21
 
22
22
  # The status of processing for this SyncRequest. When a SyncRequest is created, it is flagged as `Ready`.
23
+ # While it is in queue waiting to be picked up, its status moves to `Connector`.
23
24
  # When it is picked up for execution, its status moves to `In Progress`. When it is complete, its status
24
25
  # will move to `Success` or `Failed`. If another API call cancels the SyncRequest, its status will move
25
26
  # to `Cancelled`.
26
27
  #
27
28
  # * Ready
29
+ # * Connector
28
30
  # * In Progress
29
31
  # * Cancelled
30
32
  # * Failed
@@ -1,10 +1,11 @@
1
1
  class Schema::WorkflowStatus < Lockstep::ApiRecord
2
- # ApiRecord will crash unless `id_ref` is defined
3
- def self.id_ref
4
- nil
5
- end
6
2
 
7
- # The unique ID of this record, automatically assigned by Lockstep when this record is
3
+ # ApiRecord will crash unless `id_ref` is defined
4
+ def self.id_ref
5
+ nil
6
+ end
7
+
8
+ # The unique ID of this record, automatically assigned by Lockstep when this record is
8
9
  # added to the Accounting Data Services platform.
9
10
  # @type: string
10
11
  # @format: uuid
@@ -59,7 +60,9 @@ class Schema::WorkflowStatus < Lockstep::ApiRecord
59
60
  # @format: uuid
60
61
  field :modified_user_id
61
62
 
62
- belongs_to :parent_workflow_status, { class_name: 'Lockstep::WorkflowStatus', primary_key: :id, foreign_key: 'parent_workflow_status_id' }
63
- belongs_to :created_user, { class_name: 'Lockstep::User', primary_key: :user_id, foreign_key: 'created_user_id' }
64
- belongs_to :modified_user, { class_name: 'Lockstep::User', primary_key: :user_id, foreign_key: 'modified_user_id' }
65
- end
63
+ belongs_to :parent_workflow_status, {:class_name=>"Lockstep::WorkflowStatus", :primary_key=>:id, :foreign_key=>"parent_workflow_status_id"}
64
+ belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
65
+ belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
66
+
67
+
68
+ end