finapps 2.2.16 → 2.2.17

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: f0cda25c6e2225f625bd95b7b123d9241283469d
4
- data.tar.gz: bb864886658d7466c0074f3aef4f1fd68f439e31
3
+ metadata.gz: 2060081ac7ed6cd7f597e3b6e2319d5132245e47
4
+ data.tar.gz: 4085a14172157f3474b7499ed6ce5f550ac05dd8
5
5
  SHA512:
6
- metadata.gz: 9386906c609c3faecbb2fca45d1d4b65d9fd4983032e2ec1f1dcd2bcfc6c91f9f31656942146836843f9a3600e55a2ca46ee3071fd549a58a81a19028b420962
7
- data.tar.gz: 3c83ff8cddfb7666328b6f376508d73a5e7566aa4826bd06635f85a66a528d855efdb126b2d029f8bad17965a39b68039801d6d03cd973342866e2768c547623
6
+ metadata.gz: 45af42879afbbc05f45b4d40f205cbf7c8ef8bac952cc9c924011b283cf3aebacd07413d36779ba0c76f4687ab6c17af7aef516ac15651b745bf49d14df74328
7
+ data.tar.gz: 6d3a2a5eff6ff4c3f744eaead1966ab1ad12a66eeef019ffd13cee59b0bc2ae94389fa40052191ce0d5947fb6457ba153e356f8553e32bdcbca4672edd35157d
data/lib/finapps.rb CHANGED
@@ -23,6 +23,7 @@ require 'finapps/rest/order_statuses'
23
23
  require 'finapps/rest/password_resets'
24
24
  require 'finapps/rest/operators'
25
25
  require 'finapps/rest/operators_password_resets'
26
+ require 'finapps/rest/products'
26
27
  require 'finapps/utils/query_builder'
27
28
 
28
29
  # require 'finapps/rest/configuration'
@@ -14,6 +14,7 @@ module FinApps
14
14
  order_tokens
15
15
  operators
16
16
  password_resets
17
+ products
17
18
  sessions
18
19
  consumers
19
20
  user_institutions
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+ module FinApps
3
+ module REST
4
+ class Products < FinAppsCore::REST::Resources
5
+ end
6
+ end
7
+ end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module FinApps
3
- VERSION = '2.2.16'
3
+ VERSION = '2.2.17'
4
4
  end
@@ -71,6 +71,10 @@ RSpec.describe FinApps::REST::Client do
71
71
  it { expect(subject.operators).to be_an_instance_of(FinApps::REST::Operators) }
72
72
  end
73
73
 
74
+ describe '#products' do
75
+ it { expect(subject.products).to be_an_instance_of(FinApps::REST::Products) }
76
+ end
77
+
74
78
  FinApps::REST::Client::RESOURCES.each do |method|
75
79
  it "memoizes the result of #{method}" do
76
80
  first = subject.send(method)
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+ require 'spec_helpers/client'
3
+
4
+ RSpec.describe FinApps::REST::Products, 'initialized with valid FinApps::Client object' do
5
+ include SpecHelpers::Client
6
+ subject(:products) { FinApps::REST::Products.new(client) }
7
+
8
+ describe '#list' do
9
+ context 'when called' do
10
+ let(:list) { subject.list }
11
+ let(:results) { list[0] }
12
+ let(:error_messages) { list[1] }
13
+
14
+ it { expect { list }.not_to raise_error }
15
+ it('returns an array of records') { expect(results).to be_a(Array) }
16
+ it('performs a get and returns the response') { expect(results[0]).to respond_to(:code) }
17
+ it('returns no error messages') { expect(error_messages).to be_empty }
18
+ end
19
+ end
20
+ end
@@ -131,6 +131,9 @@ class FakeApi < Sinatra::Base
131
131
  end
132
132
  put('/v2/tenant/invalid_user_id/password') { json_response 404, 'resource_not_found.json' }
133
133
 
134
+ # products
135
+ get('/v2/products') { json_response 200, 'products.json' }
136
+
134
137
  # relevance
135
138
  get('/v2/relevance/ruleset/names') { json_response 200, 'relevance_ruleset_names.json' }
136
139
 
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "code" : "mav-o-en",
4
+ "description" : "Mav product",
5
+ "flow_type" : 1
6
+ }
7
+ ]
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: 2.2.16
4
+ version: 2.2.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: 2017-04-24 00:00:00.000000000 Z
11
+ date: 2017-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: finapps_core
@@ -244,6 +244,7 @@ files:
244
244
  - lib/finapps/rest/order_tokens.rb
245
245
  - lib/finapps/rest/orders.rb
246
246
  - lib/finapps/rest/password_resets.rb
247
+ - lib/finapps/rest/products.rb
247
248
  - lib/finapps/rest/sessions.rb
248
249
  - lib/finapps/rest/user_institutions.rb
249
250
  - lib/finapps/rest/user_institutions_forms.rb
@@ -263,6 +264,7 @@ files:
263
264
  - spec/rest/order_tokens_spec.rb
264
265
  - spec/rest/orders_spec.rb
265
266
  - spec/rest/password_resets_spec.rb
267
+ - spec/rest/products_spec.rb
266
268
  - spec/rest/sessions_spec.rb
267
269
  - spec/rest/user_institutions_forms_spec.rb
268
270
  - spec/rest/user_institutions_spec.rb
@@ -289,6 +291,7 @@ files:
289
291
  - spec/support/fixtures/order_token.json
290
292
  - spec/support/fixtures/orders.json
291
293
  - spec/support/fixtures/password_reset_token.json
294
+ - spec/support/fixtures/products.json
292
295
  - spec/support/fixtures/resource.json
293
296
  - spec/support/fixtures/resource_not_found.json
294
297
  - spec/support/fixtures/resources.json
@@ -326,12 +329,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
326
329
  version: '0'
327
330
  requirements: []
328
331
  rubyforge_project:
329
- rubygems_version: 2.6.10
332
+ rubygems_version: 2.6.12
330
333
  signing_key:
331
334
  specification_version: 4
332
335
  summary: FinApps REST API ruby client.
333
336
  test_files:
334
337
  - spec/rest/operators_password_resets_spec.rb
338
+ - spec/rest/products_spec.rb
335
339
  - spec/rest/version_spec.rb
336
340
  - spec/rest/user_institutions_forms_spec.rb
337
341
  - spec/rest/consumers_spec.rb