fidor_api 1.0.0 → 2.0.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -49
- data/Rakefile +6 -3
- data/lib/fidor_api/client/authentication.rb +63 -0
- data/lib/fidor_api/client/configuration.rb +32 -0
- data/lib/fidor_api/client/connection.rb +56 -0
- data/lib/fidor_api/client/dsl/confirmable_actions.rb +19 -0
- data/lib/fidor_api/client/dsl/core_data.rb +19 -0
- data/lib/fidor_api/client/dsl/messages.rb +31 -0
- data/lib/fidor_api/client/dsl/transactions.rb +15 -0
- data/lib/fidor_api/client/dsl/transfers/classic.rb +29 -0
- data/lib/fidor_api/client/dsl/transfers/generic.rb +34 -0
- data/lib/fidor_api/client/dsl/transfers.rb +22 -0
- data/lib/fidor_api/client/dsl.rb +59 -0
- data/lib/fidor_api/client.rb +17 -21
- data/lib/fidor_api/collection/kaminari_support.rb +17 -0
- data/lib/fidor_api/collection.rb +18 -34
- data/lib/fidor_api/environment/base.rb +21 -0
- data/lib/fidor_api/environment/fidor_de/production.rb +23 -0
- data/lib/fidor_api/environment/fidor_de/sandbox.rb +23 -0
- data/lib/fidor_api/environment/fidor_de.rb +8 -0
- data/lib/fidor_api/environment/future.rb +21 -0
- data/lib/fidor_api/environment.rb +7 -0
- data/lib/fidor_api/errors.rb +3 -26
- data/lib/fidor_api/model/account.rb +25 -0
- data/lib/fidor_api/model/base.rb +44 -0
- data/lib/fidor_api/model/confirmable_action.rb +9 -0
- data/lib/fidor_api/model/customer.rb +36 -0
- data/lib/fidor_api/model/helpers/action_view_support.rb +21 -0
- data/lib/fidor_api/model/helpers/attribute_decimal_methods.rb +32 -0
- data/lib/fidor_api/model/helpers.rb +8 -0
- data/lib/fidor_api/model/message.rb +23 -0
- data/lib/fidor_api/model/transaction.rb +21 -0
- data/lib/fidor_api/model/transfer/classic/base.rb +15 -0
- data/lib/fidor_api/model/transfer/classic/internal.rb +20 -0
- data/lib/fidor_api/model/transfer/classic/sepa.rb +11 -0
- data/lib/fidor_api/model/transfer/classic.rb +11 -0
- data/lib/fidor_api/model/transfer/generic.rb +71 -0
- data/lib/fidor_api/model/transfer.rb +8 -0
- data/lib/fidor_api/model/user.rb +10 -0
- data/lib/fidor_api/model.rb +13 -0
- data/lib/fidor_api/token.rb +13 -18
- data/lib/fidor_api/version.rb +1 -1
- data/lib/fidor_api.rb +14 -58
- metadata +152 -89
- data/.gitignore +0 -11
- data/.rspec +0 -2
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.travis.yml +0 -20
- data/CHANGELOG.md +0 -129
- data/Gemfile +0 -15
- data/LICENSE.txt +0 -21
- data/bin/console +0 -14
- data/bin/setup +0 -7
- data/fidor_api.gemspec +0 -24
- data/lib/fidor_api/account.rb +0 -45
- data/lib/fidor_api/amount_attributes.rb +0 -30
- data/lib/fidor_api/approval_required.rb +0 -9
- data/lib/fidor_api/auth.rb +0 -45
- data/lib/fidor_api/beneficiary/ach.rb +0 -39
- data/lib/fidor_api/beneficiary/base.rb +0 -118
- data/lib/fidor_api/beneficiary/generic.rb +0 -24
- data/lib/fidor_api/beneficiary/p2p_account_number.rb +0 -14
- data/lib/fidor_api/beneficiary/p2p_phone.rb +0 -14
- data/lib/fidor_api/beneficiary/p2p_username.rb +0 -14
- data/lib/fidor_api/beneficiary/swift.rb +0 -35
- data/lib/fidor_api/beneficiary/unknown.rb +0 -16
- data/lib/fidor_api/beneficiary/utility.rb +0 -35
- data/lib/fidor_api/beneficiary.rb +0 -27
- data/lib/fidor_api/card.rb +0 -77
- data/lib/fidor_api/card_limit_attribute.rb +0 -52
- data/lib/fidor_api/card_limits.rb +0 -14
- data/lib/fidor_api/confirmable_action.rb +0 -45
- data/lib/fidor_api/connectivity/connection.rb +0 -113
- data/lib/fidor_api/connectivity/endpoint.rb +0 -82
- data/lib/fidor_api/connectivity/resource.rb +0 -76
- data/lib/fidor_api/connectivity.rb +0 -17
- data/lib/fidor_api/constants.rb +0 -3
- data/lib/fidor_api/customer.rb +0 -140
- data/lib/fidor_api/customers/confirmations.rb +0 -19
- data/lib/fidor_api/message.rb +0 -52
- data/lib/fidor_api/msisdn.rb +0 -45
- data/lib/fidor_api/password.rb +0 -29
- data/lib/fidor_api/preauth.rb +0 -33
- data/lib/fidor_api/preauth_details.rb +0 -97
- data/lib/fidor_api/session_token.rb +0 -20
- data/lib/fidor_api/transaction.rb +0 -37
- data/lib/fidor_api/transaction_details.rb +0 -119
- data/lib/fidor_api/transfer/ach.rb +0 -46
- data/lib/fidor_api/transfer/bank_internal.rb +0 -37
- data/lib/fidor_api/transfer/base.rb +0 -36
- data/lib/fidor_api/transfer/fps.rb +0 -56
- data/lib/fidor_api/transfer/generic.rb +0 -134
- data/lib/fidor_api/transfer/internal.rb +0 -53
- data/lib/fidor_api/transfer/p2p_account_number.rb +0 -45
- data/lib/fidor_api/transfer/p2p_phone.rb +0 -45
- data/lib/fidor_api/transfer/p2p_username.rb +0 -45
- data/lib/fidor_api/transfer/sepa.rb +0 -56
- data/lib/fidor_api/transfer/swift.rb +0 -49
- data/lib/fidor_api/transfer/utility.rb +0 -50
- data/lib/fidor_api/transfer.rb +0 -17
- data/lib/fidor_api/user.rb +0 -24
metadata
CHANGED
@@ -1,155 +1,218 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fidor_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.alpha1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fidor Solutions AG
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2018-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activemodel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5.0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: faraday
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
33
|
+
version: '0.15'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
40
|
+
version: '0.15'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: faraday_middleware
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- - "
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.12'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
32
53
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
|
54
|
+
version: '0.12'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: model_attribute
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
35
60
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
61
|
+
version: '3.2'
|
37
62
|
type: :runtime
|
38
63
|
prerelease: false
|
39
64
|
version_requirements: !ruby/object:Gem::Requirement
|
40
65
|
requirements:
|
41
|
-
- - "
|
66
|
+
- - "~>"
|
42
67
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
44
|
-
|
68
|
+
version: '3.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
45
74
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
75
|
+
version: '1.16'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.16'
|
47
83
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
84
|
+
name: byebug
|
49
85
|
requirement: !ruby/object:Gem::Requirement
|
50
86
|
requirements:
|
51
|
-
- - "
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
52
95
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
54
|
-
|
96
|
+
version: '10.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
55
102
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
57
|
-
type: :
|
103
|
+
version: '10.0'
|
104
|
+
type: :development
|
58
105
|
prerelease: false
|
59
106
|
version_requirements: !ruby/object:Gem::Requirement
|
60
107
|
requirements:
|
61
|
-
- - "
|
108
|
+
- - "~>"
|
62
109
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
64
|
-
|
110
|
+
version: '10.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
65
123
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
124
|
+
version: '3.0'
|
67
125
|
- !ruby/object:Gem::Dependency
|
68
|
-
name:
|
126
|
+
name: rubocop
|
69
127
|
requirement: !ruby/object:Gem::Requirement
|
70
128
|
requirements:
|
71
129
|
- - "~>"
|
72
130
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
74
|
-
type: :
|
131
|
+
version: '0.58'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.58'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.10'
|
146
|
+
type: :development
|
75
147
|
prerelease: false
|
76
148
|
version_requirements: !ruby/object:Gem::Requirement
|
77
149
|
requirements:
|
78
150
|
- - "~>"
|
79
151
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
81
|
-
|
152
|
+
version: '0.10'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: webmock
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.4'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.4'
|
167
|
+
description:
|
82
168
|
email:
|
83
169
|
- connect@fidor.com
|
84
170
|
executables: []
|
85
171
|
extensions: []
|
86
172
|
extra_rdoc_files: []
|
87
173
|
files:
|
88
|
-
- ".gitignore"
|
89
|
-
- ".rspec"
|
90
|
-
- ".ruby-gemset"
|
91
|
-
- ".ruby-version"
|
92
|
-
- ".travis.yml"
|
93
|
-
- CHANGELOG.md
|
94
|
-
- Gemfile
|
95
|
-
- LICENSE.txt
|
96
174
|
- README.md
|
97
175
|
- Rakefile
|
98
|
-
- bin/console
|
99
|
-
- bin/setup
|
100
|
-
- fidor_api.gemspec
|
101
176
|
- lib/fidor_api.rb
|
102
|
-
- lib/fidor_api/account.rb
|
103
|
-
- lib/fidor_api/amount_attributes.rb
|
104
|
-
- lib/fidor_api/approval_required.rb
|
105
|
-
- lib/fidor_api/auth.rb
|
106
|
-
- lib/fidor_api/beneficiary.rb
|
107
|
-
- lib/fidor_api/beneficiary/ach.rb
|
108
|
-
- lib/fidor_api/beneficiary/base.rb
|
109
|
-
- lib/fidor_api/beneficiary/generic.rb
|
110
|
-
- lib/fidor_api/beneficiary/p2p_account_number.rb
|
111
|
-
- lib/fidor_api/beneficiary/p2p_phone.rb
|
112
|
-
- lib/fidor_api/beneficiary/p2p_username.rb
|
113
|
-
- lib/fidor_api/beneficiary/swift.rb
|
114
|
-
- lib/fidor_api/beneficiary/unknown.rb
|
115
|
-
- lib/fidor_api/beneficiary/utility.rb
|
116
|
-
- lib/fidor_api/card.rb
|
117
|
-
- lib/fidor_api/card_limit_attribute.rb
|
118
|
-
- lib/fidor_api/card_limits.rb
|
119
177
|
- lib/fidor_api/client.rb
|
178
|
+
- lib/fidor_api/client/authentication.rb
|
179
|
+
- lib/fidor_api/client/configuration.rb
|
180
|
+
- lib/fidor_api/client/connection.rb
|
181
|
+
- lib/fidor_api/client/dsl.rb
|
182
|
+
- lib/fidor_api/client/dsl/confirmable_actions.rb
|
183
|
+
- lib/fidor_api/client/dsl/core_data.rb
|
184
|
+
- lib/fidor_api/client/dsl/messages.rb
|
185
|
+
- lib/fidor_api/client/dsl/transactions.rb
|
186
|
+
- lib/fidor_api/client/dsl/transfers.rb
|
187
|
+
- lib/fidor_api/client/dsl/transfers/classic.rb
|
188
|
+
- lib/fidor_api/client/dsl/transfers/generic.rb
|
120
189
|
- lib/fidor_api/collection.rb
|
121
|
-
- lib/fidor_api/
|
122
|
-
- lib/fidor_api/
|
123
|
-
- lib/fidor_api/
|
124
|
-
- lib/fidor_api/
|
125
|
-
- lib/fidor_api/
|
126
|
-
- lib/fidor_api/
|
127
|
-
- lib/fidor_api/
|
128
|
-
- lib/fidor_api/customers/confirmations.rb
|
190
|
+
- lib/fidor_api/collection/kaminari_support.rb
|
191
|
+
- lib/fidor_api/environment.rb
|
192
|
+
- lib/fidor_api/environment/base.rb
|
193
|
+
- lib/fidor_api/environment/fidor_de.rb
|
194
|
+
- lib/fidor_api/environment/fidor_de/production.rb
|
195
|
+
- lib/fidor_api/environment/fidor_de/sandbox.rb
|
196
|
+
- lib/fidor_api/environment/future.rb
|
129
197
|
- lib/fidor_api/errors.rb
|
130
|
-
- lib/fidor_api/
|
131
|
-
- lib/fidor_api/
|
132
|
-
- lib/fidor_api/
|
133
|
-
- lib/fidor_api/
|
134
|
-
- lib/fidor_api/
|
135
|
-
- lib/fidor_api/
|
198
|
+
- lib/fidor_api/model.rb
|
199
|
+
- lib/fidor_api/model/account.rb
|
200
|
+
- lib/fidor_api/model/base.rb
|
201
|
+
- lib/fidor_api/model/confirmable_action.rb
|
202
|
+
- lib/fidor_api/model/customer.rb
|
203
|
+
- lib/fidor_api/model/helpers.rb
|
204
|
+
- lib/fidor_api/model/helpers/action_view_support.rb
|
205
|
+
- lib/fidor_api/model/helpers/attribute_decimal_methods.rb
|
206
|
+
- lib/fidor_api/model/message.rb
|
207
|
+
- lib/fidor_api/model/transaction.rb
|
208
|
+
- lib/fidor_api/model/transfer.rb
|
209
|
+
- lib/fidor_api/model/transfer/classic.rb
|
210
|
+
- lib/fidor_api/model/transfer/classic/base.rb
|
211
|
+
- lib/fidor_api/model/transfer/classic/internal.rb
|
212
|
+
- lib/fidor_api/model/transfer/classic/sepa.rb
|
213
|
+
- lib/fidor_api/model/transfer/generic.rb
|
214
|
+
- lib/fidor_api/model/user.rb
|
136
215
|
- lib/fidor_api/token.rb
|
137
|
-
- lib/fidor_api/transaction.rb
|
138
|
-
- lib/fidor_api/transaction_details.rb
|
139
|
-
- lib/fidor_api/transfer.rb
|
140
|
-
- lib/fidor_api/transfer/ach.rb
|
141
|
-
- lib/fidor_api/transfer/bank_internal.rb
|
142
|
-
- lib/fidor_api/transfer/base.rb
|
143
|
-
- lib/fidor_api/transfer/fps.rb
|
144
|
-
- lib/fidor_api/transfer/generic.rb
|
145
|
-
- lib/fidor_api/transfer/internal.rb
|
146
|
-
- lib/fidor_api/transfer/p2p_account_number.rb
|
147
|
-
- lib/fidor_api/transfer/p2p_phone.rb
|
148
|
-
- lib/fidor_api/transfer/p2p_username.rb
|
149
|
-
- lib/fidor_api/transfer/sepa.rb
|
150
|
-
- lib/fidor_api/transfer/swift.rb
|
151
|
-
- lib/fidor_api/transfer/utility.rb
|
152
|
-
- lib/fidor_api/user.rb
|
153
216
|
- lib/fidor_api/version.rb
|
154
217
|
homepage: https://github.com/fidor/fidor_api
|
155
218
|
licenses:
|
@@ -166,13 +229,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
229
|
version: '0'
|
167
230
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
231
|
requirements:
|
169
|
-
- - "
|
232
|
+
- - ">"
|
170
233
|
- !ruby/object:Gem::Version
|
171
|
-
version:
|
234
|
+
version: 1.3.1
|
172
235
|
requirements: []
|
173
236
|
rubyforge_project:
|
174
237
|
rubygems_version: 2.7.6
|
175
238
|
signing_key:
|
176
239
|
specification_version: 4
|
177
|
-
summary:
|
240
|
+
summary: Ruby client library to work with Fidor APIs
|
178
241
|
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
fidor-api-gem
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.5.0
|
data/.travis.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
branches:
|
2
|
-
only:
|
3
|
-
- master
|
4
|
-
|
5
|
-
language: ruby
|
6
|
-
|
7
|
-
rvm:
|
8
|
-
- "2.3.6"
|
9
|
-
- "2.4.3"
|
10
|
-
- "2.5.0"
|
11
|
-
|
12
|
-
before_install:
|
13
|
-
- gem install bundler
|
14
|
-
|
15
|
-
addons:
|
16
|
-
code_climate:
|
17
|
-
repo_token: 2b2b2a8c28682817f985f0afba1e5d643bcc801c6af1a1294869bc118742e95f
|
18
|
-
|
19
|
-
after_success:
|
20
|
-
- bundle exec codeclimate-test-reporter
|
data/CHANGELOG.md
DELETED
@@ -1,129 +0,0 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
## v1.0.0
|
4
|
-
|
5
|
-
* Nothing besides version jump
|
6
|
-
|
7
|
-
## v0.1.2
|
8
|
-
|
9
|
-
* Allow usage in rails 5.2 projects
|
10
|
-
* Small bugfix for getting current user and chaning passwords
|
11
|
-
* Bump used Ruby Versions in Dev & CI
|
12
|
-
|
13
|
-
## v0.1.1
|
14
|
-
|
15
|
-
* Allow usage in rails 5.1 projects
|
16
|
-
* Allow to pass custom `callback_url` in oAuth flow
|
17
|
-
|
18
|
-
## v0.1.0
|
19
|
-
|
20
|
-
With this release this gem will start following the semantic versioning approach.
|
21
|
-
|
22
|
-
**Note**: This version contains two major changes which will break existing applications:
|
23
|
-
|
24
|
-
### How to initiate the client:
|
25
|
-
|
26
|
-
Before:
|
27
|
-
|
28
|
-
```ruby
|
29
|
-
client = FidorApi::Client.new(token: FidorApi::Token.new(access_token: "f859032a6ca0a4abb2be0583b8347937"))
|
30
|
-
```
|
31
|
-
|
32
|
-
After:
|
33
|
-
|
34
|
-
```
|
35
|
-
FidorApi::Connectivity.access_token = "f859032a6ca0a4abb2be0583b8347937"
|
36
|
-
```
|
37
|
-
|
38
|
-
### How to create resources:
|
39
|
-
|
40
|
-
Before:
|
41
|
-
|
42
|
-
```ruby
|
43
|
-
transfer = client.build_internal_transfer(
|
44
|
-
account_id: 875,
|
45
|
-
receiver: "kycfull@fidor.de",
|
46
|
-
external_uid: "4279762F5",
|
47
|
-
subject: "Money for you",
|
48
|
-
amount: 1000
|
49
|
-
)
|
50
|
-
transfer.save
|
51
|
-
```
|
52
|
-
|
53
|
-
After:
|
54
|
-
|
55
|
-
```ruby
|
56
|
-
transfer = FidorApi::Transfer::Internal.new(
|
57
|
-
account_id: 875,
|
58
|
-
receiver: "kycfull@fidor.de",
|
59
|
-
external_uid: "4279762F5",
|
60
|
-
subject: "Money for you",
|
61
|
-
amount: 1000
|
62
|
-
)
|
63
|
-
transfer.save
|
64
|
-
```
|
65
|
-
|
66
|
-
* Also map errors returned on the `:base` field
|
67
|
-
* Support for `/transfers` and `/beneficiaries` endpoints` with routing types: (*Note*: Not supported in fidor.de & fidorbank.uk APIs)
|
68
|
-
* `ACH`
|
69
|
-
* `BANK_INTERNAL`
|
70
|
-
* `FOS_P2P_ACCOUNT_NUMBER`
|
71
|
-
* `FOS_P2P_PHONE`
|
72
|
-
* `FOS_P2P_USERNAME`
|
73
|
-
* `SWIFT`
|
74
|
-
* `UTILITY`
|
75
|
-
* Improve logger setup
|
76
|
-
* Add new `logger` config option to pass existing logger
|
77
|
-
* Add support for `faraday-detailed_logger` gem without adding additional dependency
|
78
|
-
* Support for `/confirmable/actions` endpoint
|
79
|
-
* New option `verify_ssl` (needed when testing against e.g. mock-services or fidor-internal test installations)
|
80
|
-
* Logging for `FidorApi::ClientError` cases
|
81
|
-
* New fields for contact- & bank-details in `/transfers` endpoint
|
82
|
-
* Support for `/session_tokens` endpoint
|
83
|
-
* Support for `/beneficiaries` endpoint
|
84
|
-
* Provide `total_entries` attribute in collections
|
85
|
-
* Support for `/messages/:id/content` endpoint
|
86
|
-
* Support for updating customer records
|
87
|
-
* New fields for customer endpoint
|
88
|
-
* Support Address attribute in cards endpoint
|
89
|
-
* Handle HTTP 303 with exception indicating the need to use confirmable-action
|
90
|
-
* Add unique_name attribute to beneficiaries
|
91
|
-
* Add support to activate and cancel cards
|
92
|
-
* Better mapping of error keys to support usage of i18n
|
93
|
-
* Suport for endpoints to reset & change password
|
94
|
-
* New way to build ressources (using `FidorApi::Transfers::ACH.new` instead of `client.build_ach_transfer`)
|
95
|
-
* Allow to update customers
|
96
|
-
* Improved Ruby 2.4 compatibility
|
97
|
-
|
98
|
-
## v0.0.2
|
99
|
-
|
100
|
-
All commits: https://github.com/klausmeyer/fidor_api/compare/v0.0.1...v0.0.2
|
101
|
-
|
102
|
-
* Gem can now be used in rails 5 projects
|
103
|
-
* `FidorApi::Client` added to improve token-management
|
104
|
-
* `remote_bic` field optional in `Transfer::SEPA`
|
105
|
-
* Amounts are now `BigDecimal` type
|
106
|
-
* `Resource#model_name` returns `Resource` instead of `FidorApi::Resource` now
|
107
|
-
* Collection implements `Enumerable`
|
108
|
-
* `Resource#persisted?` added to improve `ActiveRecord` style behaviour
|
109
|
-
* `Customer#gender` now returns `FidorApi::Customer::Gender`
|
110
|
-
* Basic support for signup (`Msisdn`, `Customer#save`)
|
111
|
-
* Support new endpoints
|
112
|
-
* `/cards`
|
113
|
-
* `/card_limits`
|
114
|
-
* `/messages`
|
115
|
-
* `/fps_payments` (:gb: specific)
|
116
|
-
* Provide validation errors returned in API in `Resource#errors`
|
117
|
-
|
118
|
-
## v0.0.1
|
119
|
-
|
120
|
-
* First release on rubygems.org
|
121
|
-
* oAuth support
|
122
|
-
* Basic support for the following endpoints:
|
123
|
-
* `/accounts`
|
124
|
-
* `/customers`
|
125
|
-
* `/preauths`
|
126
|
-
* `/transactions`
|
127
|
-
* `/internal_transfers`
|
128
|
-
* `/sepa_credit_transfers`
|
129
|
-
* `/users/current`
|
data/Gemfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
group :development, :test do
|
6
|
-
gem "bundler", "~> 1.10"
|
7
|
-
gem "byebug", "~> 8.2"
|
8
|
-
gem "rake", "~> 10.0"
|
9
|
-
gem "rspec", "~> 3.3"
|
10
|
-
gem "shoulda-matchers", "~> 2.8"
|
11
|
-
gem "vcr", "~> 3.0"
|
12
|
-
gem "webmock"
|
13
|
-
gem "simplecov"
|
14
|
-
gem "codeclimate-test-reporter", group: :test, require: nil
|
15
|
-
end
|
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015 Klaus Meyer
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "fidor_api"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
data/fidor_api.gemspec
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'fidor_api/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "fidor_api"
|
8
|
-
spec.version = FidorApi::VERSION
|
9
|
-
spec.authors = ["Fidor Solutions AG"]
|
10
|
-
spec.email = ["connect@fidor.com"]
|
11
|
-
|
12
|
-
spec.summary = "Simple ruby client for the Fidor Bank API"
|
13
|
-
spec.description = "Connect to the Fidor Bank API"
|
14
|
-
spec.homepage = "https://github.com/fidor/fidor_api"
|
15
|
-
spec.license = "MIT"
|
16
|
-
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
-
spec.require_paths = ["lib"]
|
19
|
-
|
20
|
-
spec.add_dependency "faraday", "~> 0.8"
|
21
|
-
spec.add_dependency "activesupport", ">= 4.2", "< 6.0"
|
22
|
-
spec.add_dependency "activemodel", ">= 4.2", "< 6.0"
|
23
|
-
spec.add_dependency "model_attribute", "~> 2.1"
|
24
|
-
end
|
data/lib/fidor_api/account.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
module FidorApi
|
2
|
-
class Account < Connectivity::Resource
|
3
|
-
extend ModelAttribute
|
4
|
-
extend AmountAttributes
|
5
|
-
|
6
|
-
self.endpoint = Connectivity::Endpoint.new('/accounts', :collection)
|
7
|
-
|
8
|
-
attribute :id, :integer
|
9
|
-
attribute :account_number, :string
|
10
|
-
attribute :iban, :string
|
11
|
-
attribute :bic, :string
|
12
|
-
attribute :is_debit_note_enabled, :boolean
|
13
|
-
attribute :is_trusted, :boolean
|
14
|
-
attribute :is_locked, :boolean
|
15
|
-
attribute :currency, :string
|
16
|
-
attribute :created_at, :time
|
17
|
-
attribute :updated_at, :time
|
18
|
-
attribute :customers, :string
|
19
|
-
|
20
|
-
amount_attribute :balance
|
21
|
-
amount_attribute :balance_available
|
22
|
-
amount_attribute :preauth_amount
|
23
|
-
amount_attribute :cash_flow_per_year
|
24
|
-
amount_attribute :overdraft
|
25
|
-
|
26
|
-
def self.first
|
27
|
-
all(page: 1, per_page: 1).first
|
28
|
-
end
|
29
|
-
|
30
|
-
def customers=(array)
|
31
|
-
@customers = array.map { |customer| Customer.new(customer) }
|
32
|
-
end
|
33
|
-
|
34
|
-
module ClientSupport
|
35
|
-
def accounts(options = {})
|
36
|
-
Account.all(options)
|
37
|
-
end
|
38
|
-
|
39
|
-
def first_account
|
40
|
-
Account.first
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
module FidorApi
|
2
|
-
module AmountAttributes
|
3
|
-
|
4
|
-
def self.extended(base)
|
5
|
-
base.instance_variable_set('@amount_attributes', [])
|
6
|
-
end
|
7
|
-
|
8
|
-
def amount_attribute(name)
|
9
|
-
@amount_attributes << name
|
10
|
-
|
11
|
-
define_method name do
|
12
|
-
BigDecimal.new((instance_variable_get("@#{name}") / 100.00).to_s) if instance_variable_get("@#{name}").present?
|
13
|
-
end
|
14
|
-
|
15
|
-
define_method "#{name}=" do |value|
|
16
|
-
if value.instance_of?(BigDecimal)
|
17
|
-
instance_variable_set("@#{name}", (value * 100.00).to_i)
|
18
|
-
elsif value.class.name.in?(INTEGER_CLASSES) || value.instance_of?(NilClass)
|
19
|
-
instance_variable_set("@#{name}", value)
|
20
|
-
else
|
21
|
-
raise ArgumentError, "Must be either Fixnum (1234) or BigDecimal (12.34)."
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def attributes
|
27
|
-
super + @amount_attributes
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|