jemquarie 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +37 -0
- data/.travis.yml +39 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +77 -0
- data/LICENSE.txt +22 -0
- data/README.md +84 -0
- data/Rakefile +7 -0
- data/jemquarie.gemspec +28 -0
- data/lib/jemquarie/extract.wsdl +109 -0
- data/lib/jemquarie/importer.rb +56 -0
- data/lib/jemquarie/parser/cash_transactions.rb +164 -0
- data/lib/jemquarie/version.rb +3 -0
- data/lib/jemquarie.rb +30 -0
- data/spec/files/no_data.xml +22 -0
- data/spec/files/non_authenticated.xml +8 -0
- data/spec/files/transactions.xml +2341 -0
- data/spec/lib/importer_spec.rb +88 -0
- data/spec/lib/jemquarie_spec.rb +15 -0
- data/spec/spec_helper.rb +23 -0
- metadata +153 -0
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"><?xml version="1.0" ?>
|
5
|
+
<XMLExtract>
|
6
|
+
<RequestDetails>
|
7
|
+
<RequestStatus>Success</RequestStatus>
|
8
|
+
<RequestErrorNumber></RequestErrorNumber>
|
9
|
+
<RequestErrorDetails></RequestErrorDetails>
|
10
|
+
<RequestTime>2014-05-21 09:44:09.466</RequestTime>
|
11
|
+
</RequestDetails>
|
12
|
+
<XMLEntityDetails>
|
13
|
+
<XMLEntityName>your.clients Transactions</XMLEntityName>
|
14
|
+
<XMLEntityVersion>V1.4</XMLEntityVersion>
|
15
|
+
</XMLEntityDetails>
|
16
|
+
<yourclientsTransactions>
|
17
|
+
</yourclientsTransactions>
|
18
|
+
</XMLExtract>
|
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>
|