nova-api 1.8.0 → 1.9.0

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: 577247914642aa6fae4ea3edd33708b6b330ce0ac28c4cd17a69415d7ab2ff2f
4
- data.tar.gz: 590fe4e8ac7d4b9c8d8c8c45dbf283622b378326956ce4f6488ef90750c282da
3
+ metadata.gz: aa39e814bbceecbe8191606e74224febce92a84c0f1104f3c9c4d4df02b6f2e9
4
+ data.tar.gz: 86907f861fe768cf51f646dfca498f19a30d1dc0c8514f9d4434ae7f8b89a4c2
5
5
  SHA512:
6
- metadata.gz: 885f77c1523bc2a108c41824799bf50a573df21e14e9c4b9ab2c710434ed9f3e253b0c80b70ba37627f3f2b600f026a616dbde0c0f8584aaa8571df6e4e0e22e
7
- data.tar.gz: 2fdd746ddcd0c21ad3b129ecb4d70ea38b901ca424ca59135a00b4a198d09728cb8bd8b6e848ed73460a28da07cd889541c6ec413d2c44ef5239316dfe63029d
6
+ metadata.gz: '0391d5f88122b8e7dfabc1386939f40c7b57c5d9928626a5db73da4080018b4cb339df0ac21c885a35002253fafdd6ebcb5e23e6df12e16fae0dbce0570d6e64'
7
+ data.tar.gz: 62f754ce3115dc2d1b90cd7a9d9ab47cd0f4c443f1100e548b3fcab345f97558045d873c2ffaebb7277fa152c66157182b33feddaabc739127a60115da9746a1
data/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.9.0] - 2026-11-09
9
+
10
+ ### Added
11
+
12
+ - Forecast cancellation endpoint (`Forecast.cancel` and `Forecast#cancel`)
13
+
14
+ - Forecast destroy endpoint (`Forecast.destroy` and `Forecast#destroy`)
15
+
16
+ - Forecast cancellation and destroy from an installment (`Installment#cancel_forecast` and `Installment#destroy_forecast`)
17
+
8
18
  ## [1.8.0] - 2026-11-09
9
19
 
10
20
  ### Added
@@ -222,7 +232,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
222
232
 
223
233
  - Apportionment related stuff
224
234
 
225
- [unreleased]: https://github.com/coyosoftware/nova-api/compare/v1.8.0...HEAD
235
+ [unreleased]: https://github.com/coyosoftware/nova-api/compare/v1.9.0...HEAD
236
+ [1.9.0]: https://github.com/coyosoftware/nova-api/releases/tag/v1.9.0
226
237
  [1.8.0]: https://github.com/coyosoftware/nova-api/releases/tag/v1.8.0
227
238
  [1.7.0]: https://github.com/coyosoftware/nova-api/releases/tag/v1.7.0
228
239
  [1.6.1]: https://github.com/coyosoftware/nova-api/releases/tag/v1.6.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nova-api (1.8.0)
4
+ nova-api (1.9.0)
5
5
  dry-struct (~> 1.6)
6
6
  dry-types (~> 1.7)
7
7
  httparty (~> 0.1)
@@ -28,6 +28,18 @@ module Nova
28
28
  model.confirm
29
29
  end
30
30
 
31
+ def self.cancel(id)
32
+ model = initialize_empty_model_with_id(self, id, date: Date.today.iso8601, due_date: Date.today.iso8601)
33
+
34
+ model.cancel
35
+ end
36
+
37
+ def self.destroy(id)
38
+ model = initialize_empty_model_with_id(self, id, date: Date.today.iso8601, due_date: Date.today.iso8601)
39
+
40
+ model.destroy
41
+ end
42
+
31
43
  def endpoint
32
44
  protect_operation_from_missing_value
33
45
 
@@ -39,6 +51,18 @@ module Nova
39
51
 
40
52
  do_post("#{self.class.endpoint}/#{id}/confirm", allowed_attributes)
41
53
  end
54
+
55
+ def cancel
56
+ protect_operation_from_missing_value
57
+
58
+ do_delete("#{endpoint}/cancel")
59
+ end
60
+
61
+ def destroy
62
+ protect_operation_from_missing_value
63
+
64
+ do_delete(endpoint)
65
+ end
42
66
  end
43
67
  end
44
68
  end
@@ -80,6 +80,14 @@ module Nova
80
80
 
81
81
  model.confirm
82
82
  end
83
+
84
+ def cancel_forecast
85
+ Forecast.cancel(id)
86
+ end
87
+
88
+ def destroy_forecast
89
+ Forecast.destroy(id)
90
+ end
83
91
  end
84
92
  end
85
93
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nova
4
4
  module API
5
- VERSION = '1.8.0'
5
+ VERSION = '1.9.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nova-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coyô Software