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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2babc95ea6a1ae18b2eb38d885ca8c0b6df490f7
4
- data.tar.gz: e6d99493341928d4597b9183ef7aeda407297830
3
+ metadata.gz: 01641fbe96bead5bc86b7402eab8390c0fdd0dce
4
+ data.tar.gz: ead27f7fae30610e910d654a77c0e546950155ed
5
5
  SHA512:
6
- metadata.gz: 200d081f1aa7f64b5e06a749e0575203025ce7a9347018b4f81484482e35fe7e80d3808a091e71996c3561145460545cc671f9871549ec21a512d00fa44142eb
7
- data.tar.gz: 5bf7761fafd1073abee8445050c54073980d318f765d523c7ef28ff7ad0fc32813704862765eccd8a4d2597107e39ee687d9231a8a3446229cdbed1f44ce09bc
6
+ metadata.gz: e49815f6255d7cbe96c0e2d98ffc37b8390b00871285447f79200f55ea60165332b5f74d7f9acfc8bffde592065f4d04e1fc42d493424d347de2afbcc9a407d7
7
+ data.tar.gz: bab45121780df51e5072f6afcfd42ec7677ac0c001237549be886d097896352b890a33ced5530a715bf0ecd9f46da8c8e1f5e169c4a842c3777a1db1715e2320
@@ -5,6 +5,7 @@ before_install:
5
5
  rvm:
6
6
  - 1.9.3
7
7
  - 2.0.0
8
+ - 2.1.2
8
9
  script:
9
10
  - gem build aggcat.gemspec
10
11
  - gem install aggcat-*
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
 
@@ -87,6 +87,11 @@ module Aggcat
87
87
  result
88
88
  end
89
89
 
90
+ def investment_positions(account_id)
91
+ validate(account_id: account_id)
92
+ get("/accounts/#{account_id}/positions")
93
+ end
94
+
90
95
  protected
91
96
 
92
97
  def get(path, headers = {})
@@ -1,3 +1,3 @@
1
1
  module Aggcat
2
- VERSION = '0.3.5'
2
+ VERSION = '0.3.6'
3
3
  end
@@ -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.5
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-28 00:00:00.000000000 Z
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