erp_integration 0.5.1 → 0.5.5

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: 86d28936152c0532ae9dd25cd52d40c8d66dca44eccd4323fb230c8f97d204e8
4
- data.tar.gz: 223e971efbe294909519af5c6ae1a5a8590a7c189b30e7de06a27de40e118e4b
3
+ metadata.gz: 6ba635456dc688941f6d3a1d52b48f9a24ef6a6ccfd8ebb5f522749b6054546b
4
+ data.tar.gz: 802f67bc96c101f8945a27c8925b2690d4d7513f2435457c69fee91f9fad2de0
5
5
  SHA512:
6
- metadata.gz: 607e179b5d3e2c1eef9b8dc00b6b8a290412b5e58843570b627dcc6f428c057e84c7a7916d0b1b72df5aae0eadda8effec1bf51f6a5b0abf4e9141a8be508a61
7
- data.tar.gz: 4814277a9b1df732e3c31ff72c066d4b6becebd02917328ab04404d060757c3d2fa89055c5a138c1226d9911933377862a2534ce9d28f6ecbe04d9e0aba999b7
6
+ metadata.gz: acd6cb73c26c593d2c01e78ca994274a84c4bbaea429542f21b524411fef9ab3e1e4e1b3bbf84bdf17cb8c2e66efef4969bed6531bcbd165acde0dbd87195952
7
+ data.tar.gz: '0680d849ab5f42043ec2a8903c1f139e7c180e295737218cb83511c83122ecf3e3f038e0bc2943aed51da85f8b24dade4ee858e4eb1a158d39dbd4109ab815a8'
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ErpIntegration
4
+ # The `ErpIntegration::BillOfMaterial` exposes an uniformed API for interaction with
5
+ # third-party ERP vendors.
6
+ class BillOfMaterial < Resource
7
+ attr_accessor :active, :attachments, :cost, :create_date, :create_uid, :id,
8
+ :inputs, :instructions, :is_built_on_the_fly, :location, :messages,
9
+ :metadata, :name, :output_products, :outputs, :private_notes, :products,
10
+ :public_notes, :quantity_buildable, :quantity_expected, :rec_blurb,
11
+ :rec_name, :routing, :state, :supervisor, :version, :warehouse, :work_center,
12
+ :write_date, :write_uid
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ErpIntegration
4
+ # The `ErpIntegration::BillOfMaterialInput` exposes an uniformed API for interaction with
5
+ # third-party ERP vendors.
6
+ class BillOfMaterialInput < Resource
7
+ attr_accessor :attachments, :bom, :create_date, :create_uid, :id, :messages,
8
+ :metadata, :private_notes, :product, :public_notes, :quantity,
9
+ :rec_blurb, :rec_name, :sequence, :to_location, :unit_digits,
10
+ :uom, :uom_category, :warehouse, :write_date, :write_uid
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ErpIntegration
4
+ # The `ErpIntegration::BillOfMaterialOutput` exposes an uniformed API for interaction with
5
+ # third-party ERP vendors.
6
+ class BillOfMaterialOutput < Resource
7
+ attr_accessor :attachments, :bom, :create_date, :create_uid, :id, :messages,
8
+ :metadata, :private_notes, :product, :public_notes, :quantity,
9
+ :rec_blurb, :rec_name, :sequence, :to_location, :unit_digits,
10
+ :uom, :uom_category, :warehouse, :write_date, :write_uid
11
+ end
12
+ end
@@ -22,11 +22,31 @@ module ErpIntegration
22
22
  # @return [String] The merchant ID for Fulfil.
23
23
  attr_accessor :fulfil_merchant_id
24
24
 
25
+ # Allows configuring an adapter for the `BillOfMaterial` resource. When
26
+ # none is configured, it will default to Fulfil.
27
+ # @return [Symbol] The configured adapter for the bill_of_material.
28
+ attr_writer :bill_of_material_adapter
29
+
30
+ # Allows configuring an adapter for the `BillOfMaterialInput` resource. When
31
+ # none is configured, it will default to Fulfil.
32
+ # @return [Symbol] The configured adapter for the Bill of Material's input.
33
+ attr_writer :bill_of_material_input_adapter
34
+
35
+ # Allows configuring an adapter for the `BillOfMaterialOutput` resource. When
36
+ # none is configured, it will default to Fulfil.
37
+ # @return [Symbol] The configured adapter for the bill_of_material.
38
+ attr_writer :bill_of_material_output_adapter
39
+
25
40
  # Allows configuring an adapter for the `Product` resource. When none is
26
41
  # configured, it will default to Fulfil.
27
42
  # @return [Symbol] The configured adapter for the products.
28
43
  attr_writer :product_adapter
29
44
 
45
+ # Allows configuring an adapter for the `ProductionOrder` resource. When
46
+ # none is configured, it will default to Fulfil.
47
+ # @return [Symbol] The configured adapter for the production_order.
48
+ attr_writer :production_order_adapter
49
+
30
50
  # Allows configuring an adapter for the `PurchaseOrder` resource. When none is
31
51
  # configured, it will default to Fulfil.
32
52
  # @return [Symbol] The configured adapter for the purchase orders.
@@ -68,10 +88,26 @@ module ErpIntegration
68
88
  end
69
89
  end
70
90
 
91
+ def bill_of_material_adapter
92
+ @bill_of_material_adapter || :fulfil
93
+ end
94
+
95
+ def bill_of_material_input_adapter
96
+ @bill_of_material_input_adapter || :fulfil
97
+ end
98
+
99
+ def bill_of_material_output_adapter
100
+ @bill_of_material_output_adapter || :fulfil
101
+ end
102
+
71
103
  def product_adapter
