erp_integration 0.47.0 → 0.49.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/erp_integration/configuration.rb +18 -0
- data/lib/erp_integration/customer_shipment.rb +5 -0
- data/lib/erp_integration/fulfil/resources/customer_shipment.rb +7 -0
- data/lib/erp_integration/fulfil/resources/product_option.rb +13 -0
- data/lib/erp_integration/fulfil/resources/sales_line_option.rb +13 -0
- data/lib/erp_integration/product_option.rb +9 -0
- data/lib/erp_integration/sales_line_option.rb +9 -0
- data/lib/erp_integration/version.rb +1 -1
- data/lib/erp_integration.rb +3 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 649f6e6df0c9f5fb12d93fd9ffde7a3648cbc364f087e1bcc8ad5ef50c5102ee
|
4
|
+
data.tar.gz: 1d47066b1b44fbc008cdbae187004006d06f609dbc795789f4d28b0535dd6a8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2b9ae39b29a56106026a26831d5a4b3879561d61a0a67f27c0f0ae63714c654d54e13a1c7452aeee6511d9c1e0bde012fda5bf5b807e2955e5ed82bb750a5be
|
7
|
+
data.tar.gz: e62f04b7837c043593b9afcf2c4f0f8c85e41aa20dbd789e6eba6e3a1759bde2cb84478d131338507c93ca4b3456e82a6d8a8cd92ec58ee212eb02e8e9999851
|
@@ -147,6 +147,16 @@ module ErpIntegration
|
|
147
147
|
# @return [Symbol] The configured adapter for the tracking number.
|
148
148
|
attr_writer :gift_card_adapter
|
149
149
|
|
150
|
+
# Allows configuring an adapter for the `SaleLineOption` resource. When
|
151
|
+
# none is configured, it will default to Fulfil.
|
152
|
+
# @return [Symbol] The configured adapter for the tracking number.
|
153
|
+
attr_writer :sales_line_option_adapter
|
154
|
+
|
155
|
+
# Allows configuring an adapter for the `ProductOption` resource. When
|
156
|
+
# none is configured, it will default to Fulfil.
|
157
|
+
# @return [Symbol] The configured adapter for the tracking number.
|
158
|
+
attr_writer :product_option_adapter
|
159
|
+
|
150
160
|
# Logger that will be used for HTTP operations on Client
|
151
161
|
# @return [Logger] The configured logger
|
152
162
|
attr_accessor :logger
|
@@ -272,6 +282,14 @@ module ErpIntegration
|
|
272
282
|
def gift_card_adapter
|
273
283
|
@gift_card_adapter || :fulfil
|
274
284
|
end
|
285
|
+
|
286
|
+
def sales_line_option_adapter
|
287
|
+
@sales_line_option_adapter || :fulfil
|
288
|
+
end
|
289
|
+
|
290
|
+
def product_option_adapter
|
291
|
+
@product_option_adapter || :fulfil
|
292
|
+
end
|
275
293
|
end
|
276
294
|
|
277
295
|
# Returns ERP Integration's configuration.
|
@@ -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
|
@@ -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
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ErpIntegration
|
4
|
+
# The `ErpIntegration::SaleLieOption` exposes an uniformed API for interaction with
|
5
|
+
# third-party ERP vendors.
|
6
|
+
class SalesLineOption < Resource
|
7
|
+
attr_accessor :id, :option, :value_text, :line
|
8
|
+
end
|
9
|
+
end
|
data/lib/erp_integration.rb
CHANGED
@@ -31,16 +31,19 @@ module ErpIntegration
|
|
31
31
|
autoload :ChannelListing, 'erp_integration/channel_listing'
|
32
32
|
autoload :CustomerShipment, 'erp_integration/customer_shipment'
|
33
33
|
autoload :CustomerShipmentReturn, 'erp_integration/customer_shipment_return'
|
34
|
+
autoload :GiftCard, 'erp_integration/gift_card'
|
34
35
|
autoload :InternalShipment, 'erp_integration/internal_shipment'
|
35
36
|
autoload :Location, 'erp_integration/location'
|
36
37
|
autoload :Product, 'erp_integration/product'
|
37
38
|
autoload :ProductCategory, 'erp_integration/product_category'
|
39
|
+
autoload :ProductOption, 'erp_integration/product_option'
|
38
40
|
autoload :ProductTemplate, 'erp_integration/product_template'
|
39
41
|
autoload :ProductionOrder, 'erp_integration/production_order'
|
40
42
|
autoload :PurchaseOrder, 'erp_integration/purchase_order'
|
41
43
|
autoload :PurchaseOrderLine, 'erp_integration/purchase_order_line'
|
42
44
|
autoload :PurchaseRequest, 'erp_integration/purchase_request'
|
43
45
|
autoload :Resource, 'erp_integration/resource'
|
46
|
+
autoload :SalesLineOption, 'erp_integration/sales_line_option'
|
44
47
|
autoload :SalesOrder, 'erp_integration/sales_order'
|
45
48
|
autoload :SalesOrderLine, 'erp_integration/sales_order_line'
|
46
49
|
autoload :SalesReturnReason, 'erp_integration/sales_return_reason'
|
@@ -50,7 +53,6 @@ module ErpIntegration
|
|
50
53
|
autoload :Task, 'erp_integration/task'
|
51
54
|
autoload :TrackingNumber, 'erp_integration/tracking_number'
|
52
55
|
autoload :Webhook, 'erp_integration/webhook'
|
53
|
-
autoload :GiftCard, 'erp_integration/gift_card'
|
54
56
|
module Resources
|
55
57
|
autoload :Errors, 'erp_integration/resources/errors'
|
56
58
|
autoload :Persistence, 'erp_integration/resources/persistence'
|
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.
|
4
|
+
version: 0.49.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-
|
11
|
+
date: 2024-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -295,11 +295,13 @@ files:
|
|
295
295
|
- lib/erp_integration/fulfil/resources/location.rb
|
296
296
|
- lib/erp_integration/fulfil/resources/product.rb
|
297
297
|
- lib/erp_integration/fulfil/resources/product_category.rb
|
298
|
+
- lib/erp_integration/fulfil/resources/product_option.rb
|
298
299
|
- lib/erp_integration/fulfil/resources/product_template.rb
|
299
300
|
- lib/erp_integration/fulfil/resources/production_order.rb
|
300
301
|
- lib/erp_integration/fulfil/resources/purchase_order.rb
|
301
302
|
- lib/erp_integration/fulfil/resources/purchase_order_line.rb
|
302
303
|
- lib/erp_integration/fulfil/resources/purchase_request.rb
|
304
|
+
- lib/erp_integration/fulfil/resources/sales_line_option.rb
|
303
305
|
- lib/erp_integration/fulfil/resources/sales_order.rb
|
304
306
|
- lib/erp_integration/fulfil/resources/sales_order_line.rb
|
305
307
|
- lib/erp_integration/fulfil/resources/sales_return_reason.rb
|
@@ -316,6 +318,7 @@ files:
|
|
316
318
|
- lib/erp_integration/middleware/error_handling.rb
|
317
319
|
- lib/erp_integration/product.rb
|
318
320
|
- lib/erp_integration/product_category.rb
|
321
|
+
- lib/erp_integration/product_option.rb
|
319
322
|
- lib/erp_integration/product_template.rb
|
320
323
|
- lib/erp_integration/production_order.rb
|
321
324
|
- lib/erp_integration/purchase_order.rb
|
@@ -325,6 +328,7 @@ files:
|
|
325
328
|
- lib/erp_integration/resources/errors.rb
|
326
329
|
- lib/erp_integration/resources/persistence.rb
|
327
330
|
- lib/erp_integration/resources/validations.rb
|
331
|
+
- lib/erp_integration/sales_line_option.rb
|
328
332
|
- lib/erp_integration/sales_order.rb
|
329
333
|
- lib/erp_integration/sales_order_line.rb
|
330
334
|
- lib/erp_integration/sales_return_reason.rb
|