erp_integration 0.48.0 → 0.50.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: 5c4c24346c137f126254ca4c48a8fba90742b4ce614a5575bf2344c1c02d6463
4
- data.tar.gz: 60a8fd0caaa904d63c0d01dd185b40b36d2c8a1657b1fffb196974d7cdfa2beb
3
+ metadata.gz: f1164d8044b67e9e2b3a76d2fc3fe1cc2a293e0a930a5e3e8f2424ec48089b9a
4
+ data.tar.gz: 11e5bccbf22d70be8496049fb731cd6fe782cba50a2283520eaeacd836b71631
5
5
  SHA512:
6
- metadata.gz: 6e67b11d936ce4b6c71e8f4963ca1ebeff30c82293862002442dc3b8e9eb0a2f42aab96b9507ceabd8931fb8214165e4fd17752012610e16eb21a80e0cbb55d5
7
- data.tar.gz: 2f613253fc2cff3482e23c659c04ee2c5557478fe30d9e668de786220b414d361670c9704de902c220610e0eb4ec531cf3f80205a03d0950d9d4c03f7811583f
6
+ metadata.gz: 7e62a94f229b19e3ea1fa70f315e9e6e6295fa0d2ee309505787031ca69aaf6188449418abf72f9af2c2682debe083eca14eca7b5e259c5fc0c29788c0e84522
7
+ data.tar.gz: f78b319f38240e564de0136021df8f3cd866cdecbd6b409d814b3111c0acf2d200e173f685f5e110d1cc0c6957b5eff49d05e9ffb0783ec059c1a789579f8dce
@@ -29,6 +29,11 @@ module ErpIntegration
29
29
  :ups_saturday_delivery, :warehouse, :warehouse_output, :warehouse_storage, :weight, :weight_digits,
30
30
  :weight_uom, :weight_uom_symbol, :write_date, :write_uid
31
31
 
32
+ # @param warehouse_ids [Array<Integer>, Integer] The warehouse(s) to move the shipment to
33
+ def move_to(*warehouse_ids)
34
+ self.class.adapter.change_warehouse(id, *warehouse_ids)
35
+ end
36
+
32
37
  def split(options)
33
38
  self.class.adapter.split(id, options)
34
39
  end
@@ -47,5 +47,14 @@ module ErpIntegration
47
47
  def receive!(id)
48
48
  self.class.adapter.receive!(id)
49
49
  end
50
+
51
+ # TODO: We don't need to send the id here
52
+ # as is part of the object. Fix this and the rest
53
+ # of the methods doing the same
54
+ #
55
+ # SBE-965
56
+ def mark_as_done!(id)
57
+ self.class.adapter.mark_as_done!(id)
58
+ end
50
59
  end
51
60
  end
@@ -8,6 +8,13 @@ module ErpIntegration
8
8
  class CustomerShipment < ApiResource
9
9
  self.model_name = 'stock.shipment.out'
10
10
 
11
+ # Change the warehouse of a CustomerShipment in Fulfil
12
+ #
13
+ # @param id [Integer, String] The ID of the Customer Shipment
14
+ def change_warehouse(id, options)
15
+ client.put("model/stock.shipment.out/#{id}/change_warehouse", options)
16
+ end
17
+
11
18
  # Split a CustomerShipment in Fulfil
12
19
  #
13
20
  # @param id [Integer, String] The ID of the Customer Shipment
@@ -32,6 +32,11 @@ module ErpIntegration
32
32
  rescue Faraday::ParsingError
33
33
  true
34
34
  end
35
+
36
+ def mark_as_done!(id)
37
+ client.put("model/#{model_name}/#{id}/done")
38
+ true
39
+ end
35
40
  end
36
41
  end
37
42
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ErpIntegration
4
- VERSION = '0.48.0'
4
+ VERSION = '0.50.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_integration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.48.0
4
+ version: 0.50.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Vermaas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-05 00:00:00.000000000 Z
11
+ date: 2024-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport