plaider 0.1.0 → 0.1.2

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: 784fe8b77ed4336121bfe0ca3627f7f1f10a64ca
4
- data.tar.gz: 1e0ed9af526c2ac579e5524cc50f1280d0e5b2c6
3
+ metadata.gz: d580ca9d22620a9b9013ffd9ef8a0efd16b3c20d
4
+ data.tar.gz: 4573253cd4f4505930e40fc01681264cd1c1338a
5
5
  SHA512:
6
- metadata.gz: e8bd65c4519c147fa830b6f2aaa20f55e698f50d0875ff299dadec7eee5d13c76124e4216b4163fbf26ddc3ab49ad748e6902678538c83f0338afdb04f9b62b9
7
- data.tar.gz: b6253345ea5d2ec1b3604ed65bcc5a27d250d6749ce114735ee78c69671f7a9a58b763976586e0fda3f9c02f42e524e263f7633edcc8c40ba0724eec52f82e68
6
+ metadata.gz: c67ea7aa96ca28bb546d4eec39598de2d9ee99e56026e1d2608cde31e0378015b8142a508160331baba85423e4bff2d1b5369db3daeaf4220d7bb445d9af2929
7
+ data.tar.gz: cc9889686d916cb705378db8329629ccc5549986a90cf03320a570ea368b8d2b890dd593725b93d3f0639c19485da91f4d1c40591fea311ec39b456996353166
@@ -0,0 +1 @@
1
+ repo_token: yqNJtKwTrCEpDt9f6OlrohXmZ6xRcCO9z
@@ -1 +1 @@
1
- ruby-2.1.2
1
+ ruby-2.1.4
@@ -5,7 +5,7 @@ before_install:
5
5
  rvm:
6
6
  - 1.9.3
7
7
  - 2.0.0
8
- - 2.1.2
8
+ - 2.1.4
9
9
  script:
10
10
  - gem build plaider.gemspec
11
11
  - gem install plaider-*
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- plaider (0.1.0)
4
+ plaider (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Plaider
2
2
  [![Build Status](https://travis-ci.org/cloocher/plaider.png)](https://travis-ci.org/cloocher/plaider)
3
- [![Coverage Status](https://coveralls.io/repos/cloocher/plaider/badge.png?branch=master)](https://coveralls.io/r/cloocher/plaider)
3
+ [![Coverage Status](https://coveralls.io/repos/cloocher/plaider/badge.png)](https://coveralls.io/r/cloocher/plaider)
4
4
  [![Gem Version](https://badge.fury.io/rb/plaider.png)](http://badge.fury.io/rb/plaider)
5
5
 
6
+
6
7
  Plaid API client
7
8
 
8
9
  ## Installation
@@ -41,40 +42,44 @@ client = Plaider::Client.new(
41
42
  access_token: 'scope for all requests'
42
43
  )
43
44
 
44
- # create an scoped client by customer_id
45
- client = Aggcat.scope(customer_id)
45
+ # create an scoped client by access_token
46
+ client = Aggcat.scope(access_token)
47
+
48
+ # you could use default scope (no access_token) for non-user specific calls
49
+ client = Aggcat.scope
46
50
 
47
51
  # get all supported financial institutions
48
52
  client.institutions
49
53
 
50
- # get details for Chase
54
+ # get Chase Bank details
51
55
  client.institution('5301a99504977c52b60000d0')
52
56
 
53
57
  # add new financial account to aggregate from Chase
54
- response = client.add_user('chase', username, password, email)
58
+ intitution_type = 'chase'
59
+ response = client.add_user(intitution_type, username, password, email)
55
60
 
56
61
  # in case MFA is required
57
62
  questions = response[:mfa]
58
63
  answer = 'answer'
59
64
  client.user_confirmation(answer)
60
65
 
61
- # get already aggregated financial accounts and transactions
66
+ # get already aggregated financial accounts and transactions for the scoped user
62
67
  client.transactions
63
68
 
64
- # get all aggregated account balances
69
+ # get all account balances
65
70
  client.balance
66
71
 
67
- # get account transactions
72
+ # filter transactions
68
73
  start_date = Date.today - 30
69
74
  end_date = Date.today # optional
70
75
  pending = true # include pending transactions
71
76
  client.transactions(account_id, start_date, end_date, pending)
72
77
 
73
78
  # update user credentials
74
- client.update_user(new_username, new_password)
79
+ client.update_user(username, new_password)
75
80
 
76
81
  # you can set scope inline for any request
77
- Aggcat.scope(access_request).transactions
82
+ Aggcat.scope(access_token).transactions
78
83
 
79
84
  # delete user
80
85
  client.delete_user
@@ -89,7 +89,7 @@ module Plaider
89
89
  def post(path, params = {})
90
90
  request = Net::HTTP::Post.new(path)
91
91
  params.merge!(credentials)
92
- params.merge!(access_token: @access_token)
92
+ params.merge!(access_token: @access_token) if !!@access_token
93
93
  request.set_form_data(params)
94
94
  process(request)
95
95
  end
@@ -97,14 +97,14 @@ module Plaider
97
97
  def patch(path, params = {})
98
98
  request = Net::HTTP::Patch.new(path)
99
99
  params.merge!(credentials)
100
- params.merge!(access_token: @access_token)
100
+ params.merge!(access_token: @access_token) if !!@access_token
101
101
  request.set_form_data(params)
102
102
  process(request)
103
103
  end
104
104
 
105
105
  def delete(path)
106
106
  request = Net::HTTP::Delete.new(path)
107
- request.set_form_data(credentials.merge(access_token: @access_token))
107
+ request.set_form_data(credentials.merge(access_token: @access_token)) if !!@access_token
108
108
  puts request.inspect
109
109
  process(request)
110
110
  end
@@ -1,3 +1,3 @@
1
1
  module Plaider
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -4,6 +4,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
4
4
  require 'simplecov'
5
5
  require 'coveralls'
6
6
 
7
+ Coveralls.wear!
7
8
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
8
9
  SimpleCov::Formatter::HTMLFormatter,
9
10
  Coveralls::SimpleCov::Formatter
@@ -14,7 +15,7 @@ require 'webmock/test_unit'
14
15
  require 'test/unit'
15
16
  require 'plaider'
16
17
 
17
- WebMock.disable_net_connect!(:allow => 'coveralls.io')
18
+ WebMock.disable_net_connect!(allow: 'coveralls.io')
18
19
 
19
20
  def stub_delete(path)
20
21
  stub_request(:delete, Plaider::Client::BASE_URL + path)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plaider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
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-11-03 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -45,6 +45,7 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ".coveralls.yml"
48
49
  - ".gitignore"
49
50
  - ".ruby-gemset"
50
51
  - ".ruby-version"
@@ -94,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
95
  version: '0'
95
96
  requirements: []
96
97
  rubyforge_project:
97
- rubygems_version: 2.2.2
98
+ rubygems_version: 2.4.2
98
99
  signing_key:
99
100
  specification_version: 4
100
101
  summary: Ruby client for Plaid API