erp_integration 0.10.0 → 0.11.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10feefb3de410db28d960dcab694fd3ac8cbc08e9d2ea06627e8cd5f514b2a57
|
4
|
+
data.tar.gz: a7d6540c305bf8519789aa11073dc38141cdb60226a1296a99c5ea2e2d412838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e64d55ee5b4ab827fb78ebd864ea278bfaaa50506de7e73737cfd88cc9e9f83485b34c7c96d840f3b3a5e26b3a8df730d69f8822d1c513f31b7f4d11bf8dd2e4
|
7
|
+
data.tar.gz: dacaceb6e96523354e470e70056f574933cd8dd4e9bf30757a5ab9742545d7b460c73b3b32ff9e41a6284a99c25cb62d4eed9f312b7e4c443242f0d18d3dc894
|
data/README.md
CHANGED
@@ -92,6 +92,10 @@ module ErpIntegration
|
|
92
92
|
# @return [Symbol] The configured adapter for the stock move.
|
93
93
|
attr_writer :stock_move_adapter
|
94
94
|
|
95
|
+
# Logger that will be used for HTTP operations on Client
|
96
|
+
# @return [Logger] The configured logger
|
97
|
+
attr_accessor :logger
|
98
|
+
|
95
99
|
def initialize(**options)
|
96
100
|
options.each_pair do |key, value|
|
97
101
|
public_send("#{key}=", value) if respond_to?("#{key}=")
|
@@ -6,9 +6,10 @@ module ErpIntegration
|
|
6
6
|
attr_reader :api_key, :merchant_id
|
7
7
|
attr_writer :connection, :faraday_adapter
|
8
8
|
|
9
|
-
def initialize(api_key:, merchant_id:)
|
9
|
+
def initialize(api_key:, merchant_id:, logger: nil)
|
10
10
|
@api_key = api_key
|
11
11
|
@merchant_id = merchant_id
|
12
|
+
@logger = logger
|
12
13
|
end
|
13
14
|
|
14
15
|
# Generates the url prefix for the Faraday connection client.
|
@@ -35,6 +36,11 @@ module ErpIntegration
|
|
35
36
|
faraday.response :follow_redirects
|
36
37
|
faraday.response :json # Decode response bodies as JSON
|
37
38
|
|
39
|
+
# Notice that logging headers will expose sensitive information
|
40
|
+
# like api-key. To avoid use filters:
|
41
|
+
# https://lostisland.github.io/faraday/middleware/logger
|
42
|
+
faraday.response :logger, @logger, { headers: false, bodies: true }
|
43
|
+
|
38
44
|
# Custom error handling for the error response
|
39
45
|
faraday.use ErpIntegration::Middleware::ErrorHandling
|
40
46
|
|
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.11.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: 2022-
|
11
|
+
date: 2022-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -325,7 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
325
325
|
- !ruby/object:Gem::Version
|
326
326
|
version: '0'
|
327
327
|
requirements: []
|
328
|
-
rubygems_version: 3.
|
328
|
+
rubygems_version: 3.1.4
|
329
329
|
signing_key:
|
330
330
|
specification_version: 4
|
331
331
|
summary: Connects Mejuri with third-party ERP vendors
|