QNE 0.7.1 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2babe79332b2cb68b2728bdb74b1ae9515067ae3ce9e4c9264f055d3f48a8883
4
- data.tar.gz: cd638f8b27b31ec8486e6e59e813472d177f0767c3879f247f468817e5bc67f6
3
+ metadata.gz: bfcb0bccef66061d74adbb48ecf4ea2257706c617e2f81a3d74e64840a6bfb7d
4
+ data.tar.gz: 7ab084026ffc578fa66cc753c23289576651163747dbdf5c53e721f47c6d19ef
5
5
  SHA512:
6
- metadata.gz: b1ef31b2e8127eb29204c7287c80576149c151725010700410e3bbf4c43a0d0ff9c2f825febe49623a37e8cffa94d6b4f62d23105c2b5540b2d2f69f0afaaacc
7
- data.tar.gz: 03a795ec899b3ff415a4506a0fb89a6947f994d46d48c376993b1c104821ae490590f292109371a71eccb34118150288dd04279eb1c019402b744563ede49cc3
6
+ metadata.gz: 6055f791496d3dfb202b3c8a300e8469e740b1900bf982a242271c1dd33284965704c1554e13e5982b79f719b6b613e046bcd96a4db1b3f1adfcbdd8d948273f
7
+ data.tar.gz: cee1b456d4af726070df6a1229614444b55b58e8f28fd946ecb2e91531075d95807e7a0a1a419ee4b7ff2a02ce10cd25a7a2f4cafe1ec9f63bd38e5e95d3d53d
data/CHANGELOG.md CHANGED
@@ -1,4 +1,83 @@
1
- ## [Unreleased]
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.7.2] - 2026-07-28
9
+
10
+ - Bump json, parser, and rubocop dependency versions
11
+
12
+ ## [0.7.1] - 2026-03-03
13
+
14
+ - `StockLocation` now accepts parameters in initialization and passes them through to the API request
15
+ - Update dependencies (faraday, addressable, bigdecimal, json, language_server-protocol) and remove unused mcp/json-schema dependencies
16
+
17
+ ## [0.7.0] - 2026-03-02
18
+
19
+ - Add QNE stock reports (stock location balance endpoint)
20
+ - Downgrade `actions/checkout` to v4 in the CI workflow
21
+
22
+ ## [0.6.0] - 2026-01-20
23
+
24
+ - Add stock availability endpoint (`Stock#available`)
25
+ - Update dependencies
26
+
27
+ ## [0.5.2] - 2025-11-05
28
+
29
+ - Update dependencies and RuboCop configuration
30
+ - Streamline GitHub Actions workflow (consolidate RuboCop/RSpec steps)
31
+
32
+ ## [0.5.1] - 2025-11-05
33
+
34
+ - Update Gemfile and Gemfile.lock dependency versions
35
+
36
+ ## [0.5.0] - 2025-06-20
37
+
38
+ - Add `Faraday::Retry` middleware support, including a configurable custom retry block in the `Connection` initializer
39
+ - Upgrade to Ruby 3.2.2
40
+ - Add example for custom `retry_block` usage to the README
41
+
42
+ ## [0.4.1] - 2025-11-05
43
+
44
+ - Add GitHub Actions CI workflow for running RSpec and RuboCop
45
+ - Pin Ruby version (3.4.7) via `.ruby-version`
46
+ - Update RuboCop configuration to enforce single quotes and adjust metrics settings; resolve resulting offenses
47
+ - Refactor specs to use `double` instead of `OpenStruct` for response mocks
48
+ - Remove `byebug` development dependency
49
+ - Update gem dependencies to use minimum version constraints
50
+
51
+ ## [0.4.0] - 2024-10-04
52
+
53
+ - Add support for configuring request options and timeouts via environment variables
54
+
55
+ ## [0.3.0] - 2024-04-24
56
+
57
+ - Add `find_by` method
58
+
59
+ ## [0.2.2] - 2024-03-27
60
+
61
+ - Remove persisted connection
62
+
63
+ ## [0.2.1] - 2024-03-26
64
+
65
+ - Revise authentication method
66
+
67
+ ## [0.2.0] - 2024-03-26
68
+
69
+ - Add Sales Invoices resource (list, show, create, update)
70
+ - Add Sales Order download
71
+ - Add Stock Locations and Stock Finder
72
+ - Add `Customer#find`
73
+ - Add UOMs (units of measure) endpoint
74
+ - Add Tax Codes (input/output) endpoint
75
+ - Add Agents endpoint
76
+ - Add bearer token authentication support
77
+ - Add `faraday-net_http_persistent` support
78
+ - Separate `authenticated?` from `connected?`
79
+ - Make `#connection` method publicly accessible
80
+ - Support datatype-based values for query parameters
2
81
 
3
82
  ## [0.1.0] - 2023-06-08
4
83
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- QNE (0.7.0)
4
+ QNE (0.8.0)
5
5
  faraday (>= 1.10)
6
6
  faraday-net_http_persistent (>= 1.2)
7
7
  faraday-retry
@@ -10,20 +10,20 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- addressable (2.8.9)
13
+ addressable (2.9.0)
14
14
  public_suffix (>= 2.0.2, < 8.0)
15
15
  ast (2.4.3)
16
- bigdecimal (4.0.1)
16
+ bigdecimal (4.1.3)
17
17
  connection_pool (3.0.2)
18
18
  crack (1.0.1)
19
19
  bigdecimal
20
20
  rexml
21
21
  diff-lcs (1.6.2)
22
- faraday (2.14.1)
22
+ faraday (2.14.4)
23
23
  faraday-net_http (>= 2.0, < 3.5)
24
24
  json
