erp_integration 0.49.0 → 0.52.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: 649f6e6df0c9f5fb12d93fd9ffde7a3648cbc364f087e1bcc8ad5ef50c5102ee
4
- data.tar.gz: 1d47066b1b44fbc008cdbae187004006d06f609dbc795789f4d28b0535dd6a8f
3
+ metadata.gz: 7984c5549446febb8478fe9611b601c257a0bd03b3642ec5d35b480f504cbff5
4
+ data.tar.gz: 540f6ca9033aebe017cb2c32db0d21de595ea172a42316e5e3366fe933a8739f
5
5
  SHA512:
6
- metadata.gz: e2b9ae39b29a56106026a26831d5a4b3879561d61a0a67f27c0f0ae63714c654d54e13a1c7452aeee6511d9c1e0bde012fda5bf5b807e2955e5ed82bb750a5be
7
- data.tar.gz: e62f04b7837c043593b9afcf2c4f0f8c85e41aa20dbd789e6eba6e3a1759bde2cb84478d131338507c93ca4b3456e82a6d8a8cd92ec58ee212eb02e8e9999851
6
+ metadata.gz: 36d578d1ac7e5bfaacd79118fc1f5405e5a754e4a6a3571bc0957aa7347b159beafdce7bcaf27f968df2a18b7a736f63956426b1db3ca5c99ec923102a2db592
7
+ data.tar.gz: d985ee23e864310a16034cb25c360777be1b172ca4160c707a63ea387e4623e323c88c16ff8330763bee7cc122b78bc4c516fd0e36736924d88eae4a33b312ec
@@ -152,6 +152,11 @@ module ErpIntegration
152
152
  # @return [Symbol] The configured adapter for the tracking number.
153
153
  attr_writer :sales_line_option_adapter
154
154
 
155
+ # Allows configuring an adapter for the `PartyAddress` resource. When
156
+ # none is configured, it will default to Fulfil.
157
+ # @return [Symbol] The configured adapter for the tracking number.
158
+ attr_writer :party_address_adapter
159
+
155
160
  # Allows configuring an adapter for the `ProductOption` resource. When
156
161
  # none is configured, it will default to Fulfil.
157
162
  # @return [Symbol] The configured adapter for the tracking number.
@@ -287,6 +292,10 @@ module ErpIntegration
287
292
  @sales_line_option_adapter || :fulfil
288
293
  end
289
294
 
295
+ def party_address_adapter
296
+ @party_address_adapter || :fulfil
297
+ end
298
+
290
299
  def product_option_adapter
291
300
  @product_option_adapter || :fulfil
292
301
  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
@@ -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
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../api_resource'
4
+
5
+ module ErpIntegration
6
+ module Fulfil
7
+ module Resources
8
+ class PartyAddress < ApiResource
9
+ self.model_name = 'party.address'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ErpIntegration
4
+ class PartyAddress < Resource
5
+ attr_accessor :id, :phone, :email
6
+ end
7
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ErpIntegration
4
- VERSION = '0.49.0'
4
+ VERSION = '0.52.0'
5
5
  end
@@ -45,6 +45,7 @@ module ErpIntegration
45
45
  autoload :Resource, 'erp_integration/resource'
46
46
  autoload :SalesLineOption, 'erp_integration/sales_line_option'
47
47
  autoload :SalesOrder, 'erp_integration/sales_order'
48
+ autoload :PartyAddress, 'erp_integration/party_address'
48
49
  autoload :SalesOrderLine, 'erp_integration/sales_order_line'
49
50
  autoload :SalesReturnReason, 'erp_integration/sales_return_reason'
50
51
  autoload :StockBinTransfer, 'erp_integration/stock_bin_transfer'
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.49.0
4
+ version: 0.52.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-07-30 00:00:00.000000000 Z
11
+ date: 2024-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -293,6 +293,7 @@ files:
293
293
  - lib/erp_integration/fulfil/resources/gift_card.rb
294
294
  - lib/erp_integration/fulfil/resources/internal_shipment.rb
295
295
  - lib/erp_integration/fulfil/resources/location.rb
296
+ - lib/erp_integration/fulfil/resources/party_address.rb
296
297
  - lib/erp_integration/fulfil/resources/product.rb
297
298
  - lib/erp_integration/fulfil/resources/product_category.rb
298
299
  - lib/erp_integration/fulfil/resources/product_option.rb
@@ -316,6 +317,7 @@ files:
316
317
  - lib/erp_integration/internal_shipment.rb
317
318
  - lib/erp_integration/location.rb
318
319
  - lib/erp_integration/middleware/error_handling.rb
320
+ - lib/erp_integration/party_address.rb
319
321
  - lib/erp_integration/product.rb
320
322
  - lib/erp_integration/product_category.rb
321
323
  - lib/erp_integration/product_option.rb
@@ -363,7 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
363
365
  - !ruby/object:Gem::Version
364
366
  version: '0'
365
367
  requirements: []
366
- rubygems_version: 3.4.10
368
+ rubygems_version: 3.5.11
367
369
  signing_key:
368
370
  specification_version: 4
369
371
  summary: Connects Mejuri with third-party ERP vendors