QNE 0.6.0 → 0.7.0
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/Gemfile.lock +16 -10
- data/README.md +12 -0
- data/lib/QNE/stock_report/stock_location_balance.rb +19 -0
- data/lib/QNE/version.rb +1 -1
- data/lib/connection.rb +5 -0
- data/lib/stock_reports.rb +17 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '09370058db0c46e32d7127778941eadf39eff5a95d562c2bf98e180a473d19e0'
|
|
4
|
+
data.tar.gz: dfc85a8e1b754302b9ccb6e10e82372a6bdbdfe59229ddbd6a56a696337079e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31f912a24415c8a3ad9d8f69b0c274976fd4d3654d4f41802244c80135df17f81998512bf8fc1a6050f61c651dd417ee8cfdd63cf27746df8ed31ececfc4c363
|
|
7
|
+
data.tar.gz: a269f96d5ca55adc9f8cc0b2295e0c77b4449d14a4d69728dab5206cf8001ae358635df7bd6404b73ece6ed35c837f13f8bcbddb8be1502268b43f1897e40c2e
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
QNE (0.
|
|
4
|
+
QNE (0.7.0)
|
|
5
5
|
faraday (>= 1.10)
|
|
6
6
|
faraday-net_http_persistent (>= 1.2)
|
|
7
7
|
faraday-retry
|
|
@@ -10,7 +10,7 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
addressable (2.8.
|
|
13
|
+
addressable (2.8.9)
|
|
14
14
|
public_suffix (>= 2.0.2, < 8.0)
|
|
15
15
|
ast (2.4.3)
|
|
16
16
|
bigdecimal (4.0.1)
|
|
@@ -19,7 +19,7 @@ GEM
|
|
|
19
19
|
bigdecimal
|
|
20
20
|
rexml
|
|
21
21
|
diff-lcs (1.6.2)
|
|
22
|
-
faraday (2.14.
|
|
22
|
+
faraday (2.14.1)
|
|
23
23
|
faraday-net_http (>= 2.0, < 3.5)
|
|
24
24
|
json
|
|
25
25
|
logger
|
|
@@ -31,19 +31,24 @@ GEM
|
|
|
31
31
|
faraday-retry (2.4.0)
|
|
32
32
|
faraday (~> 2.0)
|
|
33
33
|
hashdiff (1.2.1)
|
|
34
|
-
json (2.18.
|
|
34
|
+
json (2.18.1)
|
|
35
|
+
json-schema (6.1.0)
|
|
36
|
+
addressable (~> 2.8)
|
|
37
|
+
bigdecimal (>= 3.1, < 5)
|
|
35
38
|
language_server-protocol (3.17.0.5)
|
|
36
39
|
lint_roller (1.1.0)
|
|
37
40
|
logger (1.7.0)
|
|
41
|
+
mcp (0.7.1)
|
|
42
|
+
json-schema (>= 4.1)
|
|
38
43
|
net-http (0.9.1)
|
|
39
44
|
uri (>= 0.11.1)
|
|
40
45
|
net-http-persistent (4.0.8)
|
|
41
46
|
connection_pool (>= 2.2.4, < 4)
|
|
42
47
|
parallel (1.27.0)
|
|
43
|
-
parser (3.3.10.
|
|
48
|
+
parser (3.3.10.2)
|
|
44
49
|
ast (~> 2.4.1)
|
|
45
50
|
racc
|
|
46
|
-
prism (1.
|
|
51
|
+
prism (1.9.0)
|
|
47
52
|
public_suffix (7.0.2)
|
|
48
53
|
racc (1.8.1)
|
|
49
54
|
rainbow (3.1.1)
|
|
@@ -59,19 +64,20 @@ GEM
|
|
|
59
64
|
rspec-expectations (3.13.5)
|
|
60
65
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
61
66
|
rspec-support (~> 3.13.0)
|
|
62
|
-
rspec-mocks (3.13.
|
|
67
|
+
rspec-mocks (3.13.8)
|
|
63
68
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
64
69
|
rspec-support (~> 3.13.0)
|
|
65
|
-
rspec-support (3.13.
|
|
66
|
-
rubocop (1.
|
|
70
|
+
rspec-support (3.13.7)
|
|
71
|
+
rubocop (1.85.0)
|
|
67
72
|
json (~> 2.3)
|
|
68
73
|
language_server-protocol (~> 3.17.0.2)
|
|
69
74
|
lint_roller (~> 1.1.0)
|
|
75
|
+
mcp (~> 0.6)
|
|
70
76
|
parallel (~> 1.10)
|
|
71
77
|
parser (>= 3.3.0.2)
|
|
72
78
|
rainbow (>= 2.2.2, < 4.0)
|
|
73
79
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
74
|
-
rubocop-ast (>= 1.
|
|
80
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
75
81
|
ruby-progressbar (~> 1.7)
|
|
76
82
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
77
83
|
rubocop-ast (1.49.0)
|
data/README.md
CHANGED
|
@@ -382,6 +382,18 @@ conn.stock_locations.all
|
|
|
382
382
|
|
|
383
383
|
_Note: `filters` and `queries` won't work for this specific action._
|
|
384
384
|
|
|
385
|
+
### Stock Reports
|
|
386
|
+
|
|
387
|
+
**1. Fetch all stocks reports available balance by date**
|
|
388
|
+
|
|
389
|
+
```ruby
|
|
390
|
+
conn.stock_reports.find_stocks_location_balance_by_date
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
```ruby
|
|
394
|
+
conn.stock_reports.find_stocks_location_balance_by_date(as_of_date: Time.current)
|
|
395
|
+
```
|
|
396
|
+
|
|
385
397
|
### Terms
|
|
386
398
|
|
|
387
399
|
**1. Fetch all terms**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module QNE
|
|
4
|
+
module StockReport
|
|
5
|
+
class StockLocationBalance
|
|
6
|
+
PATH = '/api/StockReports/StockLocationBalance'
|
|
7
|
+
|
|
8
|
+
def initialize(conn, as_of_date)
|
|
9
|
+
@conn = conn
|
|
10
|
+
@as_of_date = as_of_date.strftime('%Y-%m-%d')
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def call
|
|
14
|
+
params = "?asOfDate=#{@as_of_date}"
|
|
15
|
+
@conn.get(PATH + params)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
data/lib/QNE/version.rb
CHANGED
data/lib/connection.rb
CHANGED
|
@@ -7,6 +7,7 @@ require_relative 'default_tax_code'
|
|
|
7
7
|
require_relative 'sales_invoices'
|
|
8
8
|
require_relative 'sales_orders'
|
|
9
9
|
require_relative 'stocks'
|
|
10
|
+
require_relative 'stock_reports'
|
|
10
11
|
require_relative 'stock_locations'
|
|
11
12
|
require_relative 'system_version'
|
|
12
13
|
require_relative 'terms'
|
|
@@ -57,6 +58,10 @@ module QNE
|
|
|
57
58
|
@stocks ||= QNE::Stocks.new(connection)
|
|
58
59
|
end
|
|
59
60
|
|
|
61
|
+
def stock_reports
|
|
62
|
+
@stock_reports ||= QNE::StockReports.new(connection)
|
|
63
|
+
end
|
|
64
|
+
|
|
60
65
|
def terms
|
|
61
66
|
@terms ||= QNE::Terms.new(connection)
|
|
62
67
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'QNE/stock_report/stock_location_balance'
|
|
4
|
+
|
|
5
|
+
module QNE
|
|
6
|
+
class StockReports < Base
|
|
7
|
+
include ::QNE::QueryBuilder
|
|
8
|
+
|
|
9
|
+
def find_stocks_location_balance_by_date(as_of_date: Date.today)
|
|
10
|
+
@response = QNE::StockReport::StockLocationBalance.new(
|
|
11
|
+
conn, as_of_date
|
|
12
|
+
).call
|
|
13
|
+
|
|
14
|
+
parse_to_json(@response.body)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: QNE
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nujian Den Mark Meralpis
|
|
@@ -119,6 +119,7 @@ files:
|
|
|
119
119
|
- lib/QNE/stock/find.rb
|
|
120
120
|
- lib/QNE/stock/uoms.rb
|
|
121
121
|
- lib/QNE/stock_location/all.rb
|
|
122
|
+
- lib/QNE/stock_report/stock_location_balance.rb
|
|
122
123
|
- lib/QNE/tax_code/all.rb
|
|
123
124
|
- lib/QNE/tax_code/input_tax_codes.rb
|
|
124
125
|
- lib/QNE/tax_code/output_tax_codes.rb
|
|
@@ -137,6 +138,7 @@ files:
|
|
|
137
138
|
- lib/sales_invoices.rb
|
|
138
139
|
- lib/sales_orders.rb
|
|
139
140
|
- lib/stock_locations.rb
|
|
141
|
+
- lib/stock_reports.rb
|
|
140
142
|
- lib/stocks.rb
|
|
141
143
|
- lib/system_version.rb
|
|
142
144
|
- lib/tax_codes.rb
|