lockstep_rails 0.3.35 → 0.3.36
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05bd7ba3de1568889d934bc0160f923ecf173f1fe5f357856a9fc221d07fe039
|
4
|
+
data.tar.gz: 4a1458573f08c1b33aa11da01487df04ca403e9bff7f9e8039f723284e47f62b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 887d60f6868d2d525de634193da364ff24a86447d3b1e5616421d7c4ccefcb3c5b55d55c64ff3be0c7ec6f9ad94e794e3951ada7e0e9ffb3eef3834c4da6824f
|
7
|
+
data.tar.gz: 7adadb32cc6a971a5c9e4c816cd2e12f15aa85c845a73dab446f645cb1061d9f0f38d82da34b9d30cc3c0c84c161de4170d0cb5336b7e34c1309e981a37205da
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class Lockstep::ApHeader < Lockstep::ApiRecord
|
2
|
+
self.model_name_uri = "v1/Reports/ap-header"
|
3
|
+
self.id_ref = "group_key"
|
4
|
+
self.query_path= ""
|
5
|
+
load_schema(Schema::ApHeaderInfo)
|
6
|
+
|
7
|
+
end
|
8
|
+
|
9
|
+
class Lockstep::Query
|
10
|
+
# Overriding the build_params method to just add attributes in params without filter option
|
11
|
+
def build_params
|
12
|
+
params = {}
|
13
|
+
criteria[:conditions].first.each do |key|
|
14
|
+
params.merge!({ :"#{key[0].to_s.camelize(:lower)}" => key[1] })
|
15
|
+
end
|
16
|
+
return params
|
17
|
+
end
|
18
|
+
|
19
|
+
# Overrinding the get_results method to parse the single object coming from v1.
|
20
|
+
def get_results(params = {})
|
21
|
+
resp = @klass.resource.get(@klass.query_path, :params => params)
|
22
|
+
|
23
|
+
return [] if %w(404).include?(resp.code.to_s)
|
24
|
+
# TODO handle non 200 response code. Throwing an exception for now
|
25
|
+
raise StandardError.new("#{resp.code} error while fetching: #{resp.body}") unless %w(201 200).include?(resp.code.to_s)
|
26
|
+
|
27
|
+
parsed_response = JSON.parse(resp.body)
|
28
|
+
|
29
|
+
r = parsed_response.transform_keys { |key| key.underscore }
|
30
|
+
@klass.model_name.to_s.constantize.new(r, false)
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class Lockstep::ArHeader < Lockstep::ApiRecord
|
2
|
+
self.model_name_uri = "v1/Reports/ar-header"
|
3
|
+
self.id_ref = "group_key"
|
4
|
+
self.query_path= ""
|
5
|
+
load_schema(Schema::ArHeaderInfo)
|
6
|
+
|
7
|
+
end
|
8
|
+
|
9
|
+
class Lockstep::Query
|
10
|
+
# Overriding the build_params method to just add attributes in params without filter option
|
11
|
+
def build_params
|
12
|
+
params = {}
|
13
|
+
criteria[:conditions].first.each do |key|
|
14
|
+
params.merge!({ :"#{key[0].to_s.camelize(:lower)}" => key[1] })
|
15
|
+
end
|
16
|
+
return params
|
17
|
+
end
|
18
|
+
|
19
|
+
# Overrinding the get_results method to parse the single object coming from v1.
|
20
|
+
def get_results(params = {})
|
21
|
+
resp = @klass.resource.get(@klass.query_path, :params => params)
|
22
|
+
|
23
|
+
return [] if %w(404).include?(resp.code.to_s)
|
24
|
+
# TODO handle non 200 response code. Throwing an exception for now
|
25
|
+
raise StandardError.new("#{resp.code} error while fetching: #{resp.body}") unless %w(201 200).include?(resp.code.to_s)
|
26
|
+
|
27
|
+
parsed_response = JSON.parse(resp.body)
|
28
|
+
|
29
|
+
r = parsed_response.transform_keys { |key| key.underscore }
|
30
|
+
@klass.model_name.to_s.constantize.new(r, false)
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
class Schema::ApHeaderInfo < Lockstep::ApiRecord
|
2
|
+
|
3
|
+
# ApiRecord will crash unless `id_ref` is defined
|
4
|
+
def self.id_ref
|
5
|
+
nil
|
6
|
+
end
|
7
|
+
|
8
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
9
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
10
|
+
#
|
11
|
+
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
12
|
+
# @type: string
|
13
|
+
# @format: uuid
|
14
|
+
field :group_key
|
15
|
+
|
16
|
+
# The date of the report
|
17
|
+
# @type: string
|
18
|
+
# @format: date
|
19
|
+
field :report_date
|
20
|
+
|
21
|
+
# The date of the report
|
22
|
+
# @type: string
|
23
|
+
# @format: uuid
|
24
|
+
field :company_id
|
25
|
+
|
26
|
+
# The total number of vendors..
|
27
|
+
# @type: integer
|
28
|
+
# @format: int32
|
29
|
+
field :total_vendors
|
30
|
+
|
31
|
+
# The total number of bills.
|
32
|
+
# @type: integer
|
33
|
+
# @format: int32
|
34
|
+
field :total_bills
|
35
|
+
|
36
|
+
# The total amount billed.
|
37
|
+
# @type: number
|
38
|
+
# @format: double
|
39
|
+
field :total_billed_amount
|
40
|
+
|
41
|
+
# The total number of advance payments.
|
42
|
+
# @type: number
|
43
|
+
# @format: double
|
44
|
+
field :total_advance_payments
|
45
|
+
|
46
|
+
# The total amount paid.
|
47
|
+
# @type: number
|
48
|
+
# @format: double
|
49
|
+
field :total_paid
|
50
|
+
|
51
|
+
# The total accounts payable amount.
|
52
|
+
# @type: number
|
53
|
+
# @format: double
|
54
|
+
field :total_ap_amount
|
55
|
+
|
56
|
+
# The number of paid bills.
|
57
|
+
# @type: integer
|
58
|
+
# @format: int32
|
59
|
+
field :total_bills_paid
|
60
|
+
|
61
|
+
# The number of past due bills.
|
62
|
+
# @type: integer
|
63
|
+
# @format: int32
|
64
|
+
field :total_bills_past_due
|
65
|
+
|
66
|
+
# The number of bills 90+ days past due.
|
67
|
+
# @type: integer
|
68
|
+
# @format: int32
|
69
|
+
field :total_bills90_days_past_due
|
70
|
+
|
71
|
+
# The total amount past due.
|
72
|
+
# @type: number
|
73
|
+
# @format: double
|
74
|
+
field :total_past_due_amount
|
75
|
+
|
76
|
+
# The total amount for bills 90+ days past due.
|
77
|
+
# @type: number
|
78
|
+
# @format: double
|
79
|
+
field :total_past_due_amount90_days
|
80
|
+
|
81
|
+
# Portion of Total AP that is Past due.
|
82
|
+
# @type: number
|
83
|
+
# @format: double
|
84
|
+
field :percentage_of_total_ap
|
85
|
+
|
86
|
+
# The total amount billed, due this year.
|
87
|
+
# @type: number
|
88
|
+
# @format: double
|
89
|
+
field :total_billed_amount_current_year
|
90
|
+
|
91
|
+
# The total amount billed, due last year.
|
92
|
+
# @type: number
|
93
|
+
# @format: double
|
94
|
+
field :total_billed_amount_previous_year
|
95
|
+
|
96
|
+
# The total of all payments made this year.
|
97
|
+
# @type: number
|
98
|
+
# @format: double
|
99
|
+
field :total_paid_amount_current_year
|
100
|
+
|
101
|
+
# Portion of Total AP that is 90+ days Past due.
|
102
|
+
# @type: number
|
103
|
+
# @format: double
|
104
|
+
field :percentage_of_total_ap90_days_past_due
|
105
|
+
|
106
|
+
# The number of vendors who were paid within the past thirty days.
|
107
|
+
# @type: integer
|
108
|
+
# @format: int32
|
109
|
+
field :vendors_paid_past_thirty_days
|
110
|
+
|
111
|
+
# The total amount paid over the past thirty days.
|
112
|
+
# @type: number
|
113
|
+
# @format: double
|
114
|
+
field :amount_paid_past_thirty_days
|
115
|
+
|
116
|
+
# The amount in advance from the payments made over the past thirty days.
|
117
|
+
# @type: number
|
118
|
+
# @format: double
|
119
|
+
field :advance_payment_amount_past_thirty_days
|
120
|
+
|
121
|
+
# The number of bills paid over the past thirty days.
|
122
|
+
# @type: integer
|
123
|
+
# @format: int32
|
124
|
+
field :bills_paid_past_thirty_days
|
125
|
+
|
126
|
+
# The number of vendors that sent bills over the the past thirty days.
|
127
|
+
# @type: integer
|
128
|
+
# @format: int32
|
129
|
+
field :billing_vendors_past_thirty_days
|
130
|
+
|
131
|
+
# The total amount billed over the past thirty days.
|
132
|
+
# @type: number
|
133
|
+
# @format: double
|
134
|
+
field :amount_billed_past_thirty_days
|
135
|
+
|
136
|
+
# The amount outstanding on the bills received over the past thirty days.
|
137
|
+
# @type: number
|
138
|
+
# @format: double
|
139
|
+
field :amount_due_past_thirty_days
|
140
|
+
|
141
|
+
# The number of bills received over the past thirty days.
|
142
|
+
# @type: integer
|
143
|
+
# @format: int32
|
144
|
+
field :bills_past_thirty_days
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
end
|
@@ -5,9 +5,9 @@ def self.id_ref
|
|
5
5
|
nil
|
6
6
|
end
|
7
7
|
|
8
|
-
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
9
|
-
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
10
|
-
#
|
8
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
9
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
10
|
+
#
|
11
11
|
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
12
12
|
# @type: string
|
13
13
|
# @format: uuid
|
@@ -16,7 +16,12 @@ end
|
|
16
16
|
# The date of the report
|
17
17
|
# @type: string
|
18
18
|
# @format: date
|
19
|
-
field :
|
19
|
+
field :report_date
|
20
|
+
|
21
|
+
# The date of the report
|
22
|
+
# @type: string
|
23
|
+
# @format: uuid
|
24
|
+
field :company_id
|
20
25
|
|
21
26
|
# The total number of customers.
|
22
27
|
# @type: integer
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockstep_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vivek AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -46,8 +46,10 @@ files:
|
|
46
46
|
- app/concepts/lockstep/relation_array.rb
|
47
47
|
- app/helpers/types.rb
|
48
48
|
- app/models/lockstep/account.rb
|
49
|
+
- app/models/lockstep/ap_header.rb
|
49
50
|
- app/models/lockstep/api_key.rb
|
50
51
|
- app/models/lockstep/app_enrollment.rb
|
52
|
+
- app/models/lockstep/ar_header.rb
|
51
53
|
- app/models/lockstep/connection.rb
|
52
54
|
- app/models/lockstep/contact.rb
|
53
55
|
- app/models/lockstep/customer_summary.rb
|
@@ -78,6 +80,7 @@ files:
|
|
78
80
|
- app/platform_api/schema/activity_x_ref.rb
|
79
81
|
- app/platform_api/schema/aging.rb
|
80
82
|
- app/platform_api/schema/ap_aging_header_info.rb
|
83
|
+
- app/platform_api/schema/ap_header_info.rb
|
81
84
|
- app/platform_api/schema/api_key.rb
|
82
85
|
- app/platform_api/schema/api_key_fetch_result.rb
|
83
86
|
- app/platform_api/schema/app_enrollment.rb
|