old_plaid 2.7.2 → 2.8.2

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: 9a0473ab3c53c68fee531bf6f499cc6e26ac6e59
4
- data.tar.gz: 5befabc532bf035b258ab357b40b29295065aba6
3
+ metadata.gz: 314274626442860ce9a689d40ad75ed35979db8b
4
+ data.tar.gz: a3e09eb688887dd58091ec98e0c2edb172c0f116
5
5
  SHA512:
6
- metadata.gz: 4c8069d99a7fc3f32440b75d0ca54d473e75aae58e91ca7ace4557c6849936cdc586fa4b35421e38b5bd10bc6735e4788b7277b41c264aeba90b77283b8705fb
7
- data.tar.gz: cee6116309bcaa7975a06f6453724767cc3e69eed3cbfc669df9cd9a705ab0358c37acdd3c7e7540ae9f6219dceca35e5cf8eb3ff4a164838107d292a4474170
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, :id, :type, :subtype, :balances
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
- @id = hash['_id']
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.id == account['_id'] }
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']
@@ -1,3 +1,3 @@
1
1
  module OldPlaid
2
- VERSION = '2.7.2'
2
+ VERSION = '2.8.2'
3
3
  end
@@ -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.id).to eql('ID') } end
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.id).not_to be_nil }
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.7.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-20 00:00:00.000000000 Z
11
+ date: 2018-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler