finapps 5.0.14 → 5.0.15

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
  SHA256:
3
- metadata.gz: c88358c623ea2ab28b48c290cea3245bee6896aa105ef411e881ca01c80b31c9
4
- data.tar.gz: c40ecae6c8ba2a5472b2b80325cf4ebf912a06cdedb6d75e05fe77a3994f272d
3
+ metadata.gz: f34e507fa4a0cf5496d1993d7b064512f1a2237d8bcf79a6c566d15391575881
4
+ data.tar.gz: 3a021151ddf042be1deb2e372df83cc296e1aa88f8d283a9c0bd68b76d44b815
5
5
  SHA512:
6
- metadata.gz: e2ac883b52219e1fa3dc5acda80bfa37268e4c04b61bc6d604320357ed46b8b35665931a85769eb7b6d4ce7473db7957eff19d58622564106c28ba2c9fab5acf
7
- data.tar.gz: 1c85b4ae3ea37cfe915efa193248c094c385efbe099f860efd639cc8760b299aa541665e7c7a8d30892d63ea51ed89600e36dd2b2f0ad21a63105f9729ec97ed
6
+ metadata.gz: 0ac04e060de22bb5daed4c8002a23ae7a7e992886b519b553ab7f220c26c2d3066b6cff8d7a7d0fbe52b3f9f76c35ddb1bc73438feaab84fc280d28f1a4c7c7e
7
+ data.tar.gz: 22198e41021ba24d43ee6a7feacdf3e1298b2747181f5d310a77f91657d23537937b3af22966b84a6cbb481d7d4706ce181f71e576b0208fcf99cfb8e6c085f2
@@ -36,6 +36,7 @@ require 'finapps/rest/plaid/plaid_webhooks'
36
36
  require 'finapps/rest/plaid/plaid_consumer_institutions'
37
37
  require 'finapps/rest/plaid/plaid_accounts'
38
38
  require 'finapps/rest/plaid/plaid_account_permissions'
39
+ require 'finapps/rest/plaid/plaid_institution_logos'
39
40
 
40
41
  require 'finapps/utils/query_builder'
41
42
  require 'finapps/version' unless defined?(FinApps::VERSION)
@@ -35,6 +35,7 @@ module FinApps
35
35
  plaid_consumer_institutions
36
36
  plaid_accounts
37
37
  plaid_account_permissions
38
+ plaid_institution_logos
38
39
  ].freeze
39
40
 
40
41
  # @param [String] tenant_token
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinApps
4
+ module REST
5
+ class PlaidInstitutionLogos < PlaidResources # :nodoc:
6
+ def show(id)
7
+ super(nil, "p/institution/logo/#{id}")
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '5.0.14'
4
+ VERSION = '5.0.15'
5
5
  end
@@ -215,5 +215,13 @@ RSpec.describe FinApps::REST::Client do
215
215
  )
216
216
  end
217
217
  end
218
+
219
+ describe '#plaid_institution_logos' do
220
+ it do
221
+ expect(subject.plaid_institution_logos).to be_an_instance_of(
222
+ FinApps::REST::PlaidInstitutionLogos
223
+ )
224
+ end
225
+ end
218
226
  end
219
227
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helpers/client'
4
+ require 'rest/api_request'
5
+
6
+ RSpec.describe FinApps::REST::PlaidInstitutionLogos do
7
+ include SpecHelpers::Client
8
+
9
+ # noinspection RubyBlockToMethodReference
10
+ let(:api_client) { client }
11
+
12
+ describe '#show' do
13
+ subject(:show) do
14
+ FinApps::REST::PlaidInstitutionLogos.new(api_client).show(
15
+ :inst_id
16
+ )
17
+ end
18
+
19
+ it_behaves_like 'an API request'
20
+ it_behaves_like 'a successful request'
21
+ end
22
+ end
@@ -75,6 +75,11 @@ class FakeApi < Sinatra::Base
75
75
  end
76
76
  end
77
77
 
78
+ # plaid_institution_logos
79
+ get("/#{version}/p/institution/logo/:inst_id") do
80
+ png_response 'plaid/institution/logo.png'
81
+ end
82
+
78
83
  # version
79
84
  get("/#{version}/version") { 'Version => 2.1.29-.20161208.172810' }
80
85
 
@@ -381,7 +386,15 @@ class FakeApi < Sinatra::Base
381
386
  private
382
387
 
383
388
  def json_response(response_code, file_name)
384
- content_type :json
389
+ http_response :json, response_code, file_name
390
+ end
391
+
392
+ def png_response(file_name)
393
+ http_response :png, 200, file_name
394
+ end
395
+
396
+ def http_response(content_type, response_code, file_name)
397
+ content_type content_type
385
398
  status response_code
386
399
  File.open(File.dirname(__FILE__) + '/fixtures/' + file_name, 'rb').read
387
400
  end
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.14
4
+ version: 5.0.15
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-09-17 00:00:00.000000000 Z
11
+ date: 2019-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: finapps_core
@@ -315,6 +315,7 @@ files:
315
315
  - lib/finapps/rest/plaid/plaid_account_permissions.rb
316
316
  - lib/finapps/rest/plaid/plaid_accounts.rb
317
317
  - lib/finapps/rest/plaid/plaid_consumer_institutions.rb
318
+ - lib/finapps/rest/plaid/plaid_institution_logos.rb
318
319
  - lib/finapps/rest/plaid/plaid_resources.rb
319
320
  - lib/finapps/rest/plaid/plaid_webhooks.rb
320
321
  - lib/finapps/rest/portfolio_reports.rb
@@ -350,6 +351,7 @@ files:
350
351
  - spec/rest/plaid/plaid_account_permissions_spec.rb
351
352
  - spec/rest/plaid/plaid_accounts_spec.rb
352
353
  - spec/rest/plaid/plaid_consumer_institutions_spec.rb
354
+ - spec/rest/plaid/plaid_institution_logos_spec.rb
353
355
  - spec/rest/plaid/plaid_webhooks_spec.rb
354
356
  - spec/rest/portfolio_reports_spec.rb
355
357
  - spec/rest/portfolios_alerts_spec.rb
@@ -394,6 +396,7 @@ files:
394
396
  - spec/support/fixtures/plaid/institution/consumer/list.json
395
397
  - spec/support/fixtures/plaid/institution/consumer/show.json
396
398
  - spec/support/fixtures/plaid/institution/consumer/show_accounts.json
399
+ - spec/support/fixtures/plaid/institution/logo.png
397
400
  - spec/support/fixtures/plaid/webhook.json
398
401
  - spec/support/fixtures/portfolio.json
399
402
  - spec/support/fixtures/portfolio_reports.json
@@ -446,6 +449,7 @@ test_files:
446
449
  - spec/rest/alert_definitions_spec.rb
447
450
  - spec/rest/portfolios_consumers_spec.rb
448
451
  - spec/rest/plaid/plaid_accounts_spec.rb
452
+ - spec/rest/plaid/plaid_institution_logos_spec.rb
449
453
  - spec/rest/plaid/plaid_webhooks_spec.rb
450
454
  - spec/rest/plaid/plaid_account_permissions_spec.rb
451
455
  - spec/rest/plaid/plaid_consumer_institutions_spec.rb