e-invoice-api 0.15.0 → 0.16.1

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: 6806a73bf19c4feac04787dab466cba830537ad4cf174efd330d5769127afe46
4
- data.tar.gz: 421b24bb08ef0d92593b707e36dd8254532eaa9104a125ad261df9eb3c7c768a
3
+ metadata.gz: 2ffe13f56327881976bc84702f3ef295e0bfb69448b55830f5456c0bc96a08cd
4
+ data.tar.gz: 1c8e291c0a59be982ef4b710136a8d3c665e4bae2712ca52e705ac79cc3352ec
5
5
  SHA512:
6
- metadata.gz: 6d28f0f4deea82ed2df056a4e86db84dbb6a865bc33bc82bd6b165eee393c2dd8ac81329a17ffa3110d37f9f07cb60bddbe12184de9ced18e1aa777a150c3dbd
7
- data.tar.gz: 4c292c98f552ca007a0e343ea325d37dbf4256d56ddb90efbb678cfa1b3ee2cb7facf9a2f42ab1c00c6982541aec340fe625d7f049985271309a87e9dd4591c9
6
+ metadata.gz: 77e4501f640d05c577072df968df337a9c15787c126447550300cb3d4fa66eeec9a2b4259d4087c6a76d8e25da18e5c973833ae1988a1297495730377444b9ce
7
+ data.tar.gz: 70e3b8fdf20a4f64c8ac1a9073d6ebb7c4fcd3a35e3d68150602c12e3629b363451f41a58007479c391a9e5e8662cbc93c5bc77613e750ad96fbb595e4f833d8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.1 (2025-12-17)
4
+
5
+ Full Changelog: [v0.16.0...v0.16.1](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.16.0...v0.16.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * calling `break` out of streams should be instantaneous ([5b43b59](https://github.com/e-invoice-be/e-invoice-rb/commit/5b43b592fb1a63697ca274ba89b25c12d67083d5))
10
+
11
+ ## 0.16.0 (2025-12-11)
12
+
13
+ Full Changelog: [v0.15.0...v0.16.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.15.0...v0.16.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([00c8500](https://github.com/e-invoice-be/e-invoice-rb/commit/00c8500d19f3a937e71e4d50fa387257f1a94fe0))
18
+
19
+
20
+ ### Chores
21
+
22
+ * explicitly require "base64" gem ([3f44730](https://github.com/e-invoice-be/e-invoice-rb/commit/3f4473046beeea219a87f4d03f003c66410ba86c))
23
+
3
24
  ## 0.15.0 (2025-11-18)
4
25
 
5
26
  Full Changelog: [v0.14.0...v0.15.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.14.0...v0.15.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "e-invoice-api", "~> 0.15.0"
20
+ gem "e-invoice-api", "~> 0.16.1"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -153,17 +153,19 @@ module EInvoiceAPI
153
153
  end
154
154
 
155
155
  self.class.calibrate_socket_timeout(conn, deadline)
156
- conn.request(req) do |rsp|
157
- y << [req, rsp]
158
- break if finished
159
-
160
- rsp.read_body do |bytes|
161
- y << bytes.force_encoding(Encoding::BINARY)
162
- break if finished
163
-
164
- self.class.calibrate_socket_timeout(conn, deadline)
156
+ ::Kernel.catch(:jump) do
157
+ conn.request(req) do |rsp|
158
+ y << [req, rsp]
159
+ ::Kernel.throw(:jump) if finished
160
+
161
+ rsp.read_body do |bytes|
162
+ y << bytes.force_encoding(Encoding::BINARY)
163
+ ::Kernel.throw(:jump) if finished
164
+
165
+ self.class.calibrate_socket_timeout(conn, deadline)
166
+ end
167
+ eof = true
165
168
  end
166
- eof = true
167
169
  end
168
170
  end
169
171
  ensure
@@ -74,7 +74,10 @@ module EInvoiceAPI
74
74
  )
75
75
  end
76
76
 
77
- # Add a new attachment to an invoice or credit note
77
+ # @deprecated
78
+ #
79
+ # Add one or more attachments when creating a new invoice or credit note via POST
80
+ # /api/documents/
78
81
  #
79
82
  # @overload add(document_id, file:, request_options: {})
80
83
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EInvoiceAPI
4
- VERSION = "0.15.0"
4
+ VERSION = "0.16.1"
5
5
  end
data/lib/e_invoice_api.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  # Standard libraries.
4
4
  # rubocop:disable Lint/RedundantRequireStatement
5
5
  require "English"
6
+ require "base64"
6
7
  require "cgi"
7
8
  require "date"
8
9
  require "erb"
data/manifest.yaml CHANGED
@@ -1,5 +1,6 @@
1
1
  dependencies:
2
2
  - English
3
+ - base64
3
4
  - cgi
4
5
  - date
5
6
  - erb
@@ -37,7 +37,8 @@ module EInvoiceAPI
37
37
  def delete(attachment_id, document_id:, request_options: {})
38
38
  end
39
39
 
40
- # Add a new attachment to an invoice or credit note
40
+ # Add one or more attachments when creating a new invoice or credit note via POST
41
+ # /api/documents/
41
42
  sig do
42
43
  params(
43
44
  document_id: String,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e-invoice-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - e-invoice
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-18 00:00:00.000000000 Z
11
+ date: 2025-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool