bridge_bankin 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/main.yml +24 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.rubocop.yml +45 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +99 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +12 -0
- data/bin/console +16 -0
- data/bin/setup +8 -0
- data/bridge_bankin.gemspec +49 -0
- data/lib/bridge_bankin.rb +19 -0
- data/lib/bridge_bankin/account.rb +25 -0
- data/lib/bridge_bankin/api/client.rb +113 -0
- data/lib/bridge_bankin/api/error.rb +36 -0
- data/lib/bridge_bankin/api/resource.rb +18 -0
- data/lib/bridge_bankin/authorization.rb +23 -0
- data/lib/bridge_bankin/bank.rb +21 -0
- data/lib/bridge_bankin/bridge_object.rb +105 -0
- data/lib/bridge_bankin/category.rb +21 -0
- data/lib/bridge_bankin/configuration.rb +27 -0
- data/lib/bridge_bankin/connect.rb +51 -0
- data/lib/bridge_bankin/insight.rb +16 -0
- data/lib/bridge_bankin/item.rb +48 -0
- data/lib/bridge_bankin/object_types.rb +18 -0
- data/lib/bridge_bankin/resources.rb +13 -0
- data/lib/bridge_bankin/stock.rb +26 -0
- data/lib/bridge_bankin/transaction.rb +53 -0
- data/lib/bridge_bankin/transfer.rb +53 -0
- data/lib/bridge_bankin/user.rb +60 -0
- data/lib/bridge_bankin/version.rb +5 -0
- metadata +220 -0
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BridgeBankin
|
4
|
+
class Transfer < BridgeObject
|
5
|
+
RESOURCE_TYPE = "transfert"
|
6
|
+
|
7
|
+
class << self
|
8
|
+
include API::Resource
|
9
|
+
|
10
|
+
def send(access_token:, **params)
|
11
|
+
protected_resource(access_token) do
|
12
|
+
data = api_client.post("/v2/pay/transfer/url", params)
|
13
|
+
convert_to_bridge_object(data)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def list(access_token:, **params)
|
18
|
+
protected_resource(access_token) do
|
19
|
+
data = api_client.get("/v2/transfers", params)
|
20
|
+
convert_to_bridge_object(data)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def find(uuid:, access_token:, **params)
|
25
|
+
protected_resource(access_token) do
|
26
|
+
data = api_client.get("/v2/transfers/#{uuid}", params)
|
27
|
+
convert_to_bridge_object(data)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def list_all_sender_accounts(access_token:, **params)
|
32
|
+
protected_resource(access_token) do
|
33
|
+
data = api_client.get("/v2/transfers/accounts/senders", params)
|
34
|
+
convert_to_bridge_object(data)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def list_all_receiver_accounts(access_token:, **params)
|
39
|
+
protected_resource(access_token) do
|
40
|
+
data = api_client.get("/v2/transfers/accounts/receivers", params)
|
41
|
+
convert_to_bridge_object(data)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def list_receiver_accounts_for_sender(sender_account_id:, access_token:, **params)
|
46
|
+
protected_resource(access_token) do
|
47
|
+
data = api_client.get("/v2/transfers/accounts/#{sender_account_id}/receivers", params)
|
48
|
+
convert_to_bridge_object(data)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BridgeBankin
|
4
|
+
class User < BridgeObject
|
5
|
+
RESOURCE_TYPE = "user"
|
6
|
+
|
7
|
+
class << self
|
8
|
+
include API::Resource
|
9
|
+
|
10
|
+
def list(**params)
|
11
|
+
data = api_client.get("/v2/users", params)
|
12
|
+
convert_to_bridge_object(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def find(uuid:, **params)
|
16
|
+
data = api_client.get("/v2/users/#{uuid}", params)
|
17
|
+
convert_to_bridge_object(data)
|
18
|
+
end
|
19
|
+
|
20
|
+
def create(**params)
|
21
|
+
data = api_client.post("/v2/users", params)
|
22
|
+
convert_to_bridge_object(data)
|
23
|
+
end
|
24
|
+
|
25
|
+
def update_email(uuid:, **params)
|
26
|
+
data = api_client.put("/v2/users/#{uuid}/email", params)
|
27
|
+
convert_to_bridge_object(data)
|
28
|
+
end
|
29
|
+
|
30
|
+
def update_password(uuid:, **params)
|
31
|
+
data = api_client.put("/v2/users/#{uuid}/password", params)
|
32
|
+
convert_to_bridge_object(data)
|
33
|
+
end
|
34
|
+
|
35
|
+
def delete_user(uuid:, **params)
|
36
|
+
data = api_client.delete("/v2/users/#{uuid}", params)
|
37
|
+
convert_to_bridge_object(data)
|
38
|
+
end
|
39
|
+
|
40
|
+
def delete_all_users(**params)
|
41
|
+
data = api_client.delete("/v2/users", params)
|
42
|
+
convert_to_bridge_object(data)
|
43
|
+
end
|
44
|
+
|
45
|
+
def check_email_confirmation(access_token:, **params)
|
46
|
+
protected_resource(access_token) do
|
47
|
+
data = api_client.get("/v2/users/me/email/confirmation", params)
|
48
|
+
convert_to_bridge_object(data)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def manage_accounts(access_token:, **params)
|
53
|
+
protected_resource(access_token) do
|
54
|
+
data = api_client.get("/v2/users/manage/accounts/iban", params)
|
55
|
+
convert_to_bridge_object(data)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
metadata
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bridge_bankin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Olivier Buffon
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-12-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: awesome_print
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: shoulda-matchers
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: vcr
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: webmock
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
description: Thanks to a safe and automated access to bank data, Bridge powered by
|
154
|
+
Bankin’ provides competitive and smart solutions to build conversion-driver financial
|
155
|
+
services.
|
156
|
+
email:
|
157
|
+
- olivier@buffon.dev
|
158
|
+
executables: []
|
159
|
+
extensions: []
|
160
|
+
extra_rdoc_files: []
|
161
|
+
files:
|
162
|
+
- ".github/workflows/main.yml"
|
163
|
+
- ".gitignore"
|
164
|
+
- ".rspec"
|
165
|
+
- ".rubocop.yml"
|
166
|
+
- Gemfile
|
167
|
+
- Gemfile.lock
|
168
|
+
- LICENSE.txt
|
169
|
+
- README.md
|
170
|
+
- Rakefile
|
171
|
+
- bin/console
|
172
|
+
- bin/setup
|
173
|
+
- bridge_bankin.gemspec
|
174
|
+
- lib/bridge_bankin.rb
|
175
|
+
- lib/bridge_bankin/account.rb
|
176
|
+
- lib/bridge_bankin/api/client.rb
|
177
|
+
- lib/bridge_bankin/api/error.rb
|
178
|
+
- lib/bridge_bankin/api/resource.rb
|
179
|
+
- lib/bridge_bankin/authorization.rb
|
180
|
+
- lib/bridge_bankin/bank.rb
|
181
|
+
- lib/bridge_bankin/bridge_object.rb
|
182
|
+
- lib/bridge_bankin/category.rb
|
183
|
+
- lib/bridge_bankin/configuration.rb
|
184
|
+
- lib/bridge_bankin/connect.rb
|
185
|
+
- lib/bridge_bankin/insight.rb
|
186
|
+
- lib/bridge_bankin/item.rb
|
187
|
+
- lib/bridge_bankin/object_types.rb
|
188
|
+
- lib/bridge_bankin/resources.rb
|
189
|
+
- lib/bridge_bankin/stock.rb
|
190
|
+
- lib/bridge_bankin/transaction.rb
|
191
|
+
- lib/bridge_bankin/transfer.rb
|
192
|
+
- lib/bridge_bankin/user.rb
|
193
|
+
- lib/bridge_bankin/version.rb
|
194
|
+
homepage: https://github.com/neatops/bridge_bankin
|
195
|
+
licenses:
|
196
|
+
- MIT
|
197
|
+
metadata:
|
198
|
+
homepage_uri: https://github.com/neatops/bridge_bankin
|
199
|
+
source_code_uri: https://github.com/neatops/bridge_bankin
|
200
|
+
changelog_uri: https://github.com/neatops/bridge_bankin/blob/master/CHANGELOG.md
|
201
|
+
post_install_message:
|
202
|
+
rdoc_options: []
|
203
|
+
require_paths:
|
204
|
+
- lib
|
205
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - ">="
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: 2.7.0
|
210
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - ">="
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '0'
|
215
|
+
requirements: []
|
216
|
+
rubygems_version: 3.1.4
|
217
|
+
signing_key:
|
218
|
+
specification_version: 4
|
219
|
+
summary: Unofficial client to consume Bridge by Bankin’ API
|
220
|
+
test_files: []
|