workarea-emarsys 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -1
- data/README.md +5 -5
- data/Rakefile +1 -2
- data/app/lib/workarea/emarsys/gateway.rb +22 -41
- data/app/workers/workarea/emarsys/save_order.rb +0 -2
- data/app/workers/workarea/emarsys/save_user.rb +0 -3
- data/config/initializers/fields.rb +2 -8
- data/config/initializers/workarea.rb +0 -5
- data/config/locales/en.yml +1 -3
- data/lib/workarea/emarsys/version.rb +1 -1
- data/lib/workarea/emarsys.rb +8 -10
- data/test/lib/workarea/emarsys/gateway_test.rb +2 -2
- data/test/support/workarea/emarsys_api_config.rb +2 -1
- data/test/vcr_cassettes/emarsys/add_contact.yml +22 -26
- data/test/workers/workarea/emarsys/save_user_test.rb +0 -13
- data/workarea-emarsys.gemspec +0 -1
- metadata +3 -18
- data/test/vcr_cassettes/emarsys/get_contact.yml +0 -129
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbd86411c06a0d679c36fb94fd306cf4a59ae8e317942662c1876ac1ba55feff
|
4
|
+
data.tar.gz: 522f659b1fcc8f48fa121385f7fdceaeb22b3447a4a87549eed1da37a19ac5b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1db42cb6e397dae575fb79fb79abf911cad243121d0404ccc8f9faa62abb21ee1f97998806f6cfe22d264ec6fc371873d9260af20228e03b5302b38f3b7b152e
|
7
|
+
data.tar.gz: 1e1c2c2a035eb09d7ca79720501ab8b38108a2cf06818a5ba9e830e0308b5f945f7cf453a7a994d8ea90444fe197017730d410694a4b674d10c2379fed146e42
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
Workarea Emarsys 2.0.0 (2020-01-21)
|
2
|
+
--------------------------------------------------------------------------------
|
3
|
+
|
4
|
+
* Update Emarsys to use public API's
|
5
|
+
|
6
|
+
Commit removes escher request signing and uses the public APIs. Sets
|
7
|
+
the gateway to production by default because sandboxes are only issues by special
|
8
|
+
request.
|
9
|
+
Jeff Yucis
|
10
|
+
|
11
|
+
|
12
|
+
|
1
13
|
Workarea Emarsys 1.1.0 (2019-11-26)
|
2
14
|
--------------------------------------------------------------------------------
|
3
15
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -35,17 +35,17 @@ Configuration
|
|
35
35
|
--------------------------------------------------------------------------------
|
36
36
|
The following fields can be edited via the admin site settings:
|
37
37
|
|
38
|
-
1. **Production:** A toggle switch to set the integration into production mode, defaults to
|
39
|
-
2. **
|
40
|
-
3. **Merchant ID:** The merchant ID of the Emarsys account. This value is required for the Web Extend Analytics Integration
|
38
|
+
1. **Production:** A toggle switch to set the integration into production mode, defaults to true.
|
39
|
+
2. **Merchant ID:** The merchant ID of the Emarsys account. This value is required for the Web Extend Analytics Integration
|
41
40
|
|
42
41
|
|
43
|
-
The contact and sales data APIs require different access keys that require storage in the secrets file.
|
42
|
+
The contact and sales data APIs require different access keys that require storage in the secrets file. You can generate a user for the contact API in the Emarsys admin.
|
44
43
|
|
45
44
|
Add the following to your secrets:
|
46
45
|
|
47
46
|
emarsys:
|
48
|
-
|
47
|
+
user_name: YOUR_API_USER_NAME_HERE
|
48
|
+
secret_key: YOUR_API_SECRET_KEY_HERE
|
49
49
|
emarsys_sales:
|
50
50
|
api_token: YOUR_TOKEN_HERE
|
51
51
|
|
data/Rakefile
CHANGED
@@ -37,10 +37,9 @@ task :release do
|
|
37
37
|
Rake::Task['workarea:changelog'].execute
|
38
38
|
system 'git add CHANGELOG.md'
|
39
39
|
system 'git commit -m "Update CHANGELOG"'
|
40
|
-
system 'git push origin HEAD'
|
41
40
|
|
42
41
|
system "git tag -a v#{Workarea::Emarsys::VERSION} -m 'Tagging #{Workarea::Emarsys::VERSION}'"
|
43
|
-
system 'git push --tags'
|
42
|
+
system 'git push origin HEAD --follow-tags'
|
44
43
|
|
45
44
|
system "gem build workarea-emarsys.gemspec"
|
46
45
|
system "gem push workarea-emarsys-#{Workarea::Emarsys::VERSION}.gem"
|
@@ -1,33 +1,26 @@
|
|
1
1
|
module Workarea
|
2
2
|
module Emarsys
|
3
3
|
class Gateway
|
4
|
-
attr_reader :secret_key, :
|
4
|
+
attr_reader :secret_key, :user_name, :options
|
5
5
|
|
6
|
-
def initialize(secret_key,
|
6
|
+
def initialize(secret_key, user_name, options = {})
|
7
7
|
@secret_key = secret_key
|
8
|
-
@
|
8
|
+
@user_name = user_name
|
9
9
|
@options = options
|
10
10
|
end
|
11
11
|
|
12
12
|
def create_contact(attrs)
|
13
|
-
base_uri = "/api/v2/
|
13
|
+
base_uri = "/api/v2/contact/"
|
14
14
|
params = { create_if_not_exists: 1 }
|
15
15
|
query_values = "?" + params.to_query
|
16
16
|
|
17
17
|
path = base_uri + query_values
|
18
18
|
|
19
|
-
request_data = sign_request('put', path, attrs.to_json)
|
20
|
-
|
21
19
|
response = connection.put do |req|
|
22
20
|
req.url path
|
23
21
|
req.params = params
|
24
22
|
req.body = attrs.to_json
|
25
|
-
|
26
|
-
request_data[:headers].each do |k, v|
|
27
|
-
req.headers[k] = v
|
28
|
-
end
|
29
23
|
end
|
30
|
-
|
31
24
|
Response.new(response)
|
32
25
|
end
|
33
26
|
|
@@ -39,36 +32,28 @@ module Workarea
|
|
39
32
|
open_timeout: Workarea::Emarsys.config.open_timeout
|
40
33
|
}
|
41
34
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
escher = Escher::Auth.new('eu/suite/ems_request', escher_options)
|
47
|
-
|
48
|
-
request_data = {
|
49
|
-
method: method.upcase,
|
50
|
-
uri: path,
|
51
|
-
body: body,
|
52
|
-
headers: [['Content-Type', 'application/json'], ['host', host]]
|
35
|
+
headers = {
|
36
|
+
"Content-Type" => "application/json",
|
37
|
+
"Accept" => "application/json",
|
38
|
+
"X-WSSE" => auth_header
|
53
39
|
}
|
54
40
|
|
55
|
-
|
56
|
-
|
57
|
-
request_data
|
41
|
+
Faraday.new(url: rest_endpoint, request: request_timeouts, headers: headers)
|
58
42
|
end
|
59
43
|
|
60
|
-
def
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
date_header_name: 'X-Ems-Date',
|
66
|
-
current_time: Time.current
|
67
|
-
}
|
68
|
-
end
|
44
|
+
def auth_header
|
45
|
+
nonce = SecureRandom.base64(32).first(32)
|
46
|
+
timestamp = Time.now.utc.iso8601
|
47
|
+
|
48
|
+
password_digest = Base64.encode64(Digest::SHA1.new.hexdigest(nonce + timestamp + secret_key)).strip
|
69
49
|
|
70
|
-
|
71
|
-
|
50
|
+
header = 'UsernameToken ' +
|
51
|
+
"Username=\"#{user_name}\", " +
|
52
|
+
"PasswordDigest=\"#{password_digest}\", " +
|
53
|
+
"Nonce=\"#{nonce}\", " +
|
54
|
+
"Created=\"#{timestamp}\""
|
55
|
+
|
56
|
+
header
|
72
57
|
end
|
73
58
|
|
74
59
|
def rest_endpoint
|
@@ -83,12 +68,8 @@ module Workarea
|
|
83
68
|
end
|
84
69
|
end
|
85
70
|
|
86
|
-
def uri_base
|
87
|
-
"/api/v2/internal/#{customer_id}/"
|
88
|
-
end
|
89
|
-
|
90
71
|
def test?
|
91
|
-
(options.has_key?(:test) ? options[:test] :
|
72
|
+
(options.has_key?(:test) ? options[:test] : false)
|
92
73
|
end
|
93
74
|
end
|
94
75
|
end
|
@@ -10,14 +10,11 @@ module Workarea
|
|
10
10
|
)
|
11
11
|
|
12
12
|
def perform(id)
|
13
|
-
return unless Emarsys.customer_id.present?
|
14
|
-
|
15
13
|
user = Workarea::User.find(id)
|
16
14
|
|
17
15
|
attrs = Emarsys::Contact.new(user, { address: address(user), contact_from: 'user' }).to_h
|
18
16
|
|
19
17
|
response = gateway.create_contact(attrs)
|
20
|
-
|
21
18
|
user.set(emarsys_exported_at: Time.current)
|
22
19
|
external_id = response.body["data"]["id"] || response.body["data"]["ids"].first
|
23
20
|
user.set(emarsys_external_id: external_id)
|
@@ -1,11 +1,5 @@
|
|
1
1
|
Workarea::Configuration.define_fields do
|
2
2
|
fieldset 'Emarsys', namespaced: false do
|
3
|
-
field 'Customer ID',
|
4
|
-
type: :string,
|
5
|
-
default: '',
|
6
|
-
description: 'Emarsys customer ID. Required for using API endpoints. Contact your Emarays Support team to get this value.',
|
7
|
-
allow_blank: true
|
8
|
-
|
9
3
|
field 'Merchant ID',
|
10
4
|
type: :string,
|
11
5
|
default: '',
|
@@ -13,9 +7,9 @@ Workarea::Configuration.define_fields do
|
|
13
7
|
allow_blank: true
|
14
8
|
|
15
9
|
field 'Emarsys Production API',
|
16
|
-
id: :
|
10
|
+
id: :emarsys_production_api,
|
17
11
|
type: :boolean,
|
18
|
-
default:
|
12
|
+
default: true,
|
19
13
|
description: 'Whether to use the production API endpoints.'
|
20
14
|
end
|
21
15
|
end
|
@@ -1,10 +1,5 @@
|
|
1
1
|
Workarea.configure do |config|
|
2
2
|
config.emarsys ||= ActiveSupport::Configurable::Configuration.new
|
3
|
-
|
4
|
-
config.emarsys.escher_key = 'suite_workarea_v1'
|
5
|
-
config.emarsys.scope = 'eu/workarea/ems_request'
|
6
|
-
config.emarsys.partner_scope = 'eu/suite/ems_request'
|
7
|
-
|
8
3
|
config.emarsys.export_interval = 1.day
|
9
4
|
|
10
5
|
config.emarsys.api_timeout = 3
|
data/config/locales/en.yml
CHANGED
@@ -13,7 +13,6 @@ en:
|
|
13
13
|
title: Emarsys Configuration
|
14
14
|
button: Save Emarsys Configuration
|
15
15
|
production: Use Production API?
|
16
|
-
customer_id: Customer ID
|
17
16
|
merchant_id: Merchant ID
|
18
17
|
api_key: API Key
|
19
18
|
sales_api_key: Sales Data API Key
|
@@ -22,7 +21,6 @@ en:
|
|
22
21
|
help:
|
23
22
|
api_key: API Key for customer synchronization. Can be found in the Emarsys adminstration system.
|
24
23
|
sales_api_key: API Key for order file synchronization. Can be found in the Emarsys adminstration system.
|
25
|
-
production: Use the Live/Production API endpoints.
|
26
|
-
customer_id: Emarsys customer ID. Required for using API endpoints. Contact your Emarays Support team to get this value.
|
24
|
+
production: Use the Live/Production API endpoints.
|
27
25
|
merchant_id: Emarsys merchant ID. This value is required for the Web Extend data integration.
|
28
26
|
|
data/lib/workarea/emarsys.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
require 'workarea'
|
2
2
|
require 'workarea/storefront'
|
3
3
|
require 'workarea/admin'
|
4
|
-
require 'workarea/google_product_feed'
|
5
4
|
|
6
5
|
require 'workarea/emarsys/engine'
|
7
6
|
require 'workarea/emarsys/version'
|
8
|
-
|
9
|
-
require 'escher'
|
7
|
+
require 'workarea/google_product_feed'
|
10
8
|
|
11
9
|
module Workarea
|
12
10
|
module Emarsys
|
@@ -22,18 +20,18 @@ module Workarea
|
|
22
20
|
credentials[:secret_key]
|
23
21
|
end
|
24
22
|
|
25
|
-
def self.
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
def self.customer_id
|
30
|
-
Workarea.config.customer_id
|
23
|
+
def self.user_name
|
24
|
+
credentials[:user_name]
|
31
25
|
end
|
32
26
|
|
33
27
|
def self.merchant_id
|
34
28
|
Workarea.config.merchant_id
|
35
29
|
end
|
36
30
|
|
31
|
+
def self.api_token
|
32
|
+
sales_data_credentials[:api_token]
|
33
|
+
end
|
34
|
+
|
37
35
|
def self.config
|
38
36
|
Workarea.config.emarsys
|
39
37
|
end
|
@@ -44,7 +42,7 @@ module Workarea
|
|
44
42
|
# @return [Emarsys::Gateway]
|
45
43
|
def self.gateway
|
46
44
|
if credentials.present?
|
47
|
-
Emarsys::Gateway.new(secret_key,
|
45
|
+
Emarsys::Gateway.new(secret_key, user_name, { test: !Workarea.config.emarsys_production_api })
|
48
46
|
else
|
49
47
|
Emarsys::BogusGateway.new
|
50
48
|
end
|
@@ -9,13 +9,13 @@ module Workarea
|
|
9
9
|
customer_id = '215861890'
|
10
10
|
Workarea::Emarsys::Gateway.new(
|
11
11
|
Rails.application.secrets.emarsys[:secret_key],
|
12
|
-
|
12
|
+
Rails.application.secrets.emarsys[:user_name]
|
13
13
|
)
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_create_contact
|
17
17
|
VCR.use_cassette("emarsys/add_contact", match_requests_on: [:method, :uri]) do
|
18
|
-
attrs = { contacts: [ "3" => "jyucis-emarsys@workarea.com" ] }
|
18
|
+
attrs = { contacts: [ "3" => "jyucis-emarsys-test@workarea.com" ] }
|
19
19
|
response = gateway.create_contact(attrs)
|
20
20
|
|
21
21
|
assert(response.success?)
|
@@ -2,24 +2,22 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: put
|
5
|
-
uri: https://api
|
5
|
+
uri: https://api.emarsys.net/api/v2/contact/?create_if_not_exists=1
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"contacts":[{"3":"jyucis-emarsys@workarea.com"}]}'
|
8
|
+
string: '{"contacts":[{"3":"jyucis-emarsys-test@workarea.com"}]}'
|
9
9
|
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.15.4
|
12
10
|
Content-Type:
|
13
11
|
- application/json
|
14
|
-
|
15
|
-
-
|
16
|
-
X-
|
17
|
-
-
|
18
|
-
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
X-Wsse:
|
15
|
+
- UsernameToken Username="un", PasswordDigest="PW",
|
16
|
+
Nonce="d36e316282959a9ed4c89851497a717f", Created="2020-01-15T16:41:44Z"
|
17
|
+
User-Agent:
|
18
|
+
- Faraday v0.15.4
|
19
19
|
Accept-Encoding:
|
20
20
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
21
|
-
Accept:
|
22
|
-
- "*/*"
|
23
21
|
response:
|
24
22
|
status:
|
25
23
|
code: 200
|
@@ -30,38 +28,36 @@ http_interactions:
|
|
30
28
|
Content-Length:
|
31
29
|
- '74'
|
32
30
|
Content-Type:
|
33
|
-
-
|
31
|
+
- text/html; charset=utf-8
|
34
32
|
Date:
|
35
|
-
- Wed,
|
33
|
+
- Wed, 15 Jan 2020 16:41:44 GMT
|
36
34
|
Pragma:
|
37
35
|
- no-cache
|
38
36
|
Server:
|
39
|
-
-
|
37
|
+
- Apache
|
40
38
|
Strict-Transport-Security:
|
41
|
-
- max-age=
|
39
|
+
- max-age=15552000; includeSubDomains; preload
|
42
40
|
Vary:
|
43
41
|
- Accept-Encoding
|
44
42
|
Via:
|
45
43
|
- kong/0.14.1
|
46
44
|
X-Emarsys-Request-Id:
|
47
|
-
-
|
48
|
-
X-Fe:
|
49
|
-
- suitesapipxy01.emarsys.at
|
45
|
+
- 337be0c0-317b-4e6a-a934-0593170e4d31#1295874
|
50
46
|
X-Kong-Proxy-Latency:
|
51
|
-
- '
|
47
|
+
- '2'
|
52
48
|
X-Kong-Upstream-Latency:
|
53
|
-
- '
|
49
|
+
- '110'
|
54
50
|
X-Ratelimit-Limit:
|
55
|
-
- '
|
51
|
+
- '1000'
|
56
52
|
X-Ratelimit-Remaining:
|
57
|
-
- '
|
53
|
+
- '999'
|
58
54
|
X-Ratelimit-Reset:
|
59
|
-
- '
|
55
|
+
- '1579106564'
|
60
56
|
X-Suite-Response-Time:
|
61
|
-
- '
|
57
|
+
- '69'
|
62
58
|
body:
|
63
59
|
encoding: ASCII-8BIT
|
64
|
-
string: '{"replyCode":0,"replyText":"OK","data":{"ids":[
|
60
|
+
string: '{"replyCode":0,"replyText":"OK","data":{"ids":[106504559]}}'
|
65
61
|
http_version:
|
66
|
-
recorded_at: Wed,
|
62
|
+
recorded_at: Wed, 15 Jan 2020 16:41:44 GMT
|
67
63
|
recorded_with: VCR 2.9.3
|
@@ -3,7 +3,6 @@ require 'test_helper'
|
|
3
3
|
module Workarea
|
4
4
|
class Emarsys::SaveUserTest < TestCase
|
5
5
|
def test_save_user_sets_time_stamp
|
6
|
-
Workarea.config.customer_id = '1234'
|
7
6
|
user = create_user
|
8
7
|
|
9
8
|
Workarea::Emarsys::SaveUser.new.perform(user.id)
|
@@ -13,17 +12,5 @@ module Workarea
|
|
13
12
|
assert(user.emarsys_exported_at.present?)
|
14
13
|
assert(user.emarsys_external_id.present?)
|
15
14
|
end
|
16
|
-
|
17
|
-
def test_save_user_does_nothing_without_customer_id_set
|
18
|
-
Workarea.config.customer_id = nil
|
19
|
-
user = create_user
|
20
|
-
|
21
|
-
Workarea::Emarsys::SaveUser.new.perform(user.id)
|
22
|
-
|
23
|
-
user.reload
|
24
|
-
|
25
|
-
refute(user.emarsys_exported_at.present?)
|
26
|
-
refute(user.emarsys_external_id.present?)
|
27
|
-
end
|
28
15
|
end
|
29
16
|
end
|
data/workarea-emarsys.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-emarsys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Yucis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workarea
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.x
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: escher
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: faraday
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,7 +164,6 @@ files:
|
|
178
164
|
- test/teaspoon_env.rb
|
179
165
|
- test/test_helper.rb
|
180
166
|
- test/vcr_cassettes/emarsys/add_contact.yml
|
181
|
-
- test/vcr_cassettes/emarsys/get_contact.yml
|
182
167
|
- test/vcr_cassettes/emarsys/sales/send_data.yml
|
183
168
|
- test/workers/workarea/emarsys/save_user_test.rb
|
184
169
|
- test/workers/workarea/emarsys/sync_orders_test.rb
|
@@ -202,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
187
|
- !ruby/object:Gem::Version
|
203
188
|
version: '0'
|
204
189
|
requirements: []
|
205
|
-
rubygems_version: 3.
|
190
|
+
rubygems_version: 3.1.2
|
206
191
|
signing_key:
|
207
192
|
specification_version: 4
|
208
193
|
summary: Emarsys email service provider
|
@@ -1,129 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: put
|
5
|
-
uri: https://api-proxy.s.emarsys.com/api/v2/internal/215861890/contact/?create_if_not_exists=1
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '{"contacts":[{"3":"jyucis-emarsys-get@workarea.com"}]}'
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.15.4
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
X-Ems-Date:
|
15
|
-
- 20190313T195319Z
|
16
|
-
X-Ems-Auth:
|
17
|
-
- EMS-HMAC-SHA256 Credential=suite_workarea_v1/20190313/eu/suite/ems_request,
|
18
|
-
SignedHeaders=host;x-ems-date, Signature=b
|
19
|
-
Accept-Encoding:
|
20
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
21
|
-
Accept:
|
22
|
-
- "*/*"
|
23
|
-
response:
|
24
|
-
status:
|
25
|
-
code: 200
|
26
|
-
message: OK
|
27
|
-
headers:
|
28
|
-
Cache-Control:
|
29
|
-
- max-age=0, no-cache, no-store, must-revalidate
|
30
|
-
Content-Length:
|
31
|
-
- '76'
|
32
|
-
Content-Type:
|
33
|
-
- application/json
|
34
|
-
Date:
|
35
|
-
- Wed, 13 Mar 2019 19:53:20 GMT
|
36
|
-
Pragma:
|
37
|
-
- no-cache
|
38
|
-
Server:
|
39
|
-
- openresty/1.11.2.1
|
40
|
-
Strict-Transport-Security:
|
41
|
-
- max-age=86400; includeSubDomains; preload
|
42
|
-
Vary:
|
43
|
-
- Accept-Encoding
|
44
|
-
Via:
|
45
|
-
- kong/0.14.1
|
46
|
-
X-Emarsys-Request-Id:
|
47
|
-
- 71e137ab-b703-4f06-8a33-acf9b8a1097a#4171
|
48
|
-
X-Fe:
|
49
|
-
- suitesapipxy01.emarsys.at
|
50
|
-
X-Kong-Proxy-Latency:
|
51
|
-
- '17'
|
52
|
-
X-Kong-Upstream-Latency:
|
53
|
-
- '697'
|
54
|
-
X-Ratelimit-Limit:
|
55
|
-
- '200'
|
56
|
-
X-Ratelimit-Remaining:
|
57
|
-
- '199'
|
58
|
-
X-Ratelimit-Reset:
|
59
|
-
- '1552506840'
|
60
|
-
X-Suite-Response-Time:
|
61
|
-
- '655'
|
62
|
-
body:
|
63
|
-
encoding: ASCII-8BIT
|
64
|
-
string: '{"replyCode":0,"replyText":"OK","data":{"ids":["504947875"]}}'
|
65
|
-
http_version:
|
66
|
-
recorded_at: Wed, 13 Mar 2019 19:53:20 GMT
|
67
|
-
- request:
|
68
|
-
method: post
|
69
|
-
uri: https://api-proxy.s.emarsys.com/api/v2/internal/215861890/contact/getdata
|
70
|
-
body:
|
71
|
-
encoding: UTF-8
|
72
|
-
string: '{"keyID":"3","keyValues":["jyucis-emarsys-get@workarea.com"],"fields":null}'
|
73
|
-
headers:
|
74
|
-
User-Agent:
|
75
|
-
- Faraday v0.15.4
|
76
|
-
Content-Type:
|
77
|
-
- application/json
|
78
|
-
X-Ems-Date:
|
79
|
-
- 20190313T195320Z
|
80
|
-
X-Ems-Auth:
|
81
|
-
- EMS-HMAC-SHA256 Credential=suite_workarea_v1/20190313/eu/suite/ems_request,
|
82
|
-
SignedHeaders=host;x-ems-date, Signature=ed8e9505a29c80fbf411f09c9903943a9b2e8af0e5de9221daaccfd588b67a7a
|
83
|
-
Accept-Encoding:
|
84
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
85
|
-
Accept:
|
86
|
-
- "*/*"
|
87
|
-
response:
|
88
|
-
status:
|
89
|
-
code: 400
|
90
|
-
message: Bad Request
|
91
|
-
headers:
|
92
|
-
Cache-Control:
|
93
|
-
- max-age=0, no-cache, no-store, must-revalidate
|
94
|
-
Content-Length:
|
95
|
-
- '79'
|
96
|
-
Content-Type:
|
97
|
-
- application/json
|
98
|
-
Date:
|
99
|
-
- Wed, 13 Mar 2019 19:53:21 GMT
|
100
|
-
Pragma:
|
101
|
-
- no-cache
|
102
|
-
Server:
|
103
|
-
- openresty/1.11.2.1
|
104
|
-
Strict-Transport-Security:
|
105
|
-
- max-age=86400; includeSubDomains; preload
|
106
|
-
Vary:
|
107
|
-
- Accept-Encoding
|
108
|
-
Via:
|
109
|
-
- kong/0.14.1
|
110
|
-
X-Emarsys-Request-Id:
|
111
|
-
- 71e137ab-b703-4f06-8a33-acf9b8a1097a#4172
|
112
|
-
X-Kong-Proxy-Latency:
|
113
|
-
- '26'
|
114
|
-
X-Kong-Upstream-Latency:
|
115
|
-
- '62'
|
116
|
-
X-Ratelimit-Limit:
|
117
|
-
- '200'
|
118
|
-
X-Ratelimit-Remaining:
|
119
|
-
- '198'
|
120
|
-
X-Ratelimit-Reset:
|
121
|
-
- '1552506840'
|
122
|
-
X-Suite-Response-Time:
|
123
|
-
- '21'
|
124
|
-
body:
|
125
|
-
encoding: ASCII-8BIT
|
126
|
-
string: '{"replyCode":2004,"replyText":"Invalid key field id: ","data":""}'
|
127
|
-
http_version:
|
128
|
-
recorded_at: Wed, 13 Mar 2019 19:53:21 GMT
|
129
|
-
recorded_with: VCR 2.9.3
|