erp_integration 0.22.0 → 0.24.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/box_type.rb +9 -0
- data/lib/erp_integration/carrier.rb +9 -0
- data/lib/erp_integration/carrier_service.rb +9 -0
- data/lib/erp_integration/channel_listing.rb +1 -2
- data/lib/erp_integration/configuration.rb +12 -0
- data/lib/erp_integration/customer_shipment_return.rb +14 -0
- data/lib/erp_integration/fulfil/resources/box_type.rb +13 -0
- data/lib/erp_integration/fulfil/resources/carrier.rb +13 -0
- data/lib/erp_integration/fulfil/resources/carrier_service.rb +13 -0
- data/lib/erp_integration/fulfil/resources/customer_shipment_return.rb +8 -0
- data/lib/erp_integration/version.rb +1 -1
- data/lib/erp_integration.rb +3 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97c1c75b5b15e68c4fd472e18a6c3fc2a4f23e249e968d1e71aeee95f754a331
|
4
|
+
data.tar.gz: 952602889086f2d727acd5a2fce5e956e9c510a86fac9b0f6f090ec6608a7bc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe64267ae5b1f52918f4e212120914dfe5a10f02ee90d7232555301b876262c5a435b51b1bcd0b621315eb1812d496f47a7d64fbcadf761d1b6014e65a0db620
|
7
|
+
data.tar.gz: aef83df0dacf867cf54447fa22c3187f2584e99769881bec06630664a4a5587401cf7a7b34dece12001219c7bc9e6fffa1a1ed6e4da4986cf62bfd1927d78b55
|
@@ -4,7 +4,6 @@ module ErpIntegration
|
|
4
4
|
# The `ErpIntegration::ChannelListing` exposes an uniformed API for interaction with
|
5
5
|
# third-party ERP vendors.
|
6
6
|
class ChannelListing < Resource
|
7
|
-
attr_accessor :
|
8
|
-
:quantity, :product_identifier
|
7
|
+
attr_accessor :id, :channel, :product, :quantity
|
9
8
|
end
|
10
9
|
end
|
@@ -117,6 +117,14 @@ module ErpIntegration
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
+
def carrier_adapter
|
121
|
+
@carrier_adapter || :fulfil
|
122
|
+
end
|
123
|
+
|
124
|
+
def carrier_service_adapter
|
125
|
+
@carrier_service_adapter || :fulfil
|
126
|
+
end
|
127
|
+
|
120
128
|
def bill_of_material_adapter
|
121
129
|
@bill_of_material_adapter || :fulfil
|
122
130
|
end
|
@@ -129,6 +137,10 @@ module ErpIntegration
|
|
129
137
|
@bill_of_material_output_adapter || :fulfil
|
130
138
|
end
|
131
139
|
|
140
|
+
def box_type_adapter
|
141
|
+
@box_type_adapter || :fulfil
|
142
|
+
end
|
143
|
+
|
132
144
|
def channel_listing_adapter
|
133
145
|
@channel_listing_adapter || :fulfil
|
134
146
|
end
|
@@ -18,5 +18,19 @@ module ErpIntegration
|
|
18
18
|
:total_customs_value, :tpl_status, :tracking_number, :tsv, :warehouse, :warehouse_input,
|
19
19
|
:warehouse_storage, :warehouse_type, :weight, :weight_digits, :weight_uom,
|
20
20
|
:weight_uom_symbol, :write_date, :write_uid
|
21
|
+
|
22
|
+
# Generate a shipping label for a {CustomerShipmentReturn}.
|
23
|
+
#
|
24
|
+
# @param id [Integer] The ID of the {CustomerShipmentReturn}.
|
25
|
+
def generate_shipping_label(id)
|
26
|
+
self.class.adapter.generate_shipping_label(id)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Generate a default package for a {CustomerShipmentReturn}.
|
30
|
+
#
|
31
|
+
# @param id [Integer] The ID of the {CustomerShipmentReturn}.
|
32
|
+
def create_default_package(id)
|
33
|
+
self.class.adapter.create_default_package(id)
|
34
|
+
end
|
21
35
|
end
|
22
36
|
end
|
@@ -7,6 +7,14 @@ module ErpIntegration
|
|
7
7
|
module Resources
|
8
8
|
class CustomerShipmentReturn < ApiResource
|
9
9
|
self.model_name = 'stock.shipment.out.return'
|
10
|
+
|
11
|
+
def generate_shipping_label(id)
|
12
|
+
client.put("model/#{model_name}/#{id}/generate_shipping_labels")
|
13
|
+
end
|
14
|
+
|
15
|
+
def create_default_package(id)
|
16
|
+
client.put("model/#{model_name}/#{id}/create_default_packages")
|
17
|
+
end
|
10
18
|
end
|
11
19
|
end
|
12
20
|
end
|
data/lib/erp_integration.rb
CHANGED
@@ -20,9 +20,12 @@ require_relative 'erp_integration/fulfil/client'
|
|
20
20
|
# The `ErpIntegration` integrates Mejuri with third-party ERP vendors.
|
21
21
|
module ErpIntegration
|
22
22
|
# Resources
|
23
|
+
autoload :Carrier, 'erp_integration/carrier'
|
24
|
+
autoload :CarrierService, 'erp_integration/carrier_service'
|
23
25
|
autoload :BillOfMaterial, 'erp_integration/bill_of_material'
|
24
26
|
autoload :BillOfMaterialInput, 'erp_integration/bill_of_material_input'
|
25
27
|
autoload :BillOfMaterialOutput, 'erp_integration/bill_of_material_output'
|
28
|
+
autoload :BoxType, 'erp_integration/box_type'
|
26
29
|
autoload :ChannelListing, 'erp_integration/channel_listing'
|
27
30
|
autoload :CustomerShipment, 'erp_integration/customer_shipment'
|
28
31
|
autoload :CustomerShipmentReturn, 'erp_integration/customer_shipment_return'
|
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.24.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: 2023-
|
11
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -262,6 +262,9 @@ files:
|
|
262
262
|
- lib/erp_integration/bill_of_material.rb
|
263
263
|
- lib/erp_integration/bill_of_material_input.rb
|
264
264
|
- lib/erp_integration/bill_of_material_output.rb
|
265
|
+
- lib/erp_integration/box_type.rb
|
266
|
+
- lib/erp_integration/carrier.rb
|
267
|
+
- lib/erp_integration/carrier_service.rb
|
265
268
|
- lib/erp_integration/channel_listing.rb
|
266
269
|
- lib/erp_integration/configuration.rb
|
267
270
|
- lib/erp_integration/customer_shipment.rb
|
@@ -279,6 +282,9 @@ files:
|
|
279
282
|
- lib/erp_integration/fulfil/resources/bill_of_material.rb
|
280
283
|
- lib/erp_integration/fulfil/resources/bill_of_material_input.rb
|
281
284
|
- lib/erp_integration/fulfil/resources/bill_of_material_output.rb
|
285
|
+
- lib/erp_integration/fulfil/resources/box_type.rb
|
286
|
+
- lib/erp_integration/fulfil/resources/carrier.rb
|
287
|
+
- lib/erp_integration/fulfil/resources/carrier_service.rb
|
282
288
|
- lib/erp_integration/fulfil/resources/channel_listing.rb
|
283
289
|
- lib/erp_integration/fulfil/resources/customer_shipment.rb
|
284
290
|
- lib/erp_integration/fulfil/resources/customer_shipment_return.rb
|
@@ -336,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
336
342
|
- !ruby/object:Gem::Version
|
337
343
|
version: '0'
|
338
344
|
requirements: []
|
339
|
-
rubygems_version: 3.
|
345
|
+
rubygems_version: 3.2.22
|
340
346
|
signing_key:
|
341
347
|
specification_version: 4
|
342
348
|
summary: Connects Mejuri with third-party ERP vendors
|