experian_ms 0.1.5 → 0.1.6
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 +4 -4
- data/README.md +22 -14
- data/lib/experian_ms/api.rb +3 -3
- data/lib/experian_ms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f53d02424801c4ff9d5367442c1855bff59e9608
|
4
|
+
data.tar.gz: 31c1dd9e894705e83753df86ab54bc2825540cf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67cef70772e7498028fca274e0862fe2cda80aad8a85cfb3f1aea6ad578c4bb9faf287bb6f64dc32bac8770fa100b37e6d16d9c1fc17932b833e420d263c0f60
|
7
|
+
data.tar.gz: 966a176ce0457fb1f8f03e699656a5ad8201fb48a6cebeac8a7cf2cce14c362682b6457c16545be49e72033cbd61cf8741f42e2597a663fc3628f1ba080c44bf
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Experian Marketing Suite API Integration
|
2
2
|
|
3
|
-
A Ruby wrapper that Integrates Experian Marketing Suit endpoints.
|
3
|
+
A Ruby wrapper that Integrates Experian Marketing Suit endpoints. At the moment
|
4
|
+
the API only supports **POST** data to Experian marketing suite.
|
4
5
|
|
5
6
|
The Experian Marketing Suite is the world's most flexible and comprehensive
|
6
7
|
cloud-based marketing platform. More than 10,000 of the world's leading brands,
|
@@ -10,6 +11,8 @@ ground-up leveraging 30 years of data-driven global marketing expertise, the
|
|
10
11
|
award-winning Experian Marketing Suite unites Experian's customer identity,
|
11
12
|
analytics and cross-channel marketing technology..
|
12
13
|
|
14
|
+
> **Note** This wrapper only uses a single Experian Endpoint
|
15
|
+
|
13
16
|
## Installation
|
14
17
|
|
15
18
|
```ruby
|
@@ -19,27 +22,32 @@ gem 'experian_ms', '~> 0.1.6'
|
|
19
22
|
## Usage
|
20
23
|
|
21
24
|
```ruby
|
22
|
-
# Require the
|
25
|
+
# For Pure ruby installations Require the ExperianMS module
|
23
26
|
require 'experian_ms'
|
24
27
|
|
25
28
|
# Configure the API Wrapper
|
26
|
-
#
|
29
|
+
# Note:
|
30
|
+
# For a rails application this can be added to an Experian initializer (config/initializers/experian_ms_conf.rb)
|
31
|
+
# and theres no need to require the module
|
27
32
|
ExperianMS.configure do |config|
|
28
|
-
config.
|
29
|
-
config.
|
30
|
-
config.
|
31
|
-
config.
|
32
|
-
config.
|
33
|
-
config.
|
33
|
+
config.base_url = 'https://ats.eccmp.com'
|
34
|
+
config.customer_id = 0 # Customer id provided by Experian
|
35
|
+
config.api_version = 0 # Experian API version
|
36
|
+
config.form_group_id = 0 # Form group id provided by Experian
|
37
|
+
config.key = 'your-oauth2-key' # OAuth2 Consumer Key
|
38
|
+
config.secret = 'your-oauth2-secret' # OAuth2 Secret Key
|
39
|
+
config.client_id = 0 # Client id provided by Experian
|
40
|
+
config.oauth2_endpoint = 'https://ats.eccmp.com/ats/oauth2/Token'
|
41
|
+
config.content_type = 'application/x-www-form-urlencoded'
|
34
42
|
end
|
35
43
|
|
36
|
-
# In your Model, Worker, Services
|
37
|
-
# Returns an Experian API instance
|
38
|
-
api_client = ExperianMS.api
|
44
|
+
# In your Model, Worker, Services, Controllers, etc
|
45
|
+
api_client = ExperianMS.api # Returns an Experian API instance
|
39
46
|
|
40
47
|
# Sends the items to Experian endpoint
|
41
|
-
|
42
|
-
|
48
|
+
# xml = Xml Payload
|
49
|
+
# end_point defaults to 'ats/XmlPost/PostSecureAuth2'
|
50
|
+
api_client.request(xml, end_point) # See example xml payload below
|
43
51
|
```
|
44
52
|
|
45
53
|
Example **XML** Payload
|
data/lib/experian_ms/api.rb
CHANGED
@@ -24,15 +24,15 @@ module ExperianMS
|
|
24
24
|
conf
|
25
25
|
end
|
26
26
|
|
27
|
-
def request(xml)
|
27
|
+
def request(xml, end_point = '/ats/XmlPost/PostSecureAuth2/')
|
28
28
|
authenticate
|
29
|
-
post(xml)
|
29
|
+
post(xml, end_point)
|
30
30
|
end
|
31
31
|
|
32
32
|
private
|
33
33
|
|
34
34
|
def post(xml)
|
35
|
-
self.class.post(
|
35
|
+
self.class.post(end_point,
|
36
36
|
headers:grant_header,
|
37
37
|
body: xml,
|
38
38
|
debug_output: $stdout).parsed_response
|
data/lib/experian_ms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: experian_ms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elias J. Perez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|