zaikio-warehouse 0.2.4 → 0.3.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: c8e6cd14f506a06aa4f2f6dcfe43452144f0c2ece0063350f55f3c77589b30d8
4
- data.tar.gz: 85e0ec8568a905739541b005cd56cf394276eb8812ca06c09bc204f79983eeb9
3
+ metadata.gz: 1f01f8be0e19be448f0d2be8e58569ea4abf9305b82ba563f31b900b65073d26
4
+ data.tar.gz: da417c6747ed9344a7f05ce127ed19309928810942cd3038279f56f567405fc6
5
5
  SHA512:
6
- metadata.gz: bac9ee55ef8d820f8adf4154298ce96b9dbcd06164f92d6bea42c1a9b95da58167b42639566dc294dfde74d550a0d039f4eab809166b5a0f8e3b7c60d8209f01
7
- data.tar.gz: 94c2dfd23e36e72a6231ba1c75e449a171c0624388dd87e4beb677da5bb144ae2829560327b75c36c915f37b0af61bf3fdd55ac6a9647dd1126bdd8a51d2ffb6
6
+ metadata.gz: cd03a249550178a06346064262dbbbda345dc0f53bb5f05a4aa149e2e4e3e004b63418995b9ee84a97455b4085f2d82506800fd97d28b098277501a399ea8c3c
7
+ data.tar.gz: 5af5f9f0c1f2a77db17d38ed5688dd0b1a3d708bb32550d9aa4461890cd8cea225121c50a7de4e563b9b83108b4cee285331aa454368b5b2acb8573fddd8ad01
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.3.0] - 2023-06-29
11
+
12
+ - Add `call_off_agreement` assoctiation to GCO `LineItem`
13
+ - Reflect API changes in `CallOffAgreement`
14
+
15
+ ## [0.2.5] - 2023-06-26
16
+
17
+ - Fixed relative class names in `CallOff`
18
+
10
19
  ## [0.2.4] - 2023-03-27
11
20
 
12
21
  - Add `Material#merge(id)` method to support merging
@@ -38,7 +47,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
38
47
  - Update and reuse `zaikio-client-helpers` logic to support `Zaikio::Client.with_token`
39
48
  - Initial release
40
49
 
41
- [Unreleased]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.4..HEAD
50
+ [Unreleased]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.3.0..HEAD
51
+ [0.3.0]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.5..v0.3.0
52
+ [0.2.5]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.4..v0.2.5
42
53
  [0.2.4]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.3..v0.2.4
43
54
  [0.2.3]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.2..v0.2.3
44
55
  [0.2.2]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.1..v0.2.2
@@ -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
@@ -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
 
@@ -44,10 +45,10 @@ module Zaikio
44
45
 
45
46
  attributes :state, :references, :delivery_date, :deletable, :created_at, :updated_at
46
47
 
47
- has_one :delivery_address, uri: nil, class_name: "Address"
48
+ has_one :delivery_address, uri: nil, class_name: "Zaikio::Warehouse::FinishedGoods::CallOff::Address"
48
49
  has_one :customer, uri: nil, class_name: "Zaikio::Warehouse::Contact"
49
50
  has_one :operator, uri: nil, class_name: "Zaikio::Warehouse::Organization"
50
- has_many :line_items, uri: nil, class_name: "LineItem"
51
+ has_many :line_items, uri: nil, class_name: "Zaikio::Warehouse::FinishedGoods::CallOff::LineItem"
51
52
  end
52
53
  end
53
54
  end
@@ -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.4"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
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.4
4
+ version: 0.3.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-03-27 00:00:00.000000000 Z
12
+ date: 2023-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport