fortnox-api 1.0.0.rc9 → 1.0.0.rc10

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: a20aeb0e4dd1618609c445e649bc8b1d5014febdc7eafcb733d4477a054dca60
4
- data.tar.gz: '02592cebf00ea6190f2d0d863a54441346e973e06e0f65fd4e436cda63c57587'
3
+ metadata.gz: d90c382b3359e0c55cda22e41eee63112f77c721bdabfd490d903cd1d0dbc34f
4
+ data.tar.gz: 9198f60533f070aa7ccbb12e0e4950aaf0d69476541ad6b13b2d23c1cec86781
5
5
  SHA512:
6
- metadata.gz: d65bbab5d39d6428068de1132c2e5d0251acfd3c4e70fe120d37fbb0680d6e82f861935106e6386c4b3b2951f8a513b19b821009459a6e5c4a69f38a9368d50f
7
- data.tar.gz: 95858ca85e8694c9d699ec7dd054f5c93e7a1fce3ca078d8bb690ee61f0e691a44cff23f4c3a5633459659234560815a766391ca2d12dce3b1f804f54abb486f
6
+ metadata.gz: d1847fe3c20ce526ee13328f78d2114e5abb82ac3b5de5e4e08da49989f66a91dc6bbec9eaffed96f52b1af6588689a93834ebe6e095484a780f306ebb213013
7
+ data.tar.gz: c01f1d2cbf228d825dcfd1092efe7e53ad20fd653a5dc856e03084cce174ccfb1220317afd37b52c93aae30fc6b34ad2c6f3a20e1c8f06444229983b1a094d65
data/CHANGELOG.md CHANGED
@@ -8,6 +8,19 @@ and this project adheres to
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [1.0.0.rc10] - 2026-05-27
12
+
13
+ ### Changed
14
+
15
+ - Upgraded `rest-easy` dependency to `~> 1.3.1`.
16
+
17
+ ### Fixed
18
+
19
+ - `Types::AccountNumber` no longer raises `Fortnox::ConstraintError` when
20
+ Fortnox returns `""` for an unset attribute using that type. Observed in production on
21
+ `Customer#sales_account`. Blank strings now coerce to `nil`.
22
+ This bug was introduced in 1.0.0.rc1 and did not exist in 0.x.
23
+
11
24
  ## [1.0.0.rc9] - 2026-05-20
12
25
 
13
26
  ### Added
@@ -244,7 +257,8 @@ for the full list of breaking changes.
244
257
  For changes prior to the 1.0 rewrite, see the
245
258
  [0.x changelog](https://github.com/accodeing/fortnox-api/blob/v0.9.2/CHANGELOG.md).
246
259
 
247
- [Unreleased]: https://github.com/accodeing/fortnox-api/compare/v1.0.0.rc9...HEAD
260
+ [Unreleased]: https://github.com/accodeing/fortnox-api/compare/v1.0.0.rc10...HEAD
261
+ [1.0.0.rc10]: https://github.com/accodeing/fortnox-api/compare/v1.0.0.rc9...v1.0.0.rc10
248
262
  [1.0.0.rc9]: https://github.com/accodeing/fortnox-api/compare/v1.0.0.rc8...v1.0.0.rc9
249
263
  [1.0.0.rc8]: https://github.com/accodeing/fortnox-api/compare/v1.0.0.rc7...v1.0.0.rc8
250
264
  [1.0.0.rc7]: https://github.com/accodeing/fortnox-api/compare/v1.0.0.rc6...v1.0.0.rc7
data/fortnox.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_dependency 'base64'
25
25
  spec.add_dependency 'countries', '~> 7.1'
26
26
  spec.add_dependency 'dry-struct', '~> 1.5'
27
- spec.add_dependency 'rest-easy', '~> 1.3.0'
27
+ spec.add_dependency 'rest-easy', '~> 1.3.1'
28
28
 
29
29
  spec.metadata['rubygems_mfa_required'] = 'true'
30
30
  end
data/lib/fortnox/types.rb CHANGED
@@ -94,9 +94,13 @@ module Fortnox
94
94
  '', 'none', 'rot', 'rut', 'green'
95
95
  )
96
96
 
97
+ # Fortnox sometimes returns "" for unset attributes using AccountNumber as type.
98
+ # Without this constructor, "" falls through to Coercible::Integer and
99
+ # `Integer("")` raises, surfacing as Fortnox::ConstraintError.
97
100
  AccountNumber = Coercible::Integer
98
101
  .constrained(gteq: 0, lteq: 9999)
99
102
  .optional
103
+ .constructor { |v| v == '' ? nil : v }
100
104
 
101
105
  Email = Strict::String
102
106
  .constrained(max_size: 1024, format: /\A\z|\A[[[:alnum:]]+-_.]+@[[[:alnum:]]+-_.]+\.[a-z]+\z/i)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fortnox
4
- VERSION = '1.0.0.rc9'
4
+ VERSION = '1.0.0.rc10'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fortnox-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc9
4
+ version: 1.0.0.rc10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Schubert Erlandsson
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2026-05-20 00:00:00.000000000 Z
14
+ date: 2026-05-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: base64
@@ -61,14 +61,14 @@ dependencies:
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: 1.3.0
64
+ version: 1.3.1
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: 1.3.0
71
+ version: 1.3.1
72
72
  description: Fortnox F3 REST API library, based on rest-easy.
73
73
  email:
74
74
  - info@accodeing.com