zaikio-warehouse 0.2.5 → 0.4.0

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: 41fe2c973a4b725693ae1444c33bd8c032e567add048b95793cb2d5d249f00bc
4
- data.tar.gz: ab187be945c6c61c8dcf05558b3a6155559135cfddbd52512ec4e4f3c93fcab7
3
+ metadata.gz: f310846fe72df7bd8de12645904b0003639baf46a6d4bd2c6e9184d9473de048
4
+ data.tar.gz: 4ae186c060caac1c23e58a3956d16daf7952e24281163bebbf7afd32df841351
5
5
  SHA512:
6
- metadata.gz: f76914a111b66d8988f6e9a6764ec4aea26cda28981527a80b6d5e0dd9e20a3c484b0dc84a524c0c4eb67fd22ff764051215d753e0e10c8a936f3082654d4b97
7
- data.tar.gz: 11fdc9be8978c516529698580053e07bc625b059b06407e7132b4409b13f8295b33d774b1a507bd895baaa4d85401487e9f99c99a721ea3d30ce6ac26b3e0526
6
+ metadata.gz: dd780d08665a44085b9b64e6fe433aecefe2af419a678e84ab4cf14939e52f8a7f2f16a331bfc0f7b79f52adfa154c19e1438f66231148eb09accc1ead3751b3
7
+ data.tar.gz: 6014c95bbbe775da513d7f22684aafb4498432e389b73bea8041d9c19c15a79e9afc133d6dac53df1afa4f78aa3bd695a72be9b505e7238147184dd7a72353c5
data/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.4.0] - 2023-07-06
11
+
12
+ - Add `ConsumptionRequestTransfer` for new API
13
+
14
+ ## [0.3.0] - 2023-06-29
15
+
16
+ - Add `call_off_agreement` assoctiation to GCO `LineItem`
17
+ - Reflect API changes in `CallOffAgreement`
18
+
10
19
  ## [0.2.5] - 2023-06-26
11
20
 
12
21
  - Fixed relative class names in `CallOff`
@@ -42,7 +51,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42
51
  - Update and reuse `zaikio-client-helpers` logic to support `Zaikio::Client.with_token`
43
52
  - Initial release
44
53
 
45
- [Unreleased]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.5..HEAD
54
+ [Unreleased]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.4.0..HEAD
55
+ [0.4.0]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.3.0..v0.4.0
56
+ [0.3.0]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.5..v0.3.0
46
57
  [0.2.5]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.4..v0.2.5
47
58
  [0.2.4]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.3..v0.2.4
48
59
  [0.2.3]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.2..v0.2.3
@@ -4,16 +4,17 @@ module Zaikio
4
4
  module Warehouse
5
5
  # See https://docs.zaikio.com/api/warehouse/warehouse.html#/SKUs/get_skus__sku_id__call_off_agreement
6
6
  class CallOffAgreement < Base
7
- uri "skus/:sku_id/call_off_agreement"
7
+ uri "materials/:material_id/call_off_agreements/(:id)"
8
8
  include_root_in_json :call_off_agreement
9
9
 
10
- attributes :contract_number, :expires_on, :expired_on, :expires_after_amount_called_off,
11
- :sales_price_per_unit, :sales_price_per_unit_currency, :deletable, :created_at, :updated_at
10
+ attributes :contract_number, :expires_on, :expired_on, :expires_after_amount_called_off, :customer_id,
11
+ :sales_price_per_base_unit, :sales_price_per_base_unit_currency, :deletable, :created_at, :updated_at
12
12
 
13
- has_one :sku, uri: nil, class_name: "Zaikio::Warehouse::SKU"
13
+ has_one :material, uri: nil, class_name: "Zaikio::Warehouse::Material"
14
+ has_one :customer, uri: nil, class_name: "Zaikio::Warehouse::Contact"
14
15
 
15
16
  def reload
16
- self.attributes = self.class.where(sku_id: sku.id).find(id).attributes
17
+ self.attributes = self.class.where(material_id: material.id).find(id).attributes
17
18
  end
18
19
  end
19
20
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zaikio
4
+ module Warehouse
5
+ class ConsumptionRequestTransfer < Base
6
+ disable_http_methods :patch, :put, :delete
7
+ include_root_in_json :consumption_request_transfer
8
+
9
+ uri "consumption_request_transfers"
10
+
11
+ attributes :reference, :reference_link, :target_storage_area_id, :consumption_request_id
12
+
13
+ has_one :consumption_request, uri: nil, class_name: "Zaikio::Warehouse::ConsumptionRequest"
14
+ has_one :transfer, uri: nil, class_name: "Zaikio::Warehouse::Transfer"
15
+ has_one :consumption_request_cancelation, uri: nil, class_name: "Zaikio::Warehouse::ConsumptionRequestCancelation"
16
+ end
17
+ end
18
+ end
@@ -23,6 +23,7 @@ module Zaikio
23
23
  attributes :quantity, :created_at, :updated_at, :picked_at
24
24
 
25
25
  has_one :sku, uri: nil, class_name: "Zaikio::Warehouse::SKU"
26
+ has_one :call_off_agreement, uri: nil, class_name: "Zaikio::Warehouse::CallOffAgreement"
26
27
  has_one :picked_by, uri: nil, class_name: "Zaikio::Warehouse::Person"
27
28
  end
28
29
 
@@ -22,6 +22,8 @@ module Zaikio
22
22
  has_many :material_reservations,
23
23
  uri: "materials/:material_id/material_reservations",
24
24
  class_name: "Zaikio::Warehouse::MaterialReservation"
25
+ has_many :call_off_agreements, uri: "materials/:material_id/call_off_agreements",
26
+ class_name: "Zaikio::Warehouse::CallOffAgreement"
25
27
 
26
28
  def merge(into_material_or_material_id)
27
29
  self.class.request(:post, "#{collection_name}/#{id}/merge_into/#{into_material_or_material_id.to_param}")
@@ -20,7 +20,6 @@ module Zaikio
20
20
  has_many :manifest_entries,
21
21
  uri: "skus/:sku_id/manifest_entries(/:id)",
22
22
  class_name: "Zaikio::Warehouse::ManifestEntry"
23
- has_one :call_off_agreement, uri: "skus/:sku_id/call_off_agreement"
24
23
  end
25
24
  end
26
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Zaikio
4
4
  module Warehouse
5
- VERSION = "0.2.5"
5
+ VERSION = "0.4.0"
6
6
  end
7
7
  end
@@ -13,6 +13,7 @@ require "zaikio/warehouse/call_off_agreement"
13
13
  require "zaikio/warehouse/consumption"
14
14
  require "zaikio/warehouse/consumption_request"
15
15
  require "zaikio/warehouse/consumption_request_cancelation"
16
+ require "zaikio/warehouse/consumption_request_transfer"
16
17
  require "zaikio/warehouse/consumption_announcement"
17
18
  require "zaikio/warehouse/contact"
18
19
  require "zaikio/warehouse/correction"
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.2.5
4
+ version: 0.4.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: 2023-06-26 00:00:00.000000000 Z
12
+ date: 2023-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -225,6 +225,7 @@ files:
225
225
  - lib/zaikio/warehouse/consumption_announcement.rb
226
226
  - lib/zaikio/warehouse/consumption_request.rb
227
227
  - lib/zaikio/warehouse/consumption_request_cancelation.rb
228
+ - lib/zaikio/warehouse/consumption_request_transfer.rb
228
229
  - lib/zaikio/warehouse/contact.rb
229
230
  - lib/zaikio/warehouse/correction.rb
230
231
  - lib/zaikio/warehouse/deposit.rb