flinks 0.1.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4de60b81b0e43f8c1a4493b19e501b61de1d35f236261b0dc99ca8536fe83014
4
+ data.tar.gz: a82fa461c789793cd0fe97418efa9d6ff4503e3d28d8aff056181856a81ce916
5
+ SHA512:
6
+ metadata.gz: 306c83eaeae7c408653f8747b6fdeaa9c410c061a9bd9d3e75655d76265031aba9b8e9c6379b1a2b010dbd30be39fe95cfbfd1fb46f980a562cadacd124c6c41
7
+ data.tar.gz: 6933f7d439cc855c01a3fa4e29348aa3de337978cd9e80e27c2707a6745e2778c459947fa92157b25221df199b59564a3747af25c0f055255316b0ce225a1887
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,22 @@
1
+ source "https://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ gem 'http', '~> 3.0'
7
+ gem 'dry-validation', '~> 0.11'
8
+ gem 'dry-inflector', '~> 0.1'
9
+ gem 'dry-initializer', '~> 2.4'
10
+ gem 'activesupport', '>= 3.0'
11
+
12
+ # Add dependencies to develop your gem here.
13
+ # Include everything needed to run rake, tests, features, etc.
14
+ group :development do
15
+ gem 'rspec'
16
+ gem "shoulda", ">= 0"
17
+ gem "rdoc", "~> 3.12"
18
+ gem "bundler", "~> 1.0"
19
+ gem "juwelier", "~> 2.1.0"
20
+ gem "simplecov", ">= 0"
21
+ gem 'webmock'
22
+ end
@@ -0,0 +1,159 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ activesupport (5.1.4)
5
+ concurrent-ruby (~> 1.0, >= 1.0.2)
6
+ i18n (~> 0.7)
7
+ minitest (~> 5.1)
8
+ tzinfo (~> 1.1)
9
+ addressable (2.5.2)
10
+ public_suffix (>= 2.0.2, < 4.0)
11
+ builder (3.2.3)
12
+ concurrent-ruby (1.0.5)
13
+ crack (0.4.3)
14
+ safe_yaml (~> 1.0.0)
15
+ descendants_tracker (0.0.4)
16
+ thread_safe (~> 0.3, >= 0.3.1)
17
+ diff-lcs (1.3)
18
+ docile (1.1.5)
19
+ domain_name (0.5.20170404)
20
+ unf (>= 0.0.5, < 1.0.0)
21
+ dry-configurable (0.7.0)
22
+ concurrent-ruby (~> 1.0)
23
+ dry-container (0.6.0)
24
+ concurrent-ruby (~> 1.0)
25
+ dry-configurable (~> 0.1, >= 0.1.3)
26
+ dry-core (0.4.2)
27
+ concurrent-ruby (~> 1.0)
28
+ dry-equalizer (0.2.0)
29
+ dry-inflector (0.1.1)
30
+ dry-initializer (2.4.0)
31
+ dry-logic (0.4.2)
32
+ dry-container (~> 0.2, >= 0.2.6)
33
+ dry-core (~> 0.2)
34
+ dry-equalizer (~> 0.2)
35
+ dry-types (0.12.2)
36
+ concurrent-ruby (~> 1.0)
37
+ dry-configurable (~> 0.1)
38
+ dry-container (~> 0.3)
39
+ dry-core (~> 0.2, >= 0.2.1)
40
+ dry-equalizer (~> 0.2)
41
+ dry-logic (~> 0.4, >= 0.4.2)
42
+ inflecto (~> 0.0.0, >= 0.0.2)
43
+ dry-validation (0.11.1)
44
+ concurrent-ruby (~> 1.0)
45
+ dry-configurable (~> 0.1, >= 0.1.3)
46
+ dry-core (~> 0.2, >= 0.2.1)
47
+ dry-equalizer (~> 0.2)
48
+ dry-logic (~> 0.4, >= 0.4.0)
49
+ dry-types (~> 0.12.0)
50
+ faraday (0.12.2)
51
+ multipart-post (>= 1.2, < 3)
52
+ git (1.3.0)
53
+ github_api (0.18.2)
54
+ addressable (~> 2.4)
55
+ descendants_tracker (~> 0.0.4)
56
+ faraday (~> 0.8)
57
+ hashie (~> 3.5, >= 3.5.2)
58
+ oauth2 (~> 1.0)
59
+ hashdiff (0.3.7)
60
+ hashie (3.5.7)
61
+ highline (1.7.10)
62
+ http (3.0.0)
63
+ addressable (~> 2.3)
64
+ http-cookie (~> 1.0)
65
+ http-form_data (>= 2.0.0.pre.pre2, < 3)
66
+ http_parser.rb (~> 0.6.0)
67
+ http-cookie (1.0.3)
68
+ domain_name (~> 0.5)
69
+ http-form_data (2.0.0)
70
+ http_parser.rb (0.6.0)
71
+ i18n (0.9.3)
72
+ concurrent-ruby (~> 1.0)
73
+ inflecto (0.0.2)
74
+ json (1.8.6)
75
+ juwelier (2.1.3)
76
+ builder
77
+ bundler (>= 1.13)
78
+ git (>= 1.2.5)
79
+ github_api
80
+ highline (>= 1.6.15)
81
+ nokogiri (>= 1.5.10)
82
+ rake
83
+ rdoc
84
+ semver
85
+ jwt (1.5.6)
86
+ mini_portile2 (2.3.0)
87
+ minitest (5.11.3)
88
+ multi_json (1.13.1)
89
+ multi_xml (0.6.0)
90
+ multipart-post (2.0.0)
91
+ nokogiri (1.8.2)
92
+ mini_portile2 (~> 2.3.0)
93
+ oauth2 (1.4.0)
94
+ faraday (>= 0.8, < 0.13)
95
+ jwt (~> 1.0)
96
+ multi_json (~> 1.3)
97
+ multi_xml (~> 0.5)
98
+ rack (>= 1.2, < 3)
99
+ public_suffix (3.0.1)
100
+ rack (2.0.4)
101
+ rake (12.3.0)
102
+ rdoc (3.12.2)
103
+ json (~> 1.4)
104
+ rspec (3.7.0)
105
+ rspec-core (~> 3.7.0)
106
+ rspec-expectations (~> 3.7.0)
107
+ rspec-mocks (~> 3.7.0)
108
+ rspec-core (3.7.1)
109
+ rspec-support (~> 3.7.0)
110
+ rspec-expectations (3.7.0)
111
+ diff-lcs (>= 1.2.0, < 2.0)
112
+ rspec-support (~> 3.7.0)
113
+ rspec-mocks (3.7.0)
114
+ diff-lcs (>= 1.2.0, < 2.0)
115
+ rspec-support (~> 3.7.0)
116
+ rspec-support (3.7.1)
117
+ safe_yaml (1.0.4)
118
+ semver (1.0.1)
119
+ shoulda (3.5.0)
120
+ shoulda-context (~> 1.0, >= 1.0.1)
121
+ shoulda-matchers (>= 1.4.1, < 3.0)
122
+ shoulda-context (1.2.2)
123
+ shoulda-matchers (2.8.0)
124
+ activesupport (>= 3.0.0)
125
+ simplecov (0.15.1)
126
+ docile (~> 1.1.0)
127
+ json (>= 1.8, < 3)
128
+ simplecov-html (~> 0.10.0)
129
+ simplecov-html (0.10.2)
130
+ thread_safe (0.3.6)
131
+ tzinfo (1.2.4)
132
+ thread_safe (~> 0.1)
133
+ unf (0.1.4)
134
+ unf_ext
135
+ unf_ext (0.0.7.4)
136
+ webmock (3.3.0)
137
+ addressable (>= 2.3.6)
138
+ crack (>= 0.3.2)
139
+ hashdiff
140
+
141
+ PLATFORMS
142
+ ruby
143
+
144
+ DEPENDENCIES
145
+ activesupport (>= 3.0)
146
+ bundler (~> 1.0)
147
+ dry-inflector (~> 0.1)
148
+ dry-initializer (~> 2.4)
149
+ dry-validation (~> 0.11)
150
+ http (~> 3.0)
151
+ juwelier (~> 2.1.0)
152
+ rdoc (~> 3.12)
153
+ rspec
154
+ shoulda
155
+ simplecov
156
+ webmock
157
+
158
+ BUNDLED WITH
159
+ 1.16.1
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2018 Philippe Dionne
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,82 @@
1
+ # Flinks
2
+
3
+ A ruby client for the [Flinks](https://flinks.io) API.
4
+
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/phildionne/flinks.svg)](https://gemnasium.com/github.com/phildionne/flinks)
6
+ [![Gem Version](https://badge.fury.io/rb/flinks.svg)](https://badge.fury.io/rb/flinks)
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ gem install flinks
12
+ ```
13
+
14
+ Or with bundler:
15
+
16
+ ```ruby
17
+ gem 'flinks', require: 'flinks'
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ This library needs to be configured with your API customer ID.
23
+
24
+ ```ruby
25
+ flinks = Flinks.new(customer_id: ENV['FLINKS_CUSTOMER_ID'])
26
+ ```
27
+
28
+ Configure `on_error` to catch API requests returning a 400..599 HTTP status.
29
+
30
+ ```ruby
31
+ flinks = Flinks.new({
32
+ customer_id: ENV['FLINKS_CUSTOMER_ID'],
33
+ on_error: Proc.new do |status, message, body|
34
+ p [status, message, body]
35
+ end
36
+ })
37
+ ```
38
+
39
+ Configure `debug` to print every API responses.
40
+
41
+ ```ruby
42
+ flinks = Flinks.new({
43
+ customer_id: ENV['FLINKS_CUSTOMER_ID'],
44
+ debug: true
45
+ })
46
+ ```
47
+
48
+ ### Endpoints
49
+
50
+ #### Account
51
+
52
+ - `accounts_summary(request_id:, options:)`
53
+ - `accounts_summary_async(request_id:)`
54
+ - `accounts_detail(request_id:, options:)`
55
+ - `accounts_detail_async(request_id:)`
56
+
57
+ #### Card
58
+
59
+ - `delete_card(card_id:)`
60
+
61
+ #### Refresh
62
+
63
+ - `activate_scheduled_refresh(login_id:)`
64
+ - `deactivate_scheduled_refresh(login_id:)`
65
+ - `set_scheduled_refresh(activated, login_id:)`
66
+
67
+ #### Statement
68
+
69
+ - `statements(options:)`
70
+ - `statements_async(request_id:)`
71
+
72
+ ## Documentation
73
+
74
+ See the [API docs](https://sandbox-api.flinks.io).
75
+
76
+ ## Development
77
+
78
+ Run all tests:
79
+
80
+ ```bash
81
+ bundle exec rspec
82
+ ```
@@ -0,0 +1,49 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+ require 'juwelier'
14
+ Juwelier::Tasks.new do |gem|
15
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
16
+ gem.name = "flinks"
17
+ gem.homepage = "http://github.com/phildionne/flinks"
18
+ gem.license = "MIT"
19
+ gem.summary = %Q{Flinks API client}
20
+ gem.description = %Q{Flinks financial services API client}
21
+ gem.email = "dionne.phil@gmail.com"
22
+ gem.authors = ["Philippe Dionne"]
23
+
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Juwelier::RubygemsDotOrgTasks.new
27
+ require 'rspec/core'
28
+ require 'rspec/core/rake_task'
29
+ RSpec::Core::RakeTask.new(:spec) do |spec|
30
+ spec.pattern = FileList['spec/**/*_spec.rb']
31
+ end
32
+
33
+ desc "Code coverage detail"
34
+ task :simplecov do
35
+ ENV['COVERAGE'] = "true"
36
+ Rake::Task['spec'].execute
37
+ end
38
+
39
+ task :default => :spec
40
+
41
+ require 'rdoc/task'
42
+ Rake::RDocTask.new do |rdoc|
43
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
+
45
+ rdoc.rdoc_dir = 'rdoc'
46
+ rdoc.title = "flinks #{version}"
47
+ rdoc.rdoc_files.include('README*')
48
+ rdoc.rdoc_files.include('lib/**/*.rb')
49
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,96 @@
1
+ # Generated by juwelier
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: flinks 0.1.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "flinks".freeze
9
+ s.version = "0.1.0"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Philippe Dionne".freeze]
14
+ s.date = "2018-02-05"
15
+ s.description = "Flinks financial services API client".freeze
16
+ s.email = "dionne.phil@gmail.com".freeze
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.md"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.md",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "flinks.gemspec",
30
+ "lib/flinks.rb",
31
+ "lib/flinks/api/account.rb",
32
+ "lib/flinks/api/card.rb",
33
+ "lib/flinks/api/refresh.rb",
34
+ "lib/flinks/api/statement.rb",
35
+ "lib/flinks/client.rb",
36
+ "lib/flinks/error.rb",
37
+ "lib/flinks/request.rb",
38
+ "lib/flinks/version.rb",
39
+ "spec/lib/api/account.rb",
40
+ "spec/lib/api/card.rb",
41
+ "spec/lib/api/refresh.rb",
42
+ "spec/lib/api/statement.rb",
43
+ "spec/lib/client_spec.rb",
44
+ "spec/spec_helper.rb"
45
+ ]
46
+ s.homepage = "http://github.com/phildionne/flinks".freeze
47
+ s.licenses = ["MIT".freeze]
48
+ s.rubygems_version = "2.7.3".freeze
49
+ s.summary = "Flinks API client".freeze
50
+
51
+ if s.respond_to? :specification_version then
52
+ s.specification_version = 4
53
+
54
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
+ s.add_runtime_dependency(%q<http>.freeze, ["~> 3.0"])
56
+ s.add_runtime_dependency(%q<dry-validation>.freeze, ["~> 0.11"])
57
+ s.add_runtime_dependency(%q<dry-inflector>.freeze, ["~> 0.1"])
58
+ s.add_runtime_dependency(%q<dry-initializer>.freeze, ["~> 2.4"])
59
+ s.add_runtime_dependency(%q<activesupport>.freeze, [">= 3.0"])
60
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
61
+ s.add_development_dependency(%q<shoulda>.freeze, [">= 0"])
62
+ s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
63
+ s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0"])
64
+ s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
65
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
66
+ s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
67
+ else
68
+ s.add_dependency(%q<http>.freeze, ["~> 3.0"])
69
+ s.add_dependency(%q<dry-validation>.freeze, ["~> 0.11"])
70
+ s.add_dependency(%q<dry-inflector>.freeze, ["~> 0.1"])
71
+ s.add_dependency(%q<dry-initializer>.freeze, ["~> 2.4"])
72
+ s.add_dependency(%q<activesupport>.freeze, [">= 3.0"])
73
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
74
+ s.add_dependency(%q<shoulda>.freeze, [">= 0"])
75
+ s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
76
+ s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
77
+ s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
78
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
79
+ s.add_dependency(%q<webmock>.freeze, [">= 0"])
80
+ end
81
+ else
82
+ s.add_dependency(%q<http>.freeze, ["~> 3.0"])
83
+ s.add_dependency(%q<dry-validation>.freeze, ["~> 0.11"])
84
+ s.add_dependency(%q<dry-inflector>.freeze, ["~> 0.1"])
85
+ s.add_dependency(%q<dry-initializer>.freeze, ["~> 2.4"])
86
+ s.add_dependency(%q<activesupport>.freeze, [">= 3.0"])
87
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
88
+ s.add_dependency(%q<shoulda>.freeze, [">= 0"])
89
+ s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
90
+ s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
91
+ s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
92
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
93
+ s.add_dependency(%q<webmock>.freeze, [">= 0"])
94
+ end
95
+ end
96
+