25
25
  logger
26
- faraday-net_http (3.4.2)
26
+ faraday-net_http (3.4.4)
27
27
  net-http (~> 0.5)
28
28
  faraday-net_http_persistent (2.3.1)
29
29
  faraday (~> 2.5)
@@ -31,29 +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.1)
35
- json-schema (6.1.0)
36
- addressable (~> 2.8)
37
- bigdecimal (>= 3.1, < 5)
38
- language_server-protocol (3.17.0.5)
34
+ json (3.0.2)
35
+ language_server-protocol (3.17.0.6)
39
36
  lint_roller (1.1.0)
40
37
  logger (1.7.0)
41
- mcp (0.7.1)
42
- json-schema (>= 4.1)
43
38
  net-http (0.9.1)
44
39
  uri (>= 0.11.1)
45
40
  net-http-persistent (4.0.8)
46
41
  connection_pool (>= 2.2.4, < 4)
47
- parallel (1.27.0)
48
- parser (3.3.10.2)
42
+ parallel (2.2.0)
43
+ parser (3.3.12.0)
49
44
  ast (~> 2.4.1)
50
45
  racc
51
46
  prism (1.9.0)
52
- public_suffix (7.0.2)
47
+ public_suffix (7.0.5)
53
48
  racc (1.8.1)
54
49
  rainbow (3.1.1)
55
- rake (13.3.1)
56
- regexp_parser (2.11.3)
50
+ rake (13.4.2)
51
+ regexp_parser (2.12.0)
57
52
  rexml (3.4.4)
58
53
  rspec (3.13.2)
59
54
  rspec-core (~> 3.13.0)
@@ -68,19 +63,18 @@ GEM
68
63
  diff-lcs (>= 1.2.0, < 2.0)
69
64
  rspec-support (~> 3.13.0)
70
65
  rspec-support (3.13.7)
71
- rubocop (1.85.0)
72
- json (~> 2.3)
66
+ rubocop (1.91.0)
67
+ json (>= 2.3)
73
68
  language_server-protocol (~> 3.17.0.2)
74
69
  lint_roller (~> 1.1.0)
75
- mcp (~> 0.6)
76
- parallel (~> 1.10)
70
+ parallel (>= 1.10)
77
71
  parser (>= 3.3.0.2)
78
72
  rainbow (>= 2.2.2, < 4.0)
79
73
  regexp_parser (>= 2.9.3, < 3.0)
80
74
  rubocop-ast (>= 1.49.0, < 2.0)
81
75
  ruby-progressbar (~> 1.7)
82
76
  unicode-display_width (>= 2.4.0, < 4.0)
83
- rubocop-ast (1.49.0)
77
+ rubocop-ast (1.50.0)
84
78
  parser (>= 3.3.7.2)
85
79
  prism (~> 1.7)
86
80
  ruby-progressbar (1.13.0)
@@ -88,7 +82,7 @@ GEM
88
82
  unicode-emoji (~> 4.1)
89
83
  unicode-emoji (4.2.0)
90
84
  uri (1.1.1)
91
- webmock (3.26.1)
85
+ webmock (3.26.4)
92
86
  addressable (>= 2.8.0)
93
87
  crack (>= 0.3.2)
94
88
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module QNE
4
+ module CustomerReceipt
5
+ class Create
6
+ PATH = '/api/CustomerReceipts'
7
+
8
+ def initialize(conn, request_body:)
9
+ @conn = conn
10
+ @request_body = request_body
11
+ end
12
+
13
+ def call
14
+ @conn.post(PATH) do |req|
15
+ req.headers['Content-Type'] = 'application/json'
16
+ req.body = @request_body.to_json
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
data/lib/QNE/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QNE
4
- VERSION = '0.7.1'
4
+ VERSION = '0.8.0'
5
5
  end
data/lib/connection.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require_relative 'agents'
4
4
  require_relative 'customers'
5
5
  require_relative 'customer_categories'
6
+ require_relative 'customer_receipts'
6
7
  require_relative 'default_tax_code'
7
8
  require_relative 'sales_invoices'
8
9
  require_relative 'sales_orders'
@@ -42,6 +43,10 @@ module QNE
42
43
  @customer_categories ||= QNE::CustomerCategories.new(connection)
43
44
  end
44
45
 
46
+ def customer_receipts
47
+ @customer_receipts ||= QNE::CustomerReceipts.new(connection)
48
+ end
49
+
45
50
  def default_tax_code
46
51
  @default_tax_code ||= QNE::DefaultTaxCode.new(connection).call
47
52
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'QNE/customer_receipt/create'
4
+
5
+ module QNE
6
+ class CustomerReceipts < Base
7
+ include ::QNE::QueryBuilder
8
+
9
+ def create(request_body)
10
+ @response = QNE::CustomerReceipt::Create.new(
11
+ conn, request_body: request_body
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.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nujian Den Mark Meralpis
@@ -105,6 +105,7 @@ files:
105
105
  - lib/QNE/customer/show.rb
106
106
  - lib/QNE/customer/update.rb
107
107
  - lib/QNE/customer_category/all.rb
108
+ - lib/QNE/customer_receipt/create.rb
108
109
  - lib/QNE/sales_invoice/all.rb
109
110
  - lib/QNE/sales_invoice/create.rb
110
111
  - lib/QNE/sales_invoice/download.rb
@@ -132,6 +133,7 @@ files:
132
133
  - lib/base.rb
133
134
  - lib/connection.rb
134
135
  - lib/customer_categories.rb
136
+ - lib/customer_receipts.rb
135
137
  - lib/customers.rb
136
138
  - lib/default_tax_code.rb
137
139
  - lib/query_builder.rb