synsbasen_api 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99ac1f53e97c96f3f21e0ad5b3144df4c2afbaaee5b8af8a42e04e24d23e6b8c
4
- data.tar.gz: 6196d8929394e6b7a6271783ac34811f643a825c9db5852ef43fbba657ca6c70
3
+ metadata.gz: 488fa94b15f086f18590d5e13bda9455648fbdc8794b639760bf5b39708b74f5
4
+ data.tar.gz: b6f821fc79f849a6a97927e65f39a68896b08307579b0bf62b09c3f606b22b29
5
5
  SHA512:
6
- metadata.gz: 8add0e93e0efe3572e05d2704f90b5b45ae4b55091f5b609a9851fcb5645b4c20916691cf81e82d64b110dbfc5789e1b40d763044ff056a1774543ed1db5041e
7
- data.tar.gz: 0405b1d7b20293f55251956d6e70af0ef6450709c086c1e20b6dfdc9cea4ff107354b9a0967cf6dc18b9efab981e239cd8be3ab7408a1db33c654879ce5b5aa8
6
+ metadata.gz: b4ab45d11acbfecd31e8f925952697f84f5a41bee63f941a5eb7d14600ce6e6c88b38f7b0c5d0d663bcba393f4ac89b1463f1f2ed1396663e767dfddb5712389
7
+ data.tar.gz: eea99086d568db341f04f43e1e54048126a658c4dbd753e83b127b232f83121c8721a690bd503a86e0b206bc4d5ea7a9fd44c20f08341978d4b7704983579d3e
@@ -12,6 +12,9 @@ module SynsbasenApi
12
12
  # @return [Boolean] Indicates whether there is more data available in the response.
13
13
  attr_reader :has_more
14
14
 
15
+ # @return [Numeric] The total number of pages available.
16
+ attr_reader :total_pages
17
+
15
18
  # Initializes a new instance of `ApiResponse` with the provided response data.
16
19
  #
17
20
  # @param response [Hash] The response data from the API.
@@ -21,7 +24,10 @@ module SynsbasenApi
21
24
  def initialize(response)
22
25
  @data = response[:data]
23
26
  @cost = response[:cost]
24
- @has_more = response[:has_more] || false
27
+
28
+ %i[has_more total_pages].each do |key|
29
+ instance_variable_set("@#{key}", response[key]) if response.key?(key)
30
+ end
25
31
  end
26
32
  end
27
33
  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.4"
5
+ VERSION = "1.0.5"
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.4
4
+ version: 1.0.5
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-03 00:00:00.000000000 Z
12
+ date: 2024-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport