zaikio-warehouse 0.1.0 → 0.2.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: 62bf49ab4d0b2be86c5c8d9638a542a153674911d6718030354f08f7494ea47e
4
- data.tar.gz: e82ad62f51dafd402cd3fedf0374ccbe7c36af0138289bd3eada8a931d3281a3
3
+ metadata.gz: '08efd2961bb82ad548a2c1726bb9d1c83a80c0ee1ef01f4ccfafa145616206af'
4
+ data.tar.gz: 04311e0db411614128b857c5beab4ffd162e0815451895a26f257cd7d92caef4
5
5
  SHA512:
6
- metadata.gz: b0a6296b272dd744b53f2fe2e16facdf76ba8c895fad36f7ea9bea7248f88d160c4f925bee816ef5aeea2fce704f6832579a4b118e158775bdce6b593a2ec6d3
7
- data.tar.gz: 9f4642e4a913bd9b1357d6dce4ad5555970d9405c67d77bb1518676d340a5dc76623903bef0240e59c8e39e84d32a96ef2bc5afb62ac33960302aaf14011fb42
6
+ metadata.gz: 2d5c5a056d3ffeb1ce97cf8b874e4e4d9f0ffd77ba15eb94d2e09f515bb275589e785664409730a705d919d8c34ad498090fc4d90a0b040aff80bd6f44f9a9d2
7
+ data.tar.gz: 4c281c51a05fdfae8a3b1e4a1f6c5bdbf167bd4d15a615ecf91b911ef4e80a4dcdea10a15b28a128770d937b14d835f811e5fb83e7c3731a2bca9a3cc23db892
data/CHANGELOG.md CHANGED
@@ -7,11 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.0] - 2023-02-15
11
+
12
+ - Add `opening_balance` to `Deposit`
13
+ - Add `sku_ids` and `storage_area_ids` to `ConsumptionAnnouncement`
14
+ - Add `completed`, `canceled` and `executed` to `ConsumptionRequest`
15
+ - Move `Material#manifest_entries` and `Material#manifests` from `ManifestEntry` to `MaterialManifestEntry`
16
+ - Add `MaterialReservation` and `MaterialReservationCancelation`
17
+ - Add `MaterialReservationFulfillment`
18
+
10
19
  ## [0.1.0] - 2022-10-10
11
20
 
12
21
  - Add `Consumption`, `ConsumptionRequest`, `ConsumptionAnnouncement` and `ConsumptionRequestCancelation`
13
22
  - Update and reuse `zaikio-client-helpers` logic to support `Zaikio::Client.with_token`
14
23
  - Initial release
15
24
 
16
- [Unreleased]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.1.0..HEAD
25
+ [Unreleased]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.0..HEAD
26
+ [0.2.0]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.1.0..v0.2.0
17
27
  [0.1.0]: https://github.com/zaikio/zaikio-hub-models/compare/c96ae1302a6ec5b90cfc445116fc83af16579e01..v0.1.0
@@ -9,7 +9,7 @@ module Zaikio
9
9
  uri "consumption_announcements"
10
10
 
11
11
  attributes :consuming_reference, :consuming_reference_link, :amount_in_base_unit,
12
- :warehouse_id, :material_id
12
+ :warehouse_id, :material_id, :sku_ids, :storage_area_ids
13
13
 
14
14
  has_many :consumption_requests, uri: nil, class_name: "Zaikio::Warehouse::ConsumptionRequest"
15
15
  end
@@ -9,7 +9,7 @@ module Zaikio
9
9
  uri "consumption_requests(/:id)"
10
10
 
11
11
  attributes :consuming_reference, :consuming_reference_link, :consuming_client, :consuming_subject, :amount,
12
- :amount_in_base_unit, :created_at, :updated_at
12
+ :amount_in_base_unit, :completed, :canceled, :executed, :created_at, :updated_at
13
13
 
14
14
  has_one :material, uri: nil, class_name: "Zaikio::Warehouse::Material"
15
15
  has_one :sku, uri: nil, class_name: "Zaikio::Warehouse::SKU"
@@ -8,7 +8,7 @@ module Zaikio
8
8
  uri "deposits(/:id)"
9
9
  include_root_in_json :deposit
10
10
 
11
- attributes :amount, :amount_in_base_unit, :created_at, :updated_at
11
+ attributes :amount, :amount_in_base_unit, :opening_balance, :created_at, :updated_at
12
12
 
13
13
  has_one :material, uri: nil, class_name: "Zaikio::Warehouse::Material"
14
14
  has_one :sku, uri: nil, class_name: "Zaikio::Warehouse::SKU"
@@ -15,10 +15,10 @@ module Zaikio
15
15
  has_one :operator, uri: nil
16
16
  has_many :manifest,
17
17
  uri: "materials/:material_id/manifest",
18
- class_name: "Zaikio::Warehouse::ManifestEntry"
18
+ class_name: "Zaikio::Warehouse::MaterialManifestEntry"
19
19
  has_many :manifest_entries,
20
20
  uri: "materials/:material_id/manifest_entries(/:id)",
21
- class_name: "Zaikio::Warehouse::ManifestEntry"
21
+ class_name: "Zaikio::Warehouse::MaterialManifestEntry"
22
22
  end
23
23
  end
24
24
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zaikio
4
+ module Warehouse
5
+ class MaterialManifestEntry < Base
6
+ readonly!
7
+
8
+ attributes :amount, :amount_available, :amount_delta, :amount_available_delta,
9
+ :created_at, :updated_at
10
+
11
+ has_one :operator, uri: nil, class_name: "Zaikio::Warehouse::Organization"
12
+ has_one :warehouse, uri: nil, class_name: "Zaikio::Warehouse::Warehouse"
13
+ has_one :material, uri: nil, class_name: "Zaikio::Warehouse::Material"
14
+ has_one :operation, uri: nil, class_name: "Zaikio::Warehouse::Operation"
15
+ has_one :person, uri: nil, class_name: "Zaikio::Warehouse::Person"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zaikio
4
+ module Warehouse
5
+ class MaterialReservation < Base
6
+ disable_http_methods :patch, :put, :delete
7
+ include_root_in_json :material_reservation
8
+
9
+ uri "material_reservations(/:id)"
10
+
11
+ attributes :reserving_reference, :reserving_reference_link, :reserving_client, :reserving_subject, :amount,
12
+ :completed, :canceled, :executed, :created_at, :updated_at
13
+
14
+ has_one :material, uri: nil, class_name: "Zaikio::Warehouse::Material"
15
+ has_one :warehouse, uri: nil, class_name: "Zaikio::Warehouse::Warehouse"
16
+ has_one :person, uri: nil, class_name: "Zaikio::Warehouse::Person"
17
+ has_one :material_reservation_cancelation, uri: nil,
18
+ class_name: "Zaikio::Warehouse::MaterialReservationCancelation"
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zaikio
4
+ module Warehouse
5
+ class MaterialReservationCancelation < Base
6
+ disable_http_methods :patch, :put, :delete
7
+ include_root_in_json :material_reservation_cancelation
8
+
9
+ uri "material_reservation_cancelations(/:id)"
10
+
11
+ attributes :material_reservation_id, :cancelation_reference, :cancelation_reference_link,
12
+ :cancelation_client, :cancelation_subject, :amount, :reason, :created_at, :updated_at
13
+
14
+ has_one :material, uri: nil, class_name: "Zaikio::Warehouse::Material"
15
+ has_one :warehouse, uri: nil, class_name: "Zaikio::Warehouse::Warehouse"
16
+ has_one :person, uri: nil, class_name: "Zaikio::Warehouse::Person"
17
+ has_one :material_reservation, uri: nil, class_name: "Zaikio::Warehouse::MaterialReservation"
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zaikio
4
+ module Warehouse
5
+ class MaterialReservationFulfillment < Base
6
+ disable_http_methods :patch, :put, :delete
7
+ include_root_in_json :material_reservation_fulfillment
8
+
9
+ uri "material_reservation_fulfillments(/:id)"
10
+
11
+ attributes :consuming_reference, :consuming_reference_link, :consuming_client, :consuming_subject, :amount,
12
+ :material_reservation_id, :created_at, :updated_at
13
+
14
+ has_one :material, uri: nil, class_name: "Zaikio::Warehouse::Material"
15
+ has_one :warehouse, uri: nil, class_name: "Zaikio::Warehouse::Warehouse"
16
+ has_one :person, uri: nil, class_name: "Zaikio::Warehouse::Person"
17
+ has_one :material_reservation, uri: nil, class_name: "Zaikio::Warehouse::MaterialReservation"
18
+ has_many :consumption_requests, uri: nil, class_name: "Zaikio::Warehouse::ConsumptionRequest"
19
+ end
20
+ end
21
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Zaikio
4
4
  module Warehouse
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
@@ -20,6 +20,10 @@ require "zaikio/warehouse/deposit"
20
20
  require "zaikio/warehouse/finished_goods/call_off"
21
21
  require "zaikio/warehouse/finished_goods/material"
22
22
  require "zaikio/warehouse/manifest_entry"
23
+ require "zaikio/warehouse/material_manifest_entry"
24
+ require "zaikio/warehouse/material_reservation"
25
+ require "zaikio/warehouse/material_reservation_cancelation"
26
+ require "zaikio/warehouse/material_reservation_fulfillment"
23
27
  require "zaikio/warehouse/material"
24
28
  require "zaikio/warehouse/organization"
25
29
  require "zaikio/warehouse/person"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaikio-warehouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zaikio GmbH
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-10 00:00:00.000000000 Z
12
+ date: 2023-02-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -232,6 +232,10 @@ files:
232
232
  - lib/zaikio/warehouse/finished_goods/material.rb
233
233
  - lib/zaikio/warehouse/manifest_entry.rb
234
234
  - lib/zaikio/warehouse/material.rb
235
+ - lib/zaikio/warehouse/material_manifest_entry.rb
236
+ - lib/zaikio/warehouse/material_reservation.rb
237
+ - lib/zaikio/warehouse/material_reservation_cancelation.rb
238
+ - lib/zaikio/warehouse/material_reservation_fulfillment.rb
235
239
  - lib/zaikio/warehouse/operation.rb
236
240
  - lib/zaikio/warehouse/organization.rb
237
241
  - lib/zaikio/warehouse/person.rb