synsbasen_api 1.0.5 → 1.0.6

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: 488fa94b15f086f18590d5e13bda9455648fbdc8794b639760bf5b39708b74f5
4
- data.tar.gz: b6f821fc79f849a6a97927e65f39a68896b08307579b0bf62b09c3f606b22b29
3
+ metadata.gz: 0ec09887bb8b74dc5f47f9dcb332df43bc09fe4fcea136ec6d9aeac2b49bacd7
4
+ data.tar.gz: 0ce055a70a194f3d39f27b4e53dbb8cbb98dac3d1d6a1626c2cbe60c06137158
5
5
  SHA512:
6
- metadata.gz: b4ab45d11acbfecd31e8f925952697f84f5a41bee63f941a5eb7d14600ce6e6c88b38f7b0c5d0d663bcba393f4ac89b1463f1f2ed1396663e767dfddb5712389
7
- data.tar.gz: eea99086d568db341f04f43e1e54048126a658c4dbd753e83b127b232f83121c8721a690bd503a86e0b206bc4d5ea7a9fd44c20f08341978d4b7704983579d3e
6
+ metadata.gz: e5626d8778158b88925117cdacd28131dc95fc1571ebe04b9306a1b446ac92d60d4067162ca0801b7105e1b161ed5e1b8773b2ca8dcc684ed670b9130a8a867f
7
+ data.tar.gz: ad7fba5fe84d5dae76cd87f767e67019e08c050fec7262af4a4ed32fbfc805c275837aede3622f2a417e3f6b36e0b33706b5292c4485bdbd3d07a43e777df094
@@ -15,17 +15,22 @@ module SynsbasenApi
15
15
  # @return [Numeric] The total number of pages available.
16
16
  attr_reader :total_pages
17
17
 
18
+ # @return [Numeric] The total count of items available.
19
+ attr_reader :total_count
20
+
18
21
  # Initializes a new instance of `ApiResponse` with the provided response data.
19
22
  #
20
23
  # @param response [Hash] The response data from the API.
21
24
  # @option response [Hash] :data The data included in the API response.
22
25
  # @option response [Numeric] :cost The cost associated with the API response.
23
26
  # @option response [Boolean] :has_more Indicates whether there is more data available in the response.
27
+ # @option response [Boolean] :total_pages The total number of pages available.
28
+ # @option response [Boolean] :total_count The total count of items available.
24
29
  def initialize(response)
25
30
  @data = response[:data]
26
31
  @cost = response[:cost]
27
32
 
28
- %i[has_more total_pages].each do |key|
33
+ %i[has_more total_pages total_count].each do |key|
29
34
  instance_variable_set("@#{key}", response[key]) if response.key?(key)
30
35
  end
31
36
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module SynsbasenApi
4
4
  # The `VERSION` module specifies the version of the SynsbasenApi gem.
5
- VERSION = "1.0.5"
5
+ VERSION = "1.0.6"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synsbasen_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Poulsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-16 00:00:00.000000000 Z
12
+ date: 2024-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport