old_plaid 2.7.2 → 2.8.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 314274626442860ce9a689d40ad75ed35979db8b
|
4
|
+
data.tar.gz: a3e09eb688887dd58091ec98e0c2edb172c0f116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 846d458afcfd8872563c74afab01917906aeae9d51afef7a55111ab21bf87c9ebd79b27a55067d14394f28c47a1735e411a29cd0b3693a04af5744d1a64a8cd0
|
7
|
+
data.tar.gz: ddba0875e0eb9cb9ec8761973c4c2dceccde5b80b11d0905ce891bd3189ee97a65745141f9ac5b9533826dd26b3eea269547fba19eaf4b62a4100ffc0e2a2c73
|
@@ -2,10 +2,10 @@ require_relative 'balances'
|
|
2
2
|
|
3
3
|
module OldPlaid
|
4
4
|
class Account
|
5
|
-
attr_accessor :available_balance, :current_balance, :institution_type, :mask, :meta, :transactions, :numbers, :name, :
|
5
|
+
attr_accessor :available_balance, :current_balance, :institution_type, :mask, :meta, :transactions, :numbers, :name, :account_id, :type, :subtype, :balances
|
6
6
|
|
7
7
|
def initialize(hash)
|
8
|
-
@
|
8
|
+
@account_id = hash['_id']
|
9
9
|
@name = hash['meta']['name'] if hash['meta']
|
10
10
|
@type = hash['type']
|
11
11
|
@meta = hash['meta']
|
@@ -159,7 +159,7 @@ module OldPlaid
|
|
159
159
|
|
160
160
|
def populate_user!(res)
|
161
161
|
res['accounts'].each do |account|
|
162
|
-
if self.accounts.none? { |h| h.
|
162
|
+
if self.accounts.none? { |h| h.account_id == account['_id'] }
|
163
163
|
self.accounts << Account.new(account)
|
164
164
|
end
|
165
165
|
end if res['accounts']
|
data/lib/old_plaid/version.rb
CHANGED
@@ -11,7 +11,7 @@ describe OldPlaid::Account do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
with_results('meta' => {'name' => 'Name'}) do it { expect(subject.name).to eql('Name') } end
|
14
|
-
with_results('_id' => 'ID') do it { expect(subject.
|
14
|
+
with_results('_id' => 'ID') do it { expect(subject.account_id).to eql('ID') } end
|
15
15
|
with_results('type' => 'Type') do it { expect(subject.type).to eql('Type') } end
|
16
16
|
with_results('type' => 'STyp') do it { expect(subject.type).to eql('STyp') } end
|
17
17
|
with_results('meta' => nil) do it { expect(subject.meta).to be_nil } end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'pry'
|
2
1
|
describe OldPlaid::User do
|
3
2
|
let(:auth_user) { OldPlaid.add_user('auth', 'plaid_test', 'plaid_good', 'wells') }
|
4
3
|
let(:connect_user) { OldPlaid.add_user('connect', 'plaid_test', 'plaid_good', 'wells') }
|
@@ -7,7 +6,7 @@ describe OldPlaid::User do
|
|
7
6
|
context 'user vars' do
|
8
7
|
context 'valid user has accounts and accounts contain id attribute' do
|
9
8
|
let(:user) { OldPlaid.add_user('connect', 'plaid_test', 'plaid_good', 'wells') }
|
10
|
-
it { expect(user.accounts.first.
|
9
|
+
it { expect(user.accounts.first.account_id).not_to be_nil }
|
11
10
|
end
|
12
11
|
|
13
12
|
context 'valid user has accounts and accounts contain type attribute' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: old_plaid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Crites
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|