finapps 5.0.16 → 5.0.17

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
  SHA256:
3
- metadata.gz: 5e152bd168f623e4d40787548c86e7c80c056826311cb15c642e1da4930a6312
4
- data.tar.gz: 650f2da982b5cddaaa0acebbe83c74cfc9b669a020606f7e542dd6c45760209b
3
+ metadata.gz: 5512d2f1ee03d53352b24c01d80f7d58828bd6ffe4e6ab2e58d716e1474de6a3
4
+ data.tar.gz: 0706fa34a43305d15380c0a0ea3f655bed1cbb7439b084c2bbb440218d692e94
5
5
  SHA512:
6
- metadata.gz: 6f37c24832dec19af8e3760affb07e6d05a4bbde1916f56025047dbc35fe08d1cbda1032bacb35a2acc1c2622b5b806785a9c8890460a986c281ebaa6dd18703
7
- data.tar.gz: 46f124acbba56489d2b83ea411c46250c310a526ef1f8b5e73e916eed31f517a47e3640213b738541a95772056693bd419b413c8e28fb2663e7c45ed1393d749
6
+ metadata.gz: 1a179a210092c0c7692c0ea843780cc6809e5dd8eaa43eba5a2663ea473562fee4d2a45cddc981bcd3a7145878e3b61e9b9ef66443365c207981f5a27834ab29
7
+ data.tar.gz: f3ee33264346715bedc618730cecd2b0bf5489d9a18907b96defb36de6ab4dc9271fa5864b01f709d2ed8f77cc4babda4aaa435f6765b494576e7b198a6bd4b0
data/.travis.yml CHANGED
@@ -6,12 +6,11 @@ cache:
6
6
  rvm:
7
7
  - 2.5
8
8
  - 2.6
9
- - ruby-head
10
9
 
11
10
  before_install:
12
11
  - "echo 'gem: --no-document' > ~/.gemrc"
13
12
  - gem update --system
14
- - gem install bundler -v "~>2.0"
13
+ - gem install bundler --force
15
14
 
16
15
  script:
17
16
  - bundle exec rspec
@@ -23,4 +22,4 @@ addons:
23
22
  code_climate:
24
23
  repo_token: dc180b31d340bd88cedd0ec3ea8ba8ec5093f2bafe77a7bf5bbdcb1c5ff9dc7f
25
24
  after_success:
26
- - bundle exec codeclimate-test-reporter
25
+ - bundle exec codeclimate-test-reporter
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'erb'
4
+
3
5
  module FinApps
4
6
  module REST
5
7
  class PlaidConsumerInstitutions < PlaidResources # :nodoc:
@@ -11,7 +13,8 @@ module FinApps
11
13
  results, error_messages = super(nil, "p/institution/consumer/#{id}")
12
14
 
13
15
  if error_messages.empty? && options[:show_accounts]
14
- account_results, error_messages = super(nil, "p/institution/consumer/#{id}/account")
16
+ account_results, error_messages =
17
+ super(nil, "p/institution/consumer/#{id}/account")
15
18
  results[:accounts] = account_results if error_messages.empty?
16
19
  end
17
20
 
@@ -21,6 +24,12 @@ module FinApps
21
24
  def list
22
25
  super 'p/institution/consumer'
23
26
  end
27
+
28
+ def destroy(id)
29
+ not_blank(id, :consumer_institution_id)
30
+
31
+ super id, "p/institution/consumer/#{id}"
32
+ end
24
33
  end
25
34
  end
26
35
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '5.0.16'
4
+ VERSION = '5.0.17'
5
5
  end
@@ -9,8 +9,10 @@ RSpec.describe FinApps::REST::PlaidConsumerInstitutions do
9
9
  # noinspection RubyBlockToMethodReference
10
10
  let(:api_client) { client }
11
11
 
12
- RSpec.shared_examples 'a request that returns institution data' do |_parameter|
13
- it('returns institution data') { expect(subject[RESULTS]).to have_key(:plaid_institution_id) }
12
+ RSpec.shared_examples 'a request that returns institution data' do
13
+ it('returns institution data') do
14
+ expect(subject[RESULTS]).to have_key(:plaid_institution_id)
15
+ end
14
16
  end
15
17
 
16
18
  describe '#create' do
@@ -45,15 +47,34 @@ RSpec.describe FinApps::REST::PlaidConsumerInstitutions do
45
47
  it_behaves_like 'an API request'
46
48
  it_behaves_like 'a successful request'
47
49
  it_behaves_like 'a request that returns institution data'
48
- it('returns institution account data') { expect(subject[RESULTS]).to have_key(:accounts) }
50
+ it('returns institution account data') do
51
+ expect(subject[RESULTS]).to have_key(:accounts)
52
+ end
49
53
  end
50
54
  end
51
55
 
52
56
  describe '#list' do
53
- subject(:list) { FinApps::REST::PlaidConsumerInstitutions.new(api_client).list }
57
+ subject(:list) do
58
+ FinApps::REST::PlaidConsumerInstitutions.new(api_client).list
59
+ end
54
60
 
55
61
  it_behaves_like 'an API request'
56
62
  it_behaves_like 'a successful request'