72
104
  @product_adapter || :fulfil
73
105
  end
74
106
 
107
+ def production_order_adapter
108
+ @production_order_adapter || :fulfil
109
+ end
110
+
75
111
  def purchase_order_adapter
76
112
  @purchase_order_adapter || :fulfil
77
113
  end
@@ -8,11 +8,11 @@ module ErpIntegration
8
8
  include Enumerable
9
9
  include QueryMethods
10
10
 
11
- cattr_accessor :resource_klass, instance_accessor: false
12
- delegate :client, :model_name, :resource_klass, to: 'self.class'
11
+ attr_accessor :resource_klass
12
+ delegate :client, :model_name, to: 'self.class'
13
13
 
14
14
  def initialize(resource_klass)
15
- self.class.resource_klass = resource_klass
15
+ @resource_klass = resource_klass
16
16
  end
17
17
 
18
18
  # The `where` and `includes` methods lazyly build a search/read query
@@ -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 BillOfMaterial < ApiResource
9
+ self.model_name = 'production.bom'
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 BillOfMaterialInput < ApiResource
9
+ self.model_name = 'production.bom.input'
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 BillOfMaterialOutput < ApiResource
9
+ self.model_name = 'production.bom.output'
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 ProductionOrder < ApiResource
9
+ self.model_name = 'production'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ErpIntegration
4
+ # The `ErpIntegration::ProductionOrder` exposes an uniformed API for interaction with
5
+ # third-party ERP vendors.
6
+ class ProductionOrder < Resource
7
+ attr_accessor :allow_partial_done, :attachments, :bom, :byproduct_cost, :company,
8
+ :company_currency_digits, :cost, :create_date, :create_uid, :effective_date,
9
+ :effective_start_date, :from_location, :inputs, :inventory_cost, :inventory_cost_cache,
10
+ :labor_cost, :labor_cost_cache, :last_modification, :location, :messages, :metadata, :number,
11
+ :on_hold, :origin, :outputs, :outsourced_work_cost, :outsourced_work_cost_cache, :picked_at,
12
+ :picker, :picking_status, :planned_date, :planned_start_date, :priority, :private_notes, :product,
13
+ :product_code, :production_batch, :public_notes, :purchase_lines, :quantity, :quantity_done,
14
+ :quantity_remaining, :rec_blurb, :description, :id, :subtitle, :thumbnail, :title, :rec_name,
15
+ :reference, :reporting_date, :routing, :sales_order_number, :sales_order_reference, :shipments,
16
+ :state, :supervisor, :to_location, :tsv, :unit_digits, :uom, :uom_category, :warehouse, :work_center,
17
+ :works, :write_date, :write_uid
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ErpIntegration
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.5'
5
5
  end
@@ -20,7 +20,11 @@ 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 :BillOfMaterial, 'erp_integration/bill_of_material'
24
+ autoload :BillOfMaterialInput, 'erp_integration/bill_of_material_input'
25
+ autoload :BillOfMaterialOutput, 'erp_integration/bill_of_material_output'
23
26
  autoload :Product, 'erp_integration/product'
27
+ autoload :ProductionOrder, 'erp_integration/production_order'
24
28
  autoload :PurchaseOrder, 'erp_integration/purchase_order'
25
29
  autoload :PurchaseOrderLine, 'erp_integration/purchase_order_line'
26
30
  autoload :PurchaseRequest, 'erp_integration/purchase_request'
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.5.1
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Vermaas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-21 00:00:00.000000000 Z
11
+ date: 2021-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -259,13 +259,20 @@ files:
259
259
  - bin/setup
260
260
  - erp_integration.gemspec
261
261
  - lib/erp_integration.rb
262
+ - lib/erp_integration/bill_of_material.rb
263
+ - lib/erp_integration/bill_of_material_input.rb
264
+ - lib/erp_integration/bill_of_material_output.rb
262
265
  - lib/erp_integration/configuration.rb
263
266
  - lib/erp_integration/errors.rb
264
267
  - lib/erp_integration/fulfil/api_resource.rb
265
268
  - lib/erp_integration/fulfil/client.rb
266
269
  - lib/erp_integration/fulfil/query.rb
267
270
  - lib/erp_integration/fulfil/query_methods.rb
271
+ - lib/erp_integration/fulfil/resources/bill_of_material.rb
272
+ - lib/erp_integration/fulfil/resources/bill_of_material_input.rb
273
+ - lib/erp_integration/fulfil/resources/bill_of_material_output.rb
268
274
  - lib/erp_integration/fulfil/resources/product.rb
275
+ - lib/erp_integration/fulfil/resources/production_order.rb
269
276
  - lib/erp_integration/fulfil/resources/purchase_order.rb
270
277
  - lib/erp_integration/fulfil/resources/purchase_order_line.rb
271
278
  - lib/erp_integration/fulfil/resources/purchase_request.rb
@@ -276,6 +283,7 @@ files:
276
283
  - lib/erp_integration/fulfil/where_clause.rb
277
284
  - lib/erp_integration/middleware/error_handling.rb
278
285
  - lib/erp_integration/product.rb
286
+ - lib/erp_integration/production_order.rb
279
287
  - lib/erp_integration/purchase_order.rb
280
288
  - lib/erp_integration/purchase_order_line.rb
281
289
  - lib/erp_integration/purchase_request.rb