erp_integration 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c03eaf82065763fce0b3bf8b771b2af9a04e588ab56056f3b617f7696db110ad
4
- data.tar.gz: bfdf6e68ea49ad4e72a5cfcaa28d2b99d39d67f26cebb866214583076e607047
3
+ metadata.gz: d2096b4545bfa5a63150bcd2886dd5deed9059053e26f47995e042b15f96bc0d
4
+ data.tar.gz: deef70bcfd9f9ad467819fdc9b6668da3dd57351de17476867da5708821e78c0
5
5
  SHA512:
6
- metadata.gz: e368a61cd727304adf94f5dbfb14f149b2c976b27e68c7d1de00b93dee9d279f35dfcbf58d197ef3f9775cbf6a0e1d18af1c4ac0883edf8e3466eabe8c7c9fd4
7
- data.tar.gz: b82940b549df5f315167152bcc65c60ce7fc44ed44d8863513238e06c66e330e553dd2cdbe6799bd01b7c3b418b5fb45d8e2d14d8f0e949e8b9a2c787c93be69
6
+ metadata.gz: 6f81795073683f11e1ddb673bf14316f67f6e3787d76889cf389457c1d1d840cd813b8695643b0040620fb8bd06b098b4c556f3724121d8bc3f3ee39e99c13ba
7
+ data.tar.gz: 416815c51a13e08b90d06d70ed2d64bd67d2505890a82cd2d81b1a1f86054eaec6a4edaf76329612ea2bed85354c845b6b0372d309dc2d4f04427c9e4dea0b07
@@ -15,4 +15,4 @@ jobs:
15
15
  steps:
16
16
  - uses: seferov/pr-lint-action@master
17
17
  with:
18
- title-regex: '^\[RELEASE|NO-TICKET|DL|UDL|AD|DU|AR|IN|CON|DIS|AS|MT|DEL-\d*\](\ )'
18
+ title-regex: '^\[RELEASE|NO-TICKET|DL|UDL|AD|DU|AR|IN|CON|DIS|AS|MT|SCR|DEL-\d*\](\ )'
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ErpIntegration
4
+ # The `ErpIntegration::BoxType` exposes an uniformed API for interaction with
5
+ # third-party ERP vendors.
6
+ class BoxType < Resource
7
+ attr_accessor :id
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ErpIntegration
4
+ # The `ErpIntegration::Carrier` exposes an uniformed API for interaction with
5
+ # third-party ERP vendors.
6
+ class Carrier < Resource
7
+ attr_accessor :id
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ErpIntegration
4
+ # The `ErpIntegration::CarrierService` exposes an uniformed API for interaction with
5
+ # third-party ERP vendors.
6
+ class CarrierService < Resource
7
+ attr_accessor :id
8
+ end
9
+ end
@@ -4,6 +4,7 @@ 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 :id, :channel, :product, :quantity
7
+ attr_accessor :availability_source, :bom, :id, :channel, :product,
8
+ :quantity, :product_identifier
8
9
  end
9
10
  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
@@ -28,5 +28,9 @@ module ErpIntegration
28
28
  :tpl_status, :tracking_export_status, :tracking_number, :tracking_number_blurb, :tsv,
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
+
32
+ def generate_shipping_labels(ids)
33
+ client.put('model/stock.shipment.out/generate_shipping_labels', [ids])
34
+ end
31
35
  end
32
36
  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 BoxType < ApiResource
9
+ self.model_name = 'carrier.box_type'
10
+ end
11
+ end
12
+ end
13
+ 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 Carrier < ApiResource
9
+ self.model_name = 'carrier'
10
+ end
11
+ end
12
+ end
13
+ 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 CarrierService < ApiResource
9
+ self.model_name = 'carrier.service'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -7,6 +7,10 @@ module ErpIntegration
7
7
  module Resources
8
8
  class CustomerShipment < ApiResource
9
9
  self.model_name = 'stock.shipment.out'
10
+
11
+ def generate_shipping_labels(ids)
12
+ client.put('model/stock.shipment.out/generate_shipping_labels', ids)
13
+ end
10
14
  end
11
15
  end
12
16
  end
@@ -29,6 +29,12 @@ module ErpIntegration
29
29
  true
30
30
  end
31
31
 
32
+ def return!(id, options)
33
+ client.put("model/sale.sale/#{id}/return_order", options)
34
+ rescue ErpIntegration::HttpError::BadRequest
35
+ false
36
+ end
37
+
32
38
  # Allows duplicating the entire sales order in Fulfil.
33
39
  # @param id [Integer|String] The ID of the to be duplicated order.
34
40
  # @return [Array|boolean] Whether the sales order was duplicated successfully or not.
@@ -20,6 +20,10 @@ module ErpIntegration
20
20
  self.class.adapter.cancel(id)
21
21
  end
22
22
 
23
+ def return!(options)
24
+ self.class.adapter.return!(id, options)
25
+ end
26
+
23
27
  def duplicate
24
28
  self.class.adapter.duplicate(id)
25
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ErpIntegration
4
- VERSION = '0.21.0'
4
+ VERSION = '0.23.0'
5
5
  end
@@ -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.21.0
4
+ version: 0.23.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-01-31 00:00:00.000000000 Z
11
+ date: 2023-03-09 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