57
- it('returns an Array of institution data') { expect(list[RESULTS].first).to have_key(:plaid_institution_id) }
63
+ it('returns an Array of institution data') do
64
+ expect(list[RESULTS].first).to have_key(:plaid_institution_id)
65
+ end
66
+ end
67
+
68
+ describe '#destroy' do
69
+ subject(:destroy) do
70
+ FinApps::REST::PlaidConsumerInstitutions.new(api_client)
71
+ .destroy(:consumer_institution_id)
72
+ end
73
+
74
+ it_behaves_like 'an API request'
75
+ it_behaves_like 'a successful request'
76
+ it('returns no results') do
77
+ expect(destroy[RESULTS]).to be_nil
78
+ end
58
79
  end
59
80
  end
@@ -48,6 +48,9 @@ class FakeApi < Sinatra::Base
48
48
  json_response 200, 'plaid/institution/consumer/add.json'
49
49
  end
50
50
  end
51
+ delete("/#{version}/p/institution/consumer/:consumer_institution_id") do
52
+ status 204
53
+ end
51
54
 
52
55
  # plaid_accounts
53
56
  get("/#{version}/p/account") do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.16
4
+ version: 5.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-04 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: finapps_core
@@ -440,44 +440,44 @@ required_rubygems_version: !ruby/object:Gem::Requirement
440
440
  - !ruby/object:Gem::Version
441
441
  version: '0'
442
442
  requirements: []
443
- rubygems_version: 3.0.3
443
+ rubygems_version: 3.0.6
444
444
  signing_key:
445
445
  specification_version: 4
446
446
  summary: FinApps REST API ruby client.
447
447
  test_files:
448
- - spec/rest/portfolios_alerts_spec.rb
449
- - spec/rest/alert_definitions_spec.rb
450
448
  - spec/rest/portfolios_consumers_spec.rb
451
- - spec/rest/plaid/plaid_accounts_spec.rb
452
- - spec/rest/plaid/plaid_institution_logos_spec.rb
453
- - spec/rest/plaid/plaid_webhooks_spec.rb
454
- - spec/rest/plaid/plaid_account_permissions_spec.rb
455
- - spec/rest/plaid/plaid_consumer_institutions_spec.rb
456
- - spec/rest/order_assignments_spec.rb
457
- - spec/rest/tenant_settings_spec.rb
458
- - spec/rest/tenant_app_settings_spec.rb
459
- - spec/rest/client_spec.rb
460
- - spec/rest/portfolio_reports_spec.rb
449
+ - spec/rest/consumers_portfolios_spec.rb
450
+ - spec/rest/operators_password_resets_spec.rb
451
+ - spec/rest/portfolios_available_consumers_spec.rb
452
+ - spec/rest/products_spec.rb
453
+ - spec/rest/statements_spec.rb
454
+ - spec/rest/alert_definitions_spec.rb
461
455
  - spec/rest/version_spec.rb
462
- - spec/rest/password_resets_spec.rb
456
+ - spec/rest/consumers_spec.rb
457
+ - spec/rest/orders_spec.rb
458
+ - spec/rest/order_tokens_spec.rb
459
+ - spec/rest/tenant_app_settings_spec.rb
463
460
  - spec/rest/operators_spec.rb
464
- - spec/rest/order_statuses_spec.rb
461
+ - spec/rest/client_spec.rb
462
+ - spec/rest/tenant_settings_spec.rb
463
+ - spec/rest/api_request.rb
465
464
  - spec/rest/alert_occurrences_spec.rb
465
+ - spec/rest/password_resets_spec.rb
466
466
  - spec/rest/order_reports_spec.rb
467
- - spec/rest/portfolios_available_consumers_spec.rb
468
- - spec/rest/consumers_spec.rb
469
- - spec/rest/sessions_spec.rb
470
- - spec/rest/orders_spec.rb
471
- - spec/rest/operators_password_resets_spec.rb
472
467
  - spec/rest/portfolios_spec.rb
468
+ - spec/rest/order_statuses_spec.rb
469
+ - spec/rest/plaid/plaid_accounts_spec.rb
470
+ - spec/rest/plaid/plaid_account_permissions_spec.rb
471
+ - spec/rest/plaid/plaid_webhooks_spec.rb
472
+ - spec/rest/plaid/plaid_institution_logos_spec.rb
473
+ - spec/rest/plaid/plaid_consumer_institutions_spec.rb
473
474
  - spec/rest/order_refreshes_spec.rb
474
475
  - spec/rest/order_notifications_spec.rb
475
- - spec/rest/statements_spec.rb
476
- - spec/rest/api_request.rb
477
- - spec/rest/order_tokens_spec.rb
478
- - spec/rest/consumers_portfolios_spec.rb
479
- - spec/rest/products_spec.rb
480
- - spec/utils/query_builder_spec.rb
476
+ - spec/rest/portfolios_alerts_spec.rb
477
+ - spec/rest/order_assignments_spec.rb
478
+ - spec/rest/sessions_spec.rb
479
+ - spec/rest/portfolio_reports_spec.rb
481
480
  - spec/support/fake_api.rb
482
- - spec/spec_helper.rb
481
+ - spec/utils/query_builder_spec.rb
483
482
  - spec/spec_helpers/client.rb
483
+ - spec/spec_helper.rb