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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86632d1488fc604967640f2fb9645b010371a08d
4
- data.tar.gz: 25f82955e0ea4b00a007e01826d3339c16d0006f
3
+ metadata.gz: f53d02424801c4ff9d5367442c1855bff59e9608
4
+ data.tar.gz: 31c1dd9e894705e83753df86ab54bc2825540cf5
5
5
  SHA512:
6
- metadata.gz: 291a3b747aa34d733bb70e04d36fccfd5eb96d31e4e1dc04fd877e34b5a15f91c203c45ffe9911c86c30a1b71230fbd233bbf90f4e8d3b208a1871cfa1aec1ff
7
- data.tar.gz: c4447b9c3471b8b2e8335597804ae722f4965f8f263602077c1c157ffabcd3b2447577dae1e4e22955c05054299f35b90c1ced98907f69b8a4350c023ae6e3e9
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 Experian
25
+ # For Pure ruby installations Require the ExperianMS module
23
26
  require 'experian_ms'
24
27
 
25
28
  # Configure the API Wrapper
26
- # For a rails application this can be added to an Experian initializer
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.key = 'your-oauth2-key' # OAuth2 Consumer Key
29
- config.secret = 'your-oauth2-secret' # OAuth2 Secret Key
30
- config.client_id = 0 # Client id provided by Experian
31
- config.customer_id = 0 # Customer id provided by Experian
32
- config.api_version = 0 # Experian API version
33
- config.form_group_id = 0 # Form group id provided by Experian
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
- api_client.request(xml) # See example xml payload below
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
@@ -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('/ats/XmlPost/PostSecureAuth2/',
35
+ self.class.post(end_point,
36
36
  headers:grant_header,
37
37
  body: xml,
38
38
  debug_output: $stdout).parsed_response
@@ -1,3 +1,3 @@
1
1
  module ExperianMS
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
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-05 00:00:00.000000000 Z
11
+ date: 2016-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty