erp_integration 0.3.1 → 0.3.2
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/fulfil/resources/order_line.rb +13 -0
- data/lib/erp_integration/fulfil/resources/purchase_request.rb +13 -0
- data/lib/erp_integration/order.rb +11 -1
- data/lib/erp_integration/order_line.rb +16 -0
- data/lib/erp_integration/purchase_request.rb +12 -0
- data/lib/erp_integration/version.rb +1 -1
- data/lib/erp_integration.rb +2 -0
- 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: b64aeb4d27d23459820866bdac9a989d461f745abfb3790a0bd7b4a2a384c637
|
4
|
+
data.tar.gz: 4affdf46ec9cdffd57027f0e97d8e226bcc9d82c8b382b80c7bdf26e0fbc5a69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c76fa52a52650b0d3510ecb758545fd17cd9b7ccfc7b2371172498f2c9c93a9112078391d540416183474cccb2d62adee45513ced1f60bca130c91f01373730f
|
7
|
+
data.tar.gz: aacd6f248f1045e8cc68bffb07152d877cc0a2bf203ad08d2cc99e1e021a91510638cfd0e0a0ad47f9bf2aa40dfc59da0bc6dfe80b784745d38b6e4c414780c5
|
@@ -27,6 +27,11 @@ module ErpIntegration
|
|
27
27
|
# @return [Symbol] The configured adapter for the orders
|
28
28
|
attr_writer :order_adapter
|
29
29
|
|
30
|
+
# Allows configuring an adapter for the `OrderLine` resource. When none is
|
31
|
+
# configured, it will default to Fulfil.
|
32
|
+
# @return [Symbol] The configured adapter for the order lines.
|
33
|
+
attr_writer :order_line_adapter
|
34
|
+
|
30
35
|
# Allows configuring an adapter for the `PurchaseOrder` resource. When none is
|
31
36
|
# configured, it will default to Fulfil.
|
32
37
|
# @return [Symbol] The configured adapter for the purchase orders.
|
@@ -37,6 +42,11 @@ module ErpIntegration
|
|
37
42
|
# @return [Symbol] The configured adapter for the purchase order lines.
|
38
43
|
attr_writer :purchase_order_line_adapter
|
39
44
|
|
45
|
+
# Allows configuring an adapter for the `PurchaseRequest` resource. When
|
46
|
+
# none is configured, it will default to Fulfil.
|
47
|
+
# @return [Symbol] The configured adapter for the purchase request.
|
48
|
+
attr_writer :purchase_request_adapter
|
49
|
+
|
40
50
|
def initialize(**options)
|
41
51
|
options.each_pair do |key, value|
|
42
52
|
public_send("#{key}=", value) if respond_to?("#{key}=")
|
@@ -47,6 +57,10 @@ module ErpIntegration
|
|
47
57
|
@order_adapter || :fulfil
|
48
58
|
end
|
49
59
|
|
60
|
+
def order_line_adapter
|
61
|
+
@order_line_adapter || :fulfil
|
62
|
+
end
|
63
|
+
|
50
64
|
def purchase_order_adapter
|
51
65
|
@purchase_order_adapter || :fulfil
|
52
66
|
end
|
@@ -54,6 +68,10 @@ module ErpIntegration
|
|
54
68
|
def purchase_order_line_adapter
|
55
69
|
@purchase_order_line_adapter || :fulfil
|
56
70
|
end
|
71
|
+
|
72
|
+
def purchase_request_adapter
|
73
|
+
@purchase_request_adapter || :fulfil
|
74
|
+
end
|
57
75
|
end
|
58
76
|
|
59
77
|
# Returns ERP Integration's configuration.
|
@@ -4,6 +4,16 @@ module ErpIntegration
|
|
4
4
|
# The `ErpIntegration::Order` exposes an uniformed API for interaction with
|
5
5
|
# third-party ERP vendors.
|
6
6
|
class Order < Resource
|
7
|
-
attr_accessor :id, :number
|
7
|
+
attr_accessor :id, :channel, :number, :party, :sale_date, :shipment_address,
|
8
|
+
:amount_invoiced, :attachments, :carrier, :carrier_service,
|
9
|
+
:channel_identifier, :comment, :company, :confirmation_time,
|
10
|
+
:create_date, :currency, :description, :gateway_transaction,
|
11
|
+
:invoice_address, :invoice_method, :invoice_state, :invoices,
|
12
|
+
:lines, :metadata, :payment_term, :payment_total, :price_list,
|
13
|
+
:reference, :sales_person, :shipment_amount, :shipment_method,
|
14
|
+
:shipment_state, :shipments, :shipping_start_date, :state,
|
15
|
+
:tax_amount, :total_amount, :total_quantity, :total_shipment_cost,
|
16
|
+
:untaxed_amount, :warehouse, :weight, :weight_uom, :write_date,
|
17
|
+
:write_uid
|
8
18
|
end
|
9
19
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ErpIntegration
|
4
|
+
# The `ErpIntegration::OrderLine` exposes an uniformed API for interaction with
|
5
|
+
# third-party ERP vendors.
|
6
|
+
class OrderLine < Resource
|
7
|
+
attr_accessor :id, :product, :quantity, :unit, :unit_price, :amount, :attachments,
|
8
|
+
:channel_identifier, :create_date, :create_uid, :delivery_address,
|
9
|
+
:delivery_date, :delivery_mode, :description, :discount, :gift_message,
|
10
|
+
:gross_profit_cpny_cc, :is_gift_card, :list_price, :listing_sku,
|
11
|
+
:metadata, :note, :options, :purhcase_request, :quantity_canceled,
|
12
|
+
:quantity_reserved, :quantity_shipped, :return_reason, :sale,
|
13
|
+
:sequence, :shipping_date, :taxes, :type, :warehouse, :write_date,
|
14
|
+
:write_uid
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ErpIntegration
|
4
|
+
# The `ErpIntegration::PurchaseRequest` exposes an uniformed API for interaction with
|
5
|
+
# third-party ERP vendors.
|
6
|
+
class PurchaseRequest < Resource
|
7
|
+
attr_accessor :id, :party, :product, :quantity, :attachments, :company,
|
8
|
+
:create_date, :create_uid, :customer, :delivery_address,
|
9
|
+
:metadata, :purchase, :purchase_date, :purchase_line, :state,
|
10
|
+
:uom, :warehouse, :write_date, :write_uid
|
11
|
+
end
|
12
|
+
end
|
data/lib/erp_integration.rb
CHANGED
@@ -22,6 +22,8 @@ module ErpIntegration
|
|
22
22
|
# Resources
|
23
23
|
autoload :Resource, 'erp_integration/resource'
|
24
24
|
autoload :Order, 'erp_integration/order'
|
25
|
+
autoload :OrderLine, 'erp_integration/order_line'
|
25
26
|
autoload :PurchaseOrder, 'erp_integration/purchase_order'
|
26
27
|
autoload :PurchaseOrderLine, 'erp_integration/purchase_order_line'
|
28
|
+
autoload :PurchaseRequest, 'erp_integration/purchase_request'
|
27
29
|
end
|
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.3.
|
4
|
+
version: 0.3.2
|
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-
|
11
|
+
date: 2021-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -260,13 +260,17 @@ files:
|
|
260
260
|
- lib/erp_integration/fulfil/query.rb
|
261
261
|
- lib/erp_integration/fulfil/query_methods.rb
|
262
262
|
- lib/erp_integration/fulfil/resources/order.rb
|
263
|
+
- lib/erp_integration/fulfil/resources/order_line.rb
|
263
264
|
- lib/erp_integration/fulfil/resources/purchase_order.rb
|
264
265
|
- lib/erp_integration/fulfil/resources/purchase_order_line.rb
|
266
|
+
- lib/erp_integration/fulfil/resources/purchase_request.rb
|
265
267
|
- lib/erp_integration/fulfil/where_clause.rb
|
266
268
|
- lib/erp_integration/middleware/error_handling.rb
|
267
269
|
- lib/erp_integration/order.rb
|
270
|
+
- lib/erp_integration/order_line.rb
|
268
271
|
- lib/erp_integration/purchase_order.rb
|
269
272
|
- lib/erp_integration/purchase_order_line.rb
|
273
|
+
- lib/erp_integration/purchase_request.rb
|
270
274
|
- lib/erp_integration/resource.rb
|
271
275
|
- lib/erp_integration/version.rb
|
272
276
|
homepage: https://www.github.com/mejuri-inc/erp-integration
|