experian_ms 0.1.61 → 0.1.63

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: b199cfa95f0d07d1c8dfbac3c9171146415d9814
4
- data.tar.gz: d9e5855334be4465d63177bf4c8396bb85d95951
3
+ metadata.gz: 3c125387fe15131c375d0e1484060eadd17a9927
4
+ data.tar.gz: 0dcd7243ec05f15b2f9504fb258eb6e8f29cb216
5
5
  SHA512:
6
- metadata.gz: 6b1ba1b3db85214de3f29124bebc39463df58a7b013b9a89f94d48c88ddce009a7b93cfdc13cde58b3d8499675bbabf353ca586efa45d57b033a939b86210dc2
7
- data.tar.gz: f5b8e74530f8d2ffa88676824b40b92a702218e5fa1b478e93c4c3ea60e3e067d04f1218ca78c7d6faa2ed8909ecd2e0dc38e3ff800336fa249af700be1e3773
6
+ metadata.gz: c095ca88b5c05d8a84d33ee93bd435cc60115355bfd2e677e099ec1419b89feb72b18da07d341e270f7a3313ef5f804f4562542e7e8f925f514673c00fff3ad9
7
+ data.tar.gz: 063a5b0c7c93f41d85d50a22931cb0767d26db2b3b567d01e12ad3de51d13b00b0d9ab8ce54235b5ae5ca56a92c6ad4cbbcc1deb8d5465f17fc2ab9bcbc17a30
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Experian Marketing Suite API Integration
2
2
 
3
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
+ the API only supports **XML POST** data to Experian marketing suite.
5
5
 
6
6
  The Experian Marketing Suite is the world's most flexible and comprehensive
7
7
  cloud-based marketing platform. More than 10,000 of the world's leading brands,
@@ -50,7 +50,7 @@ api_client = ExperianMS.api # Returns an Experian API instance
50
50
  api_client.request(xml, end_point) # See example xml payload below
51
51
  ```
52
52
 
53
- Example **XML** Payload
53
+ Example **XML** Payload for **/ats/XmlPost/PostSecureAuth2** EndPoint
54
54
 
55
55
  ```xml
56
56
  <ApiSubmission ApiVersion="1" FormGroupId="1" SubmissionTrackingCode="SOMECODE" CustId="345">
@@ -65,6 +65,30 @@ Example **XML** Payload
65
65
  </Records>
66
66
  </ApiSubmission>
67
67
  ```
68
+
69
+ Example **XML** Payload for **/services2/api/EmailCampaign/Trigger** EndPoint
70
+
71
+ ```xml
72
+ <InstantTrigger>
73
+ <recipient>
74
+ <apiPostId>00</apiPostId>
75
+ <data>
76
+ <ColumnValue>
77
+ <name>email</name>
78
+ <value>some.email@email.com</value>
79
+ </ColumnValue>
80
+ <ColumnValue>
81
+ <name>user_id</name>
82
+ <value>-100</value>
83
+ </ColumnValue>
84
+ <ColumnValue>
85
+ <name>URL</name>
86
+ <value>example URL</value>
87
+ </ColumnValue>
88
+ </data>
89
+ </recipient>
90
+ </InstantTrigger>
91
+ ```
68
92
  ## Contributing
69
93
 
70
94
  Bug reports and pull requests are welcome on GitHub at https://github.com/eliasjpr/experian-ms.
@@ -14,6 +14,12 @@ module ExperianMS
14
14
  Configuration::VALID_OPTIONS_KEYS.each do |key|
15
15
  send("#{key}=", options[key])
16
16
  end
17
+ self.class.base_uri base_url
18
+ end
19
+
20
+ def change_base_uri=(uri)
21
+ send(:base_url, uri)
22
+ self.class.base_uri uri
17
23
  end
18
24
 
19
25
  def config
@@ -33,7 +39,7 @@ module ExperianMS
33
39
 
34
40
  def post(xml, end_point)
35
41
  self.class.post(end_point,
36
- headers:grant_header,
42
+ headers: grant_header.merge("Content-Type" => content_type),
37
43
  body: xml,
38
44
  debug_output: $stdout).parsed_response
39
45
  end
@@ -1,6 +1,7 @@
1
1
  module ExperianMS
2
2
  module Configuration
3
3
  BASE_URL = 'https://ats.eccmp.com'.freeze
4
+ CONTENT_TYPE = 'application/xml'.freeze
4
5
  CUSTOMER_ID = 0
5
6
  API_VERSION = 1
6
7
  FORM_GROUP_ID = 1
@@ -8,7 +9,6 @@ module ExperianMS
8
9
  SECRET = ''
9
10
  CLIENT_ID = ''
10
11
  OAUTH2_ENDPOINT = 'https://ats.eccmp.com/ats/oauth2/Token'.freeze
11
- CONTENT_TYPE = 'application/x-www-form-urlencoded'.freeze
12
12
  VALID_OPTIONS_KEYS = [:base_url,
13
13
  :customer_id,
14
14
  :api_version,
@@ -1,3 +1,3 @@
1
1
  module ExperianMS
2
- VERSION = "0.1.61"
2
+ VERSION = "0.1.63"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: experian_ms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.61
4
+ version: 0.1.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elias J. Perez