lockstep_rails 0.3.61 → 0.3.63
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/app/concepts/lockstep/api_record.rb +6 -2
- data/app/models/lockstep/connection.rb +1 -1
- data/app/models/lockstep/magic_link.rb +2 -1
- data/app/platform_api/schema/cashflow_report.rb +6 -2
- data/app/platform_api/schema/company_sync.rb +1 -1
- data/app/platform_api/schema/credit_memo_applied.rb +12 -0
- data/app/platform_api/schema/email_reply_generator_request.rb +23 -0
- data/app/platform_api/schema/email_reply_generator_response.rb +16 -0
- data/app/platform_api/schema/email_reply_generator_suggestions.rb +18 -0
- data/app/platform_api/schema/financial_account_balance_history.rb +7 -0
- data/app/platform_api/schema/financial_account_balance_history_sync.rb +4 -1
- data/app/platform_api/schema/invoice.rb +12 -0
- data/app/platform_api/schema/invoice_line.rb +12 -0
- data/app/platform_api/schema/notification_data.rb +36 -0
- data/app/platform_api/schema/payables_coming_due.rb +13 -13
- data/app/platform_api/schema/payment.rb +16 -0
- data/app/platform_api/schema/payment_applied.rb +12 -0
- data/app/platform_api/schema/payment_detail.rb +7 -0
- data/app/platform_api/schema/payment_sync.rb +4 -0
- data/app/platform_api/schema/sf_notification.rb +39 -0
- data/app/platform_api/schema/sync_entity_result.rb +4 -0
- data/app/platform_api/swagger.json +639 -90
- data/lib/lockstep_rails/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c66de5c8265c8bf92d2d07b205a0a9de6340f00105ce5e6110cbc5002e73f0c
|
4
|
+
data.tar.gz: 7a190529d4a770714f9708aa3305c3eda6c23f92a1f80ce71eb6186f8cc2e6c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84608aaf9a7aebf1946f49b9e85dcced53535ad6832f0c0d3f610f255bdf6a016110dff2b78107b6b18d99734b8c968ce4ddc58b89e39ffa7312d4718100e142
|
7
|
+
data.tar.gz: 9553d0c197a324d3bf7980b518d42264cc4e9533867ee1847b60148612e315965401b637896c3751422ca7b9db358dccd31404646822b4a87608768b1175ba94
|
@@ -423,9 +423,12 @@ module Lockstep
|
|
423
423
|
# raise StandardError.new("delete_all doesn't exist. Did you mean destroy_all?")
|
424
424
|
# end
|
425
425
|
|
426
|
-
def self.bulk_import(new_objects, slice_size =
|
426
|
+
def self.bulk_import(new_objects, slice_size = nil)
|
427
427
|
return [] if new_objects.blank?
|
428
428
|
|
429
|
+
# default slice size to 1000, if its blank or if its 0
|
430
|
+
slice_size = 1000 if slice_size.blank? || slice_size.to_i == 0
|
431
|
+
|
429
432
|
# Batch saves seem to fail if they're too big. We'll slice it up into multiple posts if they are.
|
430
433
|
new_objects.each_slice(slice_size) do |objects|
|
431
434
|
# attributes_for_saving
|
@@ -675,7 +678,8 @@ module Lockstep
|
|
675
678
|
@attributes.merge!(results)
|
676
679
|
@attributes.merge!(@unsaved_attributes)
|
677
680
|
|
678
|
-
|
681
|
+
# commenting for now as its a duplicate call
|
682
|
+
# merge_relations
|
679
683
|
@unsaved_attributes = {}
|
680
684
|
|
681
685
|
create_setters_and_getters!
|
@@ -3,7 +3,7 @@ class Lockstep::Connection < Lockstep::ApiRecord
|
|
3
3
|
self.id_ref = 'company_id'
|
4
4
|
load_schema(Schema::Company)
|
5
5
|
|
6
|
-
enum company_type:
|
6
|
+
enum company_type: ['Customer', 'Vendor', 'Group', 'Company', 'Third Party'].freeze
|
7
7
|
|
8
8
|
has_many :contacts, class_name: 'Lockstep::Contact', included: true
|
9
9
|
belongs_to :created_user, class_name: 'Lockstep::User', foreign_key: :created_user_id, primary_key: :user_id
|
@@ -1,7 +1,8 @@
|
|
1
1
|
class Lockstep::MagicLink < Lockstep::ApiRecord
|
2
2
|
self.model_name_uri = "v1/useraccounts/magic-links"
|
3
|
-
self.id_ref = "
|
3
|
+
self.id_ref = "magic_link_id"
|
4
4
|
self.query_path = nil
|
5
|
+
load_schema(Schema::MagicLink)
|
5
6
|
|
6
7
|
def self.generate(email_id, expiry, app_id, user_role, company_id, accounting_profile_id)
|
7
8
|
body = { email: email_id,
|
@@ -10,7 +10,11 @@ end
|
|
10
10
|
# @format: int32
|
11
11
|
field :timeframe
|
12
12
|
|
13
|
-
#
|
13
|
+
# The base currency code of the group.
|
14
|
+
# @type: string
|
15
|
+
field :base_currency_code
|
16
|
+
|
17
|
+
# Amount of payments collected based in the timeframe in the group's base currency
|
14
18
|
# @type: number
|
15
19
|
# @format: double
|
16
20
|
field :payments_collected
|
@@ -20,7 +24,7 @@ end
|
|
20
24
|
# @format: int32
|
21
25
|
field :payments_collected_count
|
22
26
|
|
23
|
-
# Amount of invoices billed based in the timeframe
|
27
|
+
# Amount of invoices billed based in the timeframe in the group's base currency
|
24
28
|
# @type: number
|
25
29
|
# @format: double
|
26
30
|
field :invoices_billed
|
@@ -15,7 +15,7 @@ end
|
|
15
15
|
# Example: If you store your company records in a database, whatever the primary key for the company table is
|
16
16
|
# in the database should be the `ErpKey`.
|
17
17
|
#
|
18
|
-
# Example: If you use a financial system such as
|
18
|
+
# Example: If you use a financial system such as QuickBooks or Xero, look for the primary ID number of the
|
19
19
|
# company record within that financial system.
|
20
20
|
#
|
21
21
|
# For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
@@ -50,6 +50,13 @@ 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
|
55
|
+
|
56
|
+
# The name of the ErpWriteStatus for this credit memo application
|
57
|
+
# @type: string
|
58
|
+
field :erp_write_status_name
|
59
|
+
|
53
60
|
# Reference number for the applied credit memo.
|
54
61
|
# @type: integer
|
55
62
|
# @format: int32
|
@@ -93,6 +100,11 @@ end
|
|
93
100
|
# @format: uuid
|
94
101
|
field :app_enrollment_id
|
95
102
|
|
103
|
+
# The date on which this record was last modified in source ERP.
|
104
|
+
# @type: string
|
105
|
+
# @format: date-time
|
106
|
+
field :source_modified_date, Types::Params::DateTime
|
107
|
+
|
96
108
|
# The credit memo invoice associated with this applied credit memo
|
97
109
|
field :credit_memo_invoice
|
98
110
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Schema::EmailReplyGeneratorRequest < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The date associated with the email
|
9
|
+
# @type: string
|
10
|
+
# @format: date-time
|
11
|
+
field :date, Types::Params::DateTime
|
12
|
+
|
13
|
+
# The body associated with the email
|
14
|
+
# @type: string
|
15
|
+
field :body
|
16
|
+
|
17
|
+
# The subject associated with the email
|
18
|
+
# @type: string
|
19
|
+
field :subject
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class Schema::EmailReplyGeneratorResponse < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The id for this request in the GMS system
|
9
|
+
# @type: string
|
10
|
+
# @format: uuid
|
11
|
+
field :message_id
|
12
|
+
|
13
|
+
|
14
|
+
has_many :suggestions, {:class_name=>"Schema::EmailReplyGeneratorSuggestions", :included=>true}
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class Schema::EmailReplyGeneratorSuggestions < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The kind of reply generated by the GMS Api
|
9
|
+
# @type: string
|
10
|
+
field :kind
|
11
|
+
|
12
|
+
# The body of the reply generated by the GMS Api
|
13
|
+
# @type: string
|
14
|
+
field :body
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
end
|
@@ -63,6 +63,13 @@ end
|
|
63
63
|
# @format: double
|
64
64
|
field :balance
|
65
65
|
|
66
|
+
# Financial Account Balance Types
|
67
|
+
field :balance_type
|
68
|
+
|
69
|
+
# The name of the BalanceType for this record.
|
70
|
+
# @type: string
|
71
|
+
field :balance_type_name
|
72
|
+
|
66
73
|
# The date on which this financial account balance history record was created.
|
67
74
|
# @type: string
|
68
75
|
# @format: date-time
|
@@ -15,7 +15,7 @@ end
|
|
15
15
|
# originating financial system for this record.
|
16
16
|
# Example: If you store your company records in a database, whatever the primary key for the company table is
|
17
17
|
# in the database should be the ErpKey.
|
18
|
-
# Example: If you use a financial system such as
|
18
|
+
# Example: If you use a financial system such as QuickBooks or Xero, look for the primary ID number of the
|
19
19
|
# company record within that financial system.
|
20
20
|
# @type: string
|
21
21
|
field :financial_account_erp_key
|
@@ -51,6 +51,9 @@ end
|
|
51
51
|
# @format: double
|
52
52
|
field :balance
|
53
53
|
|
54
|
+
# The balance type of this period. If left null, the balance type will be determined by the balance.
|
55
|
+
field :balance_type
|
56
|
+
|
54
57
|
|
55
58
|
|
56
59
|
end
|
@@ -226,6 +226,18 @@ end
|
|
226
226
|
# @format: double
|
227
227
|
field :base_currency_outstanding_balance_amount
|
228
228
|
|
229
|
+
# Possible statuses for a record that supports ERP write.
|
230
|
+
field :erp_write_status
|
231
|
+
|
232
|
+
# The name of the ErpWriteStatus for this Invoice
|
233
|
+
# @type: string
|
234
|
+
field :erp_write_status_name
|
235
|
+
|
236
|
+
# The date on which this record was last modified in source ERP.
|
237
|
+
# @type: string
|
238
|
+
# @format: date-time
|
239
|
+
field :source_modified_date, Types::Params::DateTime
|
240
|
+
|
229
241
|
# The Company associated to this invoice.
|
230
242
|
# To retrieve this item, specify `Company` in the "Include" parameter for your query.
|
231
243
|
field :company
|
@@ -133,6 +133,18 @@ 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
|
138
|
+
|
139
|
+
# The name of the ErpWriteStatus for this Invoice
|
140
|
+
# @type: string
|
141
|
+
field :erp_write_status_name
|
142
|
+
|
143
|
+
# The date on which this record was last modified in source ERP.
|
144
|
+
# @type: string
|
145
|
+
# @format: date-time
|
146
|
+
field :source_modified_date, Types::Params::DateTime
|
147
|
+
|
136
148
|
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
137
149
|
belongs_to :modified_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"modified_user_id"}
|
138
150
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class Schema::NotificationData < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The id of the subscription due to which this notification has been sent
|
9
|
+
# @type: string
|
10
|
+
field :subscription_id
|
11
|
+
|
12
|
+
# The client application identifier
|
13
|
+
# @type: string
|
14
|
+
field :application_id
|
15
|
+
|
16
|
+
# Application unique identifier for this company
|
17
|
+
# @type: string
|
18
|
+
# @format: uuid
|
19
|
+
field :external_id
|
20
|
+
|
21
|
+
# Unknown
|
22
|
+
# @type: string
|
23
|
+
field :network_id
|
24
|
+
|
25
|
+
# expirationDateTime if the subscription has one
|
26
|
+
# @type: string
|
27
|
+
# @format: date-time
|
28
|
+
field :expiration_date_time, Types::Params::DateTime
|
29
|
+
|
30
|
+
# Specific info about this event
|
31
|
+
# @type: object
|
32
|
+
field :service_attributes
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
end
|
@@ -5,12 +5,6 @@ def self.id_ref
|
|
5
5
|
nil
|
6
6
|
end
|
7
7
|
|
8
|
-
# This model represents all the payables that are
|
9
|
-
# either already due or due within this date.
|
10
|
-
# @type: string
|
11
|
-
# @format: date-time
|
12
|
-
field :due_date, Types::Params::DateTime
|
13
|
-
|
14
8
|
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
15
9
|
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
16
10
|
#
|
@@ -19,19 +13,19 @@ end
|
|
19
13
|
# @format: uuid
|
20
14
|
field :group_key
|
21
15
|
|
22
|
-
#
|
23
|
-
# @type:
|
24
|
-
|
16
|
+
# Number of bills due for this time period
|
17
|
+
# @type: integer
|
18
|
+
# @format: int32
|
19
|
+
field :number_of_bills_due
|
25
20
|
|
26
21
|
# The unique Lockstep Id for the Vendor
|
27
22
|
# @type: string
|
28
23
|
# @format: uuid
|
29
24
|
field :vendor_id
|
30
25
|
|
31
|
-
#
|
32
|
-
# @type:
|
33
|
-
|
34
|
-
field :number_of_bills_due
|
26
|
+
# Name for this company
|
27
|
+
# @type: string
|
28
|
+
field :vendor_name
|
35
29
|
|
36
30
|
# Primary Contact for this company
|
37
31
|
# @type: string
|
@@ -51,6 +45,12 @@ end
|
|
51
45
|
# @format: double
|
52
46
|
field :total_amount_due
|
53
47
|
|
48
|
+
# This model represents all the payables that are
|
49
|
+
# either already due or due within this date.
|
50
|
+
# @type: string
|
51
|
+
# @format: date-time
|
52
|
+
field :due_date, Types::Params::DateTime
|
53
|
+
|
54
54
|
|
55
55
|
|
56
56
|
end
|
@@ -36,6 +36,13 @@ 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
|
41
|
+
|
42
|
+
# The name of the ErpWriteStatus for this Payment
|
43
|
+
# @type: string
|
44
|
+
field :erp_write_status_name
|
45
|
+
|
39
46
|
# The type of payment, AR Payment or AP Payment.
|
40
47
|
#
|
41
48
|
# Recognized PaymentType values are:
|
@@ -94,6 +101,10 @@ end
|
|
94
101
|
# @type: string
|
95
102
|
field :currency_code
|
96
103
|
|
104
|
+
# The Bank account id for the company to which this payment belongs.
|
105
|
+
# @type: string
|
106
|
+
field :bank_account_id
|
107
|
+
|
97
108
|
# Reference code for the payment for the given Erp system.
|
98
109
|
# @type: string
|
99
110
|
field :reference_code
|
@@ -154,6 +165,11 @@ end
|
|
154
165
|
# @type: string
|
155
166
|
field :service_fabric_status
|
156
167
|
|
168
|
+
# The date on which this record was last modified in source ERP.
|
169
|
+
# @type: string
|
170
|
+
# @format: date-time
|
171
|
+
field :source_modified_date, Types::Params::DateTime
|
172
|
+
|
157
173
|
belongs_to :company, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
158
174
|
belongs_to :account, {:class_name=>"Lockstep::Account", :primary_key=>:company_id, :foreign_key=>"company_id"}
|
159
175
|
belongs_to :created_user, {:class_name=>"Lockstep::User", :primary_key=>:user_id, :foreign_key=>"created_user_id"}
|
@@ -41,6 +41,13 @@ 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
|
46
|
+
|
47
|
+
# The name of the ErpWriteStatus for this payment application
|
48
|
+
# @type: string
|
49
|
+
field :erp_write_status_name
|
50
|
+
|
44
51
|
# The entry number of this payment application. This is often a journal entry number, confirmation code,
|
45
52
|
# or other identifying field for this payment application.
|
46
53
|
# @type: integer
|
@@ -85,6 +92,11 @@ end
|
|
85
92
|
# @format: uuid
|
86
93
|
field :app_enrollment_id
|
87
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
|
+
|
88
100
|
# The payment associated with this applied payment
|
89
101
|
field :payment
|
90
102
|
|
@@ -43,6 +43,13 @@ end
|
|
43
43
|
# @type: string
|
44
44
|
field :email
|
45
45
|
|
46
|
+
# Possible statuses for a record that supports ERP write.
|
47
|
+
field :erp_write_status
|
48
|
+
|
49
|
+
# The name of the ErpWriteStatus for this payment
|
50
|
+
# @type: string
|
51
|
+
field :erp_write_status_name
|
52
|
+
|
46
53
|
# The currency code of the payment.
|
47
54
|
# @type: string
|
48
55
|
field :currency_code
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class Schema::SfNotification < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# Notification ID
|
9
|
+
# @type: string
|
10
|
+
# @format: uuid
|
11
|
+
field :id
|
12
|
+
|
13
|
+
# Source of the Notification
|
14
|
+
# @type: string
|
15
|
+
field :source
|
16
|
+
|
17
|
+
# Version of Notification
|
18
|
+
# @type: string
|
19
|
+
field :spec_version
|
20
|
+
|
21
|
+
# Describes event from Source
|
22
|
+
# @type: string
|
23
|
+
field :type
|
24
|
+
|
25
|
+
# The ID of the type in question (ex. NewPayment type would have the subject be a PaymentId)
|
26
|
+
# @type: string
|
27
|
+
# @format: uuid
|
28
|
+
field :subject
|
29
|
+
|
30
|
+
# RFC 2046 format content type
|
31
|
+
# @type: string
|
32
|
+
field :data_content_type
|
33
|
+
|
34
|
+
# Extra information about the event
|
35
|
+
field :data
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
end
|