jemquarie 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/jemquarie.rb ADDED
@@ -0,0 +1,30 @@
1
+ require 'savon'
2
+ require 'active_support/core_ext/hash'
3
+
4
+ Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), "jemquarie/parser/*.rb")).each {|f| require f}
5
+ Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), "jemquarie/*.rb")).each {|f| require f}
6
+
7
+ module Jemquarie
8
+
9
+ class Jemquarie
10
+ BASE_URI = "https://www.macquarie.com.au/ESI/ESIWebService/Extract"
11
+ @api_key = nil
12
+ @app_key = nil
13
+
14
+ class << self
15
+ def api_credentials(api_key, application = 'Jemquarie Gem')
16
+ Jemquarie.api_key(api_key)
17
+ Jemquarie.app_key(application)
18
+ end
19
+ def api_key(api_key = nil)
20
+ @api_key = api_key unless api_key.nil?
21
+ @api_key
22
+ end
23
+ def app_key(app_key = nil)
24
+ @app_key = app_key unless app_key.nil?
25
+ @app_key
26
+ end
27
+ end
28
+ end
29
+
30
+ end
@@ -0,0 +1,22 @@
1
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2
+ <soapenv:Body>
3
+ <ns1:GenerateXMLExtractResponse xmlns:ns1="wrapwebservices" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
4
+ <result xsi:type="xsd:string">&lt;?xml version="1.0" ?&gt;
5
+ &lt;XMLExtract&gt;
6
+ &lt;RequestDetails&gt;
7
+ &lt;RequestStatus&gt;Success&lt;/RequestStatus&gt;
8
+ &lt;RequestErrorNumber&gt;&lt;/RequestErrorNumber&gt;
9
+ &lt;RequestErrorDetails&gt;&lt;/RequestErrorDetails&gt;
10
+ &lt;RequestTime&gt;2014-05-21 09:44:09.466&lt;/RequestTime&gt;
11
+ &lt;/RequestDetails&gt;
12
+ &lt;XMLEntityDetails&gt;
13
+ &lt;XMLEntityName&gt;your.clients Transactions&lt;/XMLEntityName&gt;
14
+ &lt;XMLEntityVersion&gt;V1.4&lt;/XMLEntityVersion&gt;
15
+ &lt;/XMLEntityDetails&gt;
16
+ &lt;yourclientsTransactions&gt;
17
+ &lt;/yourclientsTransactions&gt;
18
+ &lt;/XMLExtract&gt;
19
+ </result>
20
+ </ns1:GenerateXMLExtractResponse>
21
+ </soapenv:Body>
22
+ </soapenv:Envelope>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
+ <soapenv:Body>
4
+ <ns1:GenerateXMLExtractResponse xmlns:ns1="wrapwebservices" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
5
+ <result xsi:type="xsd:string"/>
6
+ </ns1:GenerateXMLExtractResponse>
7
+ </soapenv:Body>
8
+ </soapenv:Envelope>