aggcat 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +3 -0
- data/lib/aggcat/client.rb +5 -0
- data/lib/aggcat/version.rb +1 -1
- data/test/aggcat/client_test.rb +8 -0
- data/test/fixtures/positions.xml +40 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01641fbe96bead5bc86b7402eab8390c0fdd0dce
|
4
|
+
data.tar.gz: ead27f7fae30610e910d654a77c0e546950155ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e49815f6255d7cbe96c0e2d98ffc37b8390b00871285447f79200f55ea60165332b5f74d7f9acfc8bffde592065f4d04e1fc42d493424d347de2afbcc9a407d7
|
7
|
+
data.tar.gz: bab45121780df51e5072f6afcfd42ec7677ac0c001237549be886d097896352b890a33ced5530a715bf0ecd9f46da8c8e1f5e169c4a842c3777a1db1715e2320
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -86,6 +86,9 @@ client.update_login(institution_id, login_id, new_username, new_password)
|
|
86
86
|
# in case MFA is required
|
87
87
|
client.update_login_confirmation(login_id, challenge_session_id, challenge_node_id, answers)
|
88
88
|
|
89
|
+
# get position info for an investment account
|
90
|
+
client.investment_positions(account_id)
|
91
|
+
|
89
92
|
# you can set scope inline for any request
|
90
93
|
Aggcat.scope(customer_id).account(account_id)
|
91
94
|
|
data/lib/aggcat/client.rb
CHANGED
data/lib/aggcat/version.rb
CHANGED
data/test/aggcat/client_test.rb
CHANGED
@@ -314,4 +314,12 @@ class ClientTest < Test::Unit::TestCase
|
|
314
314
|
assert_raise(Timeout::Error) { @client.institution(institution_id) }
|
315
315
|
end
|
316
316
|
|
317
|
+
def test_investment_postitions
|
318
|
+
account_id = '000000000001'
|
319
|
+
stub_get("/accounts/#{account_id}/positions").to_return(:body => fixture('positions.xml'), :headers => {:content_type => 'application/xml; charset=utf-8'})
|
320
|
+
response = @client.investment_positions(account_id)
|
321
|
+
assert_equal response[:result][:investment_positions][:position][0][:investment_position_id].to_i , 000000000001
|
322
|
+
assert_equal response[:result][:investment_positions][:position][1][:investment_position_id].to_i , 000000000002
|
323
|
+
end
|
324
|
+
|
317
325
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<InvestmentPositions xmlns="http://schema.intuit.com/platform/fdatafeed/invposition/v1" xmlns:ns2="http://schema.intuit.com/platform/fdatafeed/securityinfo/v1">
|
2
|
+
<position>
|
3
|
+
<investmentPositionId>000000000001</investmentPositionId>
|
4
|
+
<changePercent>2.5</changePercent>
|
5
|
+
<costBasis>1629</costBasis>
|
6
|
+
<unitPrice>8.29</unitPrice>
|
7
|
+
<dailyChange>2.5</dailyChange>
|
8
|
+
<empPretaxContribAmount>629</empPretaxContribAmount>
|
9
|
+
<empMatchAmount>229</empMatchAmount>
|
10
|
+
<holdType>STOCK</holdType>
|
11
|
+
<marketValue>1629</marketValue>
|
12
|
+
<units>200</units>
|
13
|
+
<reinvestmentCapGains>false</reinvestmentCapGains>
|
14
|
+
<reinvestmentDividend>false</reinvestmentDividend>
|
15
|
+
<invSecurityType>OTHERINFO</invSecurityType>
|
16
|
+
<otherInfo>
|
17
|
+
<ns2:ticker>DEF</ns2:ticker>
|
18
|
+
<ns2:unitPrice>8.29</ns2:unitPrice>
|
19
|
+
</otherInfo>
|
20
|
+
</position>
|
21
|
+
<position>
|
22
|
+
<investmentPositionId>000000000002</investmentPositionId>
|
23
|
+
<changePercent>5</changePercent>
|
24
|
+
<costBasis>829</costBasis>
|
25
|
+
<unitPrice>8.29</unitPrice>
|
26
|
+
<dailyChange>5</dailyChange>
|
27
|
+
<empPretaxContribAmount>429</empPretaxContribAmount>
|
28
|
+
<empMatchAmount>429</empMatchAmount>
|
29
|
+
<holdType>BOND</holdType>
|
30
|
+
<marketValue>829</marketValue>
|
31
|
+
<units>100</units>
|
32
|
+
<reinvestmentCapGains>false</reinvestmentCapGains>
|
33
|
+
<reinvestmentDividend>false</reinvestmentDividend>
|
34
|
+
<invSecurityType>OTHERINFO</invSecurityType>
|
35
|
+
<otherInfo>
|
36
|
+
<ns2:ticker>ABC</ns2:ticker>
|
37
|
+
<ns2:unitPrice>8.29</ns2:unitPrice>
|
38
|
+
</otherInfo>
|
39
|
+
</position>
|
40
|
+
</InvestmentPositions>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aggcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gene Drabkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02
|
11
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- test/fixtures/institutions.xml
|
129
129
|
- test/fixtures/login.xml
|
130
130
|
- test/fixtures/oauth_token.txt
|
131
|
+
- test/fixtures/positions.xml
|
131
132
|
- test/fixtures/transactions.xml
|
132
133
|
- test/test_helper.rb
|
133
134
|
homepage: https://github.com/cloocher/aggcat
|
@@ -168,5 +169,6 @@ test_files:
|
|
168
169
|
- test/fixtures/institutions.xml
|
169
170
|
- test/fixtures/login.xml
|
170
171
|
- test/fixtures/oauth_token.txt
|
172
|
+
- test/fixtures/positions.xml
|
171
173
|
- test/fixtures/transactions.xml
|
172
174
|
- test/test_helper.rb
|