jemquarie 1.0.1 → 1.1.0

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: 722f038cc03ddfa1b7b1f36d4b1ce2cf6468be62
4
- data.tar.gz: d442aec7213aa7975109cf57f706a3bf46385cb1
3
+ metadata.gz: 1943bcff1eded9ff291da5957ac543c7d820c475
4
+ data.tar.gz: 8d1d4b2b1affd3de5cdf130f0db1328ce5c2160a
5
5
  SHA512:
6
- metadata.gz: b1bd35caaf41547028bbe11f8a77b6af06105442abca4d919380ac9e13003609e84a7b9b60121d65eb27a4cbbfb74c512244581b73cd6938d468c0b0656f3b4b
7
- data.tar.gz: c3ace6caec6bafa2e1ccfa68631b5405e5e649227b54402fe1845aa2fb74cb484745c4829ef6651f96832cb2979485df461c397188df6b849d68d326b6dae2e1
6
+ metadata.gz: d444904e3bfc0ee715741f9ea3b1023633005780d13daa397b3a9bf8681353741de57f85bb1d6d53cfb1666b4047e1fd65711c8a7ce573237e9c841c6375e8da
7
+ data.tar.gz: 5faedf9ca457b29ff5d386787f724d171d5900b12113e6cf3cd3914f92527f5d6e20ddcc27471ce1f0d900f70fe77a73e9625f8bc686f5ac703b0ede355e2a77
data/.gitignore CHANGED
@@ -26,7 +26,7 @@ build/
26
26
 
27
27
  # for a library or gem, you might want to ignore these files since the code is
28
28
  # intended to run in multiple environments; otherwise, check them in:
29
- # Gemfile.lock
29
+ Gemfile.lock
30
30
  # .ruby-version
31
31
  # .ruby-gemset
32
32
 
@@ -35,3 +35,5 @@ build/
35
35
 
36
36
  # rspec
37
37
  .rspec
38
+
39
+ Gemfile.lock
data/jemquarie.gemspec CHANGED
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "bundler", '>= 1.3'
25
25
  spec.add_development_dependency "rake", '>= 10.3.0'
26
26
  spec.add_development_dependency "fakeweb", '>= 1.3.0'
27
- spec.add_development_dependency "rspec", '>= 2.14.0'
27
+ spec.add_development_dependency "rspec", '~> 2'
28
28
  end
@@ -27,6 +27,7 @@ private
27
27
  :amount => transaction["DebitCredit"] == 'C' ? transaction["Amount"] : ('-' + transaction["Amount"]),
28
28
  :type_name => translate_transaction_type(transaction["TransactionType"]),
29
29
  :description => transaction["Narrative"],
30
+ :reverse => transaction["ReversalFlag"] == 'Y',
30
31
  :meta_data => {
31
32
  :updated_at => Time.parse(transaction["DateModified"] + " UTC")
32
33
  }
@@ -1,3 +1,3 @@
1
1
  module Jemquarie
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -36,6 +36,18 @@
36
36
  <TransactionCategory>DEPO</TransactionCategory>
37
37
  <CategoryType>INTR</CategoryType>
38
38
  </yourclientsTransaction>
39
+ <yourclientsTransaction>
40
+ <AccountNumber>121741987</AccountNumber>
41
+ <TransactionDate>2008-12-23 00:00:00.0</TransactionDate>
42
+ <ReversalFlag>Y</ReversalFlag>
43
+ <DebitCredit>D</DebitCredit>
44
+ <TransactionType>BP</TransactionType>
45
+ <TransactionId>0132058314</TransactionId>
46
+ <Amount>2.4100</Amount>
47
+ <Narrative>BPAY TO MACQUARIE CMT</Narrative>
48
+ <DateModified>2008-12-23 04:14:26.683</DateModified>
49
+ <TransactionCategory>WTHD</TransactionCategory>
50
+ </yourclientsTransaction>
39
51
  <yourclientsTransaction>
40
52
  <AccountNumber>121741987</AccountNumber>
41
53
  <TransactionDate>2009-02-17 00:00:00.0</TransactionDate>
@@ -19,7 +19,7 @@ describe Jemquarie::Importer do
19
19
  end
20
20
  it "should work" do
21
21
  expect(@result).to be_kind_of Array
22
- expect(@result).to have(185).items
22
+ expect(@result).to have(186).items
23
23
 
24
24
  first_item = @result.first
25
25
  expect(first_item[:foreign_identifier]).to eq("0132058314")
@@ -27,6 +27,7 @@ describe Jemquarie::Importer do
27
27
  expect(first_item[:amount]).to eq("-2.4100")
28
28
  expect(first_item[:type_name]).to eq("B-PAY WITHDRAWAL")
29
29
  expect(first_item[:description]).to eq("BPAY TO MACQUARIE CMT")
30
+ expect(first_item[:reverse]).to eq(false)
30
31
  expect(first_item[:meta_data][:updated_at]).to eq(Time.parse("2008-12-19 04:14:26.683 UTC"))
31
32
 
32
33
  last_item = @result.last
@@ -35,8 +36,20 @@ describe Jemquarie::Importer do
35
36
  expect(last_item[:amount]).to eq("0.0600")
36
37
  expect(last_item[:type_name]).to eq("INTEREST PAID")
37
38
  expect(last_item[:description]).to eq("CASH MANAGEMENT SERVICE INTEREST PAID")
39
+ expect(first_item[:reverse]).to eq(false)
38
40
  expect(last_item[:meta_data][:updated_at]).to eq(Time.parse("2014-05-01 01:36:42.763 UTC"))
41
+
42
+
43
+ reverse_item = @result.detect{ |row| row[:reverse] == true }
44
+ expect(reverse_item[:foreign_identifier]).to eq(first_item[:foreign_identifier])
45
+ expect(reverse_item[:date_time]).to eq(Time.parse("2008-12-23 00:00:00 UTC"))
46
+ expect(reverse_item[:amount]).to eq(first_item[:amount])
47
+ expect(reverse_item[:type_name]).to eq(first_item[:type_name])
48
+ expect(reverse_item[:description]).to eq(first_item[:description])
49
+ expect(reverse_item[:reverse]).to eq(true)
50
+ expect(reverse_item[:meta_data][:updated_at]).to eq(Time.parse("2008-12-23 04:14:26.683 UTC"))
39
51
  end
52
+
40
53
  end
41
54
 
42
55
  describe "single transaction success" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jemquarie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Contin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-10 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 2.14.0
89
+ version: '2'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 2.14.0
96
+ version: '2'
97
97
  description: Connect to Macquarie ESI web services
98
98
  email:
99
99
  - contin@gmail.com
@@ -104,7 +104,6 @@ files:
104
104
  - ".gitignore"
105
105
  - ".travis.yml"
106
106
  - Gemfile
107
- - Gemfile.lock
108
107
  - LICENSE.txt
109
108
  - README.md
110
109
  - Rakefile
@@ -179,3 +178,4 @@ test_files:
179
178
  - spec/lib/importer_spec.rb
180
179
  - spec/lib/jemquarie_spec.rb
181
180
  - spec/spec_helper.rb
181
+ has_rdoc:
data/Gemfile.lock DELETED
@@ -1,77 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- jemquarie (1.0.0)
5
- activesupport (>= 3.0)
6
- savon (~> 2.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activesupport (4.1.1)
12
- i18n (~> 0.6, >= 0.6.9)
13
- json (~> 1.7, >= 1.7.7)
14
- minitest (~> 5.1)
15
- thread_safe (~> 0.1)
16
- tzinfo (~> 1.1)
17
- akami (1.2.2)
18
- gyoku (>= 0.4.0)
19
- nokogiri
20
- builder (3.2.2)
21
- diff-lcs (1.2.5)
22
- fakeweb (1.3.0)
23
- gyoku (1.1.1)
24
- builder (>= 2.1.2)
25
- httpi (2.1.0)
26
- rack
27
- rubyntlm (~> 0.3.2)
28
- i18n (0.6.9)
29
- json (1.8.1)
30
- macaddr (1.7.1)
31
- systemu (~> 2.6.2)
32
- mime-types (1.25.1)
33
- mini_portile (0.6.0)
34
- minitest (5.3.4)
35
- nokogiri (1.6.2.1)
36
- mini_portile (= 0.6.0)
37
- nori (2.4.0)
38
- rack (1.5.2)
39
- rake (10.3.1)
40
- rspec (2.14.1)
41
- rspec-core (~> 2.14.0)
42
- rspec-expectations (~> 2.14.0)
43
- rspec-mocks (~> 2.14.0)
44
- rspec-core (2.14.8)
45
- rspec-expectations (2.14.5)
46
- diff-lcs (>= 1.1.3, < 2.0)
47
- rspec-mocks (2.14.6)
48
- rubyntlm (0.3.4)
49
- savon (2.5.1)
50
- akami (~> 1.2.0)
51
- builder (>= 2.1.2)
52
- gyoku (~> 1.1.0)
53
- httpi (~> 2.1.0)
54
- nokogiri (>= 1.4.0)
55
- nori (~> 2.4.0)
56
- uuid (~> 2.3.7)
57
- wasabi (~> 3.3.0)
58
- systemu (2.6.4)
59
- thread_safe (0.3.4)
60
- tzinfo (1.1.0)
61
- thread_safe (~> 0.1)
62
- uuid (2.3.7)
63
- macaddr (~> 1.0)
64
- wasabi (3.3.0)
65
- httpi (~> 2.0)
66
- mime-types (< 2.0.0)
67
- nokogiri (>= 1.4.0)
68
-
69
- PLATFORMS
70
- ruby
71
-
72
- DEPENDENCIES
73
- bundler (>= 1.3)
74
- fakeweb (>= 1.3.0)
75
- jemquarie!
76
- rake (>= 10.3.0)
77
- rspec (>= 2.14.0)