erp_integration 1.0.1 → 1.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19d5fb57d7ca6ad94580985e3e975ef8555b6714eacd49d7f2bb66e41e9a7543
|
4
|
+
data.tar.gz: 22deb33aa1b45b3b335148833bdf94005eea41dda91fd1fc36bb1982c2718b8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2969f577bdcd23953294f8cdc8a241d155df50c5c80b07a306dec6c4475b0b8cf9174533c1400f66301431ed135a8278eea8b3852fec5fc8774efb6c5f5574c4
|
7
|
+
data.tar.gz: f54f021988ac6cbd26f17456be8cdb6ff82a9bbf5e89435e94c9cde319ada19da63b61ae08e081020653feeefa1fc9cabde894394d0f82f4bc47458021fe9f05
|
@@ -43,16 +43,16 @@ module ErpIntegration
|
|
43
43
|
# @return [Symbol] The configured adapter for the bill_of_material.
|
44
44
|
attr_writer :bill_of_material_output_adapter
|
45
45
|
|
46
|
-
# Allows configuring an adapter for the `Country` resource. When
|
47
|
-
# none is configured, it will default to Fulfil.
|
48
|
-
# @return [Symbol] The configured adapter for the country.
|
49
|
-
attr_writer :country_adapter
|
50
|
-
|
51
46
|
# Allows configuring an adapter for the `ChannelListing` resource. When
|
52
47
|
# none is configured, it will default to Fulfil.
|
53
48
|
# @return [Symbol] The configured adapter for the channel_listing.
|
54
49
|
attr_writer :channel_listing_adapter
|
55
50
|
|
51
|
+
# Allows configuring an adapter for the `Country` resource. When
|
52
|
+
# none is configured, it will default to Fulfil.
|
53
|
+
# @return [Symbol] The configured adapter for the country.
|
54
|
+
attr_writer :country_adapter
|
55
|
+
|
56
56
|
# Allows configuring an adapter for the `CustomerShipment` resource. When
|
57
57
|
# none is configured, it will default to Fulfil.
|
58
58
|
# @return [Symbol] The configured adapter for the customer shipment.
|
@@ -63,6 +63,11 @@ module ErpIntegration
|
|
63
63
|
# @return [Symbol] The configured adapter for the customer shipment.
|
64
64
|
attr_writer :customer_shipment_return_adapter
|
65
65
|
|
66
|
+
# Allows configuring an adapter for the `GiftCard` resource. When
|
67
|
+
# none is configured, it will default to Fulfil.
|
68
|
+
# @return [Symbol] The configured adapter for the gift card.
|
69
|
+
attr_writer :gift_card_adapter
|
70
|
+
|
66
71
|
# Allows configuring an adapter for the `InternalShipment` resource.
|
67
72
|
# When none is configured, it will default to Fulfil.
|
68
73
|
# @return [Symbol] The configured adapter for the internal shipment.
|
@@ -73,6 +78,11 @@ module ErpIntegration
|
|
73
78
|
# @return [Symbol] The configured adapter for the location.
|
74
79
|
attr_writer :location_adapter
|
75
80
|
|
81
|
+
# Allows configuring an adapter for the `PartyAddress` resource. When
|
82
|
+
# none is configured, it will default to Fulfil.
|
83
|
+
# @return [Symbol] The configured adapter for the party address.
|
84
|
+
attr_writer :party_address_adapter
|
85
|
+
|
76
86
|
# Allows configuring an adapter for the `Product` resource. When none is
|
77
87
|
# configured, it will default to Fulfil.
|
78
88
|
# @return [Symbol] The configured adapter for the products.
|
@@ -83,6 +93,11 @@ module ErpIntegration
|
|
83
93
|
# @return [Symbol] The configured adapter for the product category.
|
84
94
|
attr_writer :product_category_adapter
|
85
95
|
|
96
|
+
# Allows configuring an adapter for the `ProductOption` resource. When
|
97
|
+
# none is configured, it will default to Fulfil.
|
98
|
+
# @return [Symbol] The configured adapter for the product option.
|
99
|
+
attr_writer :product_option_adapter
|
100
|
+
|
86
101
|
# Allows configuring an adapter for the `ProductTemplate` resource. When none is
|
87
102
|
# configured, it will default to Fulfil.
|
88
103
|
# @return [Symbol] The configured adapter for the product templates.
|
@@ -105,7 +120,7 @@ module ErpIntegration
|
|
105
120
|
|
106
121
|
# Allows configuring an adapter for the `PurchaseProductSupplier` resource. When
|
107
122
|
# none is configured, it will default to Fulfil.
|
108
|
-
# @return [Symbol] The configured adapter for the purchase
|
123
|
+
# @return [Symbol] The configured adapter for the purchase product supplier.
|
109
124
|
attr_writer :purchase_product_supplier_adapter
|
110
125
|
|
111
126
|
# Allows configuring an adapter for the `PurchaseRequest` resource. When
|
@@ -113,6 +128,11 @@ module ErpIntegration
|
|
113
128
|
# @return [Symbol] The configured adapter for the purchase request.
|
114
129
|
attr_writer :purchase_request_adapter
|
115
130
|
|
131
|
+
# Allows configuring an adapter for the `SaleLineOption` resource. When
|
132
|
+
# none is configured, it will default to Fulfil.
|
133
|
+
# @return [Symbol] The configured adapter for the sales line option.
|
134
|
+
attr_writer :sales_line_option_adapter
|
135
|
+
|
116
136
|
# Allows configuring an adapter for the `SalesOrder` resource. When none is
|
117
137
|
# configured, it will default to Fulfil.
|
118
138
|
# @return [Symbol] The configured adapter for the sales orders
|
@@ -120,19 +140,14 @@ module ErpIntegration
|
|
120
140
|
|
121
141
|
# Allows configuring an adapter for the `SalesOrderLine` resource. When none is
|
122
142
|
# configured, it will default to Fulfil.
|
123
|
-
# @return [Symbol] The configured adapter for the order lines.
|
143
|
+
# @return [Symbol] The configured adapter for the sales order lines.
|
124
144
|
attr_writer :sales_order_line_adapter
|
125
145
|
|
126
146
|
# Allows configuring an adapter for the `SalesReturnReason` resource. When none is
|
127
147
|
# configured, it will default to Fulfil.
|
128
|
-
# @return [Symbol] The configured adapter for the
|
148
|
+
# @return [Symbol] The configured adapter for the sales return reason.
|
129
149
|
attr_writer :sales_return_reason_adapter
|
130
150
|
|
131
|
-
# Allows configuring an adapter for the `SupplierShipment` resource. When
|
132
|
-
# none is configured, it will default to Fulfil.
|
133
|
-
# @return [Symbol] The configured adapter for the supplier shipment.
|
134
|
-
attr_writer :supplier_shipment_adapter
|
135
|
-
|
136
151
|
# Allows configuring an adapter for the `StockBinTransfer` resource. When
|
137
152
|
# none is configured, it will default to Fulfil.
|
138
153
|
# @return [Symbol] The configured adapter for the stock bin transfer.
|
@@ -143,6 +158,11 @@ module ErpIntegration
|
|
143
158
|
# @return [Symbol] The configured adapter for the stock move.
|
144
159
|
attr_writer :stock_move_adapter
|
145
160
|
|
161
|
+
# Allows configuring an adapter for the `SupplierShipment` resource. When
|
162
|
+
# none is configured, it will default to Fulfil.
|
163
|
+
# @return [Symbol] The configured adapter for the supplier shipment.
|
164
|
+
attr_writer :supplier_shipment_adapter
|
165
|
+
|
146
166
|
# Allows configuring an adapter for the `Task` resource. When
|
147
167
|
# none is configured, it will default to Fulfil.
|
148
168
|
# @return [Symbol] The configured adapter for the task.
|
@@ -153,26 +173,6 @@ module ErpIntegration
|
|
153
173
|
# @return [Symbol] The configured adapter for the tracking number.
|
154
174
|
attr_writer :tracking_number_adapter
|
155
175
|
|
156
|
-
# Allows configuring an adapter for the `GiftCard` resource. When
|
157
|
-
# none is configured, it will default to Fulfil.
|
158
|
-
# @return [Symbol] The configured adapter for the tracking number.
|
159
|
-
attr_writer :gift_card_adapter
|
160
|
-
|
161
|
-
# Allows configuring an adapter for the `SaleLineOption` resource. When
|
162
|
-
# none is configured, it will default to Fulfil.
|
163
|
-
# @return [Symbol] The configured adapter for the tracking number.
|
164
|
-
attr_writer :sales_line_option_adapter
|
165
|
-
|
166
|
-
# Allows configuring an adapter for the `PartyAddress` resource. When
|
167
|
-
# none is configured, it will default to Fulfil.
|
168
|
-
# @return [Symbol] The configured adapter for the tracking number.
|
169
|
-
attr_writer :party_address_adapter
|
170
|
-
|
171
|
-
# Allows configuring an adapter for the `ProductOption` resource. When
|
172
|
-
# none is configured, it will default to Fulfil.
|
173
|
-
# @return [Symbol] The configured adapter for the tracking number.
|
174
|
-
attr_writer :product_option_adapter
|
175
|
-
|
176
176
|
def initialize(**options)
|
177
177
|
options.each_pair do |key, value|
|
178
178
|
public_send("#{key}=", value) if respond_to?("#{key}=")
|
@@ -183,14 +183,6 @@ module ErpIntegration
|
|
183
183
|
@api_key_rotation_threshold = threshold || 0
|
184
184
|
end
|
185
185
|
|
186
|
-
def carrier_adapter
|
187
|
-
@carrier_adapter || :fulfil
|
188
|
-
end
|
189
|
-
|
190
|
-
def carrier_service_adapter
|
191
|
-
@carrier_service_adapter || :fulfil
|
192
|
-
end
|
193
|
-
|
194
186
|
def bill_of_material_adapter
|
195
187
|
@bill_of_material_adapter || :fulfil
|
196
188
|
end
|
@@ -207,14 +199,22 @@ module ErpIntegration
|
|
207
199
|
@box_type_adapter || :fulfil
|
208
200
|
end
|
209
201
|
|
210
|
-
def
|
211
|
-
@
|
202
|
+
def carrier_adapter
|
203
|
+
@carrier_adapter || :fulfil
|
204
|
+
end
|
205
|
+
|
206
|
+
def carrier_service_adapter
|
207
|
+
@carrier_service_adapter || :fulfil
|
212
208
|
end
|
213
209
|
|
214
210
|
def channel_listing_adapter
|
215
211
|
@channel_listing_adapter || :fulfil
|
216
212
|
end
|
217
213
|
|
214
|
+
def country_adapter
|
215
|
+
@country_adapter || :fulfil
|
216
|
+
end
|
217
|
+
|
218
218
|
def customer_shipment_adapter
|
219
219
|
@customer_shipment_adapter || :fulfil
|
220
220
|
end
|
@@ -223,14 +223,34 @@ module ErpIntegration
|
|
223
223
|
@customer_shipment_return_adapter || :fulfil
|
224
224
|
end
|
225
225
|
|
226
|
+
def gift_card_adapter
|
227
|
+
@gift_card_adapter || :fulfil
|
228
|
+
end
|
229
|
+
|
226
230
|
def internal_shipment_adapter
|
227
231
|
@internal_shipment_adapter || :fulfil
|
228
232
|
end
|
229
233
|
|
234
|
+
def inventory_by_location_report_adapter
|
235
|
+
@inventory_by_location_report_adapter || :fulfil
|
236
|
+
end
|
237
|
+
|
230
238
|
def location_adapter
|
231
239
|
@location_adapter || :fulfil
|
232
240
|
end
|
233
241
|
|
242
|
+
def logger
|
243
|
+
@logger || Logger.new(nil)
|
244
|
+
end
|
245
|
+
|
246
|
+
def logger=(logger)
|
247
|
+
@logger = Logger.new(logger)
|
248
|
+
end
|
249
|
+
|
250
|
+
def party_address_adapter
|
251
|
+
@party_address_adapter || :fulfil
|
252
|
+
end
|
253
|
+
|
234
254
|
def product_adapter
|
235
255
|
@product_adapter || :fulfil
|
236
256
|
end
|
@@ -239,6 +259,10 @@ module ErpIntegration
|
|
239
259
|
@product_category_adapter || :fulfil
|
240
260
|
end
|
241
261
|
|
262
|
+
def product_option_adapter
|
263
|
+
@product_option_adapter || :fulfil
|
264
|
+
end
|
265
|
+
|
242
266
|
def product_template_adapter
|
243
267
|
@product_template_adapter || :fulfil
|
244
268
|
end
|
@@ -263,20 +287,32 @@ module ErpIntegration
|
|
263
287
|
@purchase_request_adapter || :fulfil
|
264
288
|
end
|
265
289
|
|
266
|
-
|
267
|
-
|
290
|
+
# Rate limiters that will be used for HTTP operations on Client
|
291
|
+
# to manage the number of requests made to avoid rate limiting by the API provider.
|
292
|
+
def rate_limiters
|
293
|
+
@rate_limiters ||= []
|
294
|
+
end
|
295
|
+
|
296
|
+
# Sets the rate limiters that will be used
|
297
|
+
# @raise [MissingMethodError] if the rate limiter object doesn't respond to the required methods.
|
298
|
+
def rate_limiters=(rate_limiters)
|
299
|
+
@rate_limiters = (rate_limiters || []).each { |limiter| RateLimiter.validate!(limiter) }
|
300
|
+
end
|
301
|
+
|
302
|
+
def sales_line_option_adapter
|
303
|
+
@sales_line_option_adapter || :fulfil
|
268
304
|
end
|
269
305
|
|
270
306
|
def sales_order_adapter
|
271
307
|
@sales_order_adapter || :fulfil
|
272
308
|
end
|
273
309
|
|
274
|
-
def
|
275
|
-
@
|
310
|
+
def sales_order_line_adapter
|
311
|
+
@sales_order_line_adapter || :fulfil
|
276
312
|
end
|
277
313
|
|
278
|
-
def
|
279
|
-
@
|
314
|
+
def sales_return_reason_adapter
|
315
|
+
@sales_return_reason_adapter || :fulfil
|
280
316
|
end
|
281
317
|
|
282
318
|
def stock_bin_transfer_adapter
|
@@ -287,6 +323,10 @@ module ErpIntegration
|
|
287
323
|
@stock_move_adapter || :fulfil
|
288
324
|
end
|
289
325
|
|
326
|
+
def supplier_shipment_adapter
|
327
|
+
@supplier_shipment_adapter || :fulfil
|
328
|
+
end
|
329
|
+
|
290
330
|
def task_adapter
|
291
331
|
@task_adapter || :fulfil
|
292
332
|
end
|
@@ -298,42 +338,6 @@ module ErpIntegration
|
|
298
338
|
def webhook_adapter
|
299
339
|
@webhook_adapter || :fulfil
|
300
340
|
end
|
301
|
-
|
302
|
-
def gift_card_adapter
|
303
|
-
@gift_card_adapter || :fulfil
|
304
|
-
end
|
305
|
-
|
306
|
-
def sales_line_option_adapter
|
307
|
-
@sales_line_option_adapter || :fulfil
|
308
|
-
end
|
309
|
-
|
310
|
-
def party_address_adapter
|
311
|
-
@party_address_adapter || :fulfil
|
312
|
-
end
|
313
|
-
|
314
|
-
def product_option_adapter
|
315
|
-
@product_option_adapter || :fulfil
|
316
|
-
end
|
317
|
-
|
318
|
-
# Rate limiters that will be used for HTTP operations on Client
|
319
|
-
# to manage the number of requests made to avoid rate limiting by the API provider.
|
320
|
-
def rate_limiters
|
321
|
-
@rate_limiters ||= []
|
322
|
-
end
|
323
|
-
|
324
|
-
# Sets the rate limiters that will be used
|
325
|
-
# @raise [MissingMethodError] if the rate limiter object doesn't respond to the required methods.
|
326
|
-
def rate_limiters=(rate_limiters)
|
327
|
-
@rate_limiters = (rate_limiters || []).each { |limiter| RateLimiter.validate!(limiter) }
|
328
|
-
end
|
329
|
-
|
330
|
-
def logger
|
331
|
-
@logger || Logger.new(nil)
|
332
|
-
end
|
333
|
-
|
334
|
-
def logger=(logger)
|
335
|
-
@logger = Logger.new(logger)
|
336
|
-
end
|
337
341
|
end
|
338
342
|
|
339
343
|
# Returns ERP Integration's configuration.
|
@@ -7,6 +7,26 @@ module ErpIntegration
|
|
7
7
|
module Resources
|
8
8
|
class Location < ApiResource
|
9
9
|
self.model_name = 'stock.location'
|
10
|
+
|
11
|
+
# Retrieve the inventory by location report.
|
12
|
+
#
|
13
|
+
# @param options [Hash] The options for the inventory by location report.
|
14
|
+
# @see https://docs.fulfil.io/developers/rest-api/examples/inventory-by-location
|
15
|
+
# @example
|
16
|
+
# {
|
17
|
+
# category: 123,
|
18
|
+
# company: 1,
|
19
|
+
# warehouse: 456,
|
20
|
+
# product: 789,
|
21
|
+
# level: "product",
|
22
|
+
# variant: 000
|
23
|
+
# }
|
24
|
+
# report.execute(options)
|
25
|
+
#
|
26
|
+
# @return [Hash] The inventory by location report.
|
27
|
+
def inventory_by_location(options)
|
28
|
+
client.put('model/inventory.by_location.report/execute', [options])
|
29
|
+
end
|
10
30
|
end
|
11
31
|
end
|
12
32
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module ErpIntegration
|
4
|
-
# The `ErpIntegration
|
4
|
+
# The `ErpIntegration:::Location` exposes an uniformed API for interaction with
|
5
5
|
# third-party ERP vendors.
|
6
6
|
class Location < Resource
|
7
7
|
attr_accessor :id, :name, :parent, :type
|
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: 1.0
|
4
|
+
version: 1.1.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: 2025-
|
11
|
+
date: 2025-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|