e-invoice-api 0.35.0 → 0.35.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: 2eb2e2ffdbc2f51e90b910c660777e04bc11340dfc86b8f0f4841dafd809fab2
4
- data.tar.gz: bb59e3f10e1994ed244ecf64c327057f734def70989f05a1c986b1182bd3bb56
3
+ metadata.gz: 41a9dc3cd1263327d3e19c5390fbdc88f436a798e9690bc3e2dff85edf5c33b8
4
+ data.tar.gz: 0a4a01afd71b43105bc6cba1bb5c59d698c46fa00268b2c643b4844e3f859b4c
5
5
  SHA512:
6
- metadata.gz: 0b4695e3f542f4f8e049b94a6661708495db40f64df9453b17744bc05efd04c4110a8670f2a6cd5d4317546528558eb80747378e36da3e4733284caa13fbc3f3
7
- data.tar.gz: 7cf803f0bb4e2682bf21b7b88e18f61ec5cf74165d94e1fba08b8956206f5dbc7a7f8b9f5d1a2c960cb5895edcc7611cfb28805ce8c79fb9669257d7fdb4e623
6
+ metadata.gz: 4223cb8be921f219c8ba835c6d25369d8f3476fc2d7d2e47c6be5fc0a5a47c55b8df09c018ef44335c3a4b2b161acb89aa97c6ba64bed51dc83c1d557be22961
7
+ data.tar.gz: cacb53522c881d5b1ffb0f94fa30b48c0abbed901bf20f52a493236a9054851ec1a37ec4a3fb1d2cd7ed95eb11bcd4a3d6900126ecfafcee5274a804a4a53814
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.35.1 (2026-11-24)
4
+
5
+ Full Changelog: [v0.35.0...v0.35.1](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.35.0...v0.35.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **api:** sync SDK with live OpenAPI spec: `DocumentsNumberPage` reads `pages` and `has_next_page`, so `auto_paging_each` stops after the last page instead of requesting extra empty pages ([#97](https://github.com/e-invoice-be/e-invoice-rb/issues/97)) ([b29c667](https://github.com/e-invoice-be/e-invoice-rb/commit/b29c667cdc559e26d5f88c65d681c4b1a94c91ae))
10
+
3
11
  ## 0.35.0 (2026-11-19)
4
12
 
5
13
  Full Changelog: [v0.34.0...v0.35.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.34.0...v0.35.0)
data/README.md CHANGED
@@ -39,7 +39,7 @@ The full REST API documentation can be found on [api.e-invoice.be](https://api.e
39
39
  To use this gem, install via Bundler by adding the following to your application's `Gemfile`:
40
40
 
41
41
  ```ruby
42
- gem "e-invoice-api", "~> 0.35.0"
42
+ gem "e-invoice-api", "~> 0.35.1"
43
43
  ```
44
44
 
45
45
  ## Usage
@@ -5,7 +5,7 @@ module EInvoiceAPI
5
5
  # @generic Elem
6
6
  #
7
7
  # @example
8
- # if documents_number_page.has_next?
8
+ # if documents_number_page.next_page?
9
9
  # documents_number_page = documents_number_page.next_page
10
10
  # end
11
11
  #
@@ -28,9 +28,15 @@ module EInvoiceAPI
28
28
  # @return [Integer]
29
29
  attr_accessor :total
30
30
 
31
+ # @return [Integer]
32
+ attr_accessor :pages
33
+
34
+ # @return [Boolean]
35
+ attr_accessor :has_next_page
36
+
31
37
  # @return [Boolean]
32
38
  def next_page?
33
- !items.to_a.empty? && (page.nil? || total.nil? || page < total)
39
+ !items.to_a.empty? && (has_next_page.nil? ? (page.nil? || pages.nil? || page < pages) : has_next_page)
34
40
  end
35
41
 
36
42
  # @raise [EInvoiceAPI::HTTP::Error]
@@ -79,6 +85,8 @@ module EInvoiceAPI
79
85
  @page = page_data[:page]
80
86
  @page_size = page_data[:page_size]
81
87
  @total = page_data[:total]
88
+ @pages = page_data[:pages]
89
+ @has_next_page = page_data[:has_next_page]
82
90
  end
83
91
 
84
92
  # @api private
@@ -88,7 +96,7 @@ module EInvoiceAPI
88
96
  # rubocop:disable Layout/LineLength
89
97
  model = EInvoiceAPI::Internal::Type::Converter.inspect(@model, depth: 1)
90
98
 
91
- "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)} page=#{page.inspect} page_size=#{page_size.inspect} total=#{total.inspect}>"
99
+ "#<#{self.class}[#{model}]:0x#{object_id.to_s(16)} page=#{page.inspect} page_size=#{page_size.inspect} total=#{total.inspect} pages=#{pages.inspect} has_next_page=#{has_next_page.inspect}>"
92
100
  # rubocop:enable Layout/LineLength
93
101
  end
94
102
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EInvoiceAPI
4
- VERSION = "0.35.0"
4
+ VERSION = "0.35.1"
5
5
  end
@@ -19,6 +19,12 @@ module EInvoiceAPI
19
19
  sig { returns(Integer) }
20
20
  attr_accessor :total
21
21
 
22
+ sig { returns(Integer) }
23
+ attr_accessor :pages
24
+
25
+ sig { returns(T::Boolean) }
26
+ attr_accessor :has_next_page
27
+
22
28
  # @api private
23
29
  sig { returns(String) }
24
30
  def inspect
@@ -11,6 +11,10 @@ module EInvoiceAPI
11
11
 
12
12
  attr_accessor total: Integer
13
13
 
14
+ attr_accessor pages: Integer
15
+
16
+ attr_accessor has_next_page: bool
17
+
14
18
  def inspect: -> String
15
19
  end
16
20
  end
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.35.0
4
+ version: 0.35.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: 2026-11-19 00:00:00.000000000 Z
11
+ date: 2026-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi