nordigen_ob_client 0.0.8 → 0.0.10
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.
- checksums.yaml +4 -4
- data/lib/nordigen_ob_client.rb +14 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d6bc287b8fa88112680f46fbc052258330df86535e87b72a4d1d644bc8f93f9
|
4
|
+
data.tar.gz: 8f29095ebb8eab8d4b7d6a2ab9cca7b67fdb92c3676e096c90814e53ef128846
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5cd4aac919066af47404cc44c787dd6f9a1f854b6965832795f68a5349f7bd36c134e47aeff4e4a9b01d8308314938ff1d0bbbb42c12d939bcb9d0d73721033
|
7
|
+
data.tar.gz: acc71b28f2d2fc06f95fdeedc51006aa49e78597b6753d875ede635f2d66a9fa20c059242e2400a92fa30f3b37b367434dd1529a45a95d5087464f1eb468e5c5
|
data/lib/nordigen_ob_client.rb
CHANGED
@@ -28,10 +28,15 @@ class NordigenOBClient
|
|
28
28
|
"secret_key" => secret_key
|
29
29
|
}.to_json
|
30
30
|
|
31
|
-
|
31
|
+
puts "????????????????????"
|
32
|
+
puts access_token_params
|
33
|
+
puts "????????????????????"
|
34
|
+
|
35
|
+
response_json = RestClient.post("https://bankaccountdata.gocardless.com/api/v2/token/new/",
|
32
36
|
access_token_params,
|
33
37
|
{content_type: :json, accept: :json})
|
34
38
|
response = JSON.parse(response_json.body)
|
39
|
+
puts response
|
35
40
|
@access_token = response["access"]
|
36
41
|
|
37
42
|
@request_header = {
|
@@ -59,7 +64,7 @@ class NordigenOBClient
|
|
59
64
|
#############################################################################
|
60
65
|
def get_banks_by_country country
|
61
66
|
response = RestClient.get(
|
62
|
-
"https://bankaccountdata.gocardless.com
|
67
|
+
"https://bankaccountdata.gocardless.com/api/v2/institutions/?country=#{country}",
|
63
68
|
headers=@request_header)
|
64
69
|
|
65
70
|
available_banks = JSON.parse(response.body,
|
@@ -84,7 +89,7 @@ class NordigenOBClient
|
|
84
89
|
#############################################################################
|
85
90
|
def list_accounts requisition_id
|
86
91
|
response = RestClient.get(
|
87
|
-
"https://bankaccountdata.gocardless.com
|
92
|
+
"https://bankaccountdata.gocardless.com/api/v2/requisitions/#{requisition_id}/",
|
88
93
|
headers=@request_header)
|
89
94
|
accounts = JSON.parse(response.body)
|
90
95
|
accounts
|
@@ -112,7 +117,7 @@ class NordigenOBClient
|
|
112
117
|
#############################################################################
|
113
118
|
def get_account_details account_id
|
114
119
|
response = RestClient.get(
|
115
|
-
"https://bankaccountdata.gocardless.com
|
120
|
+
"https://bankaccountdata.gocardless.com/api/v2/accounts/#{account_id}/details/",
|
116
121
|
headers=@request_header)
|
117
122
|
accounts = JSON.parse(response.body)
|
118
123
|
accounts
|
@@ -141,7 +146,7 @@ class NordigenOBClient
|
|
141
146
|
#############################################################################
|
142
147
|
def get_account_balances account_id
|
143
148
|
response = RestClient.get(
|
144
|
-
"https://bankaccountdata.gocardless.com
|
149
|
+
"https://bankaccountdata.gocardless.com/api/v2/accounts/#{account_id}/balances/",
|
145
150
|
headers=@request_header)
|
146
151
|
accounts = JSON.parse(response.body)
|
147
152
|
accounts
|
@@ -167,7 +172,7 @@ class NordigenOBClient
|
|
167
172
|
#############################################################################
|
168
173
|
def get_account_overview account_id
|
169
174
|
response = RestClient.get(
|
170
|
-
"https://bankaccountdata.gocardless.com
|
175
|
+
"https://bankaccountdata.gocardless.com/api/v2/accounts/#{account_id}/",
|
171
176
|
headers=@request_header)
|
172
177
|
accounts = JSON.parse(response.body)
|
173
178
|
accounts
|
@@ -195,7 +200,7 @@ class NordigenOBClient
|
|
195
200
|
#############################################################################
|
196
201
|
def get_account_transactions account_id
|
197
202
|
response = RestClient.get(
|
198
|
-
"https://bankaccountdata.gocardless.com
|
203
|
+
"https://bankaccountdata.gocardless.com/api/v2/accounts/#{account_id}/transactions/",
|
199
204
|
headers=@request_header)
|
200
205
|
accounts = JSON.parse(response.body)
|
201
206
|
accounts
|
@@ -230,7 +235,7 @@ class NordigenOBClient
|
|
230
235
|
}.to_json
|
231
236
|
|
232
237
|
response = RestClient.post(
|
233
|
-
"https://bankaccountdata.gocardless.com
|
238
|
+
"https://bankaccountdata.gocardless.com/api/v2/requisitions/",
|
234
239
|
request_body,
|
235
240
|
headers=@request_header)
|
236
241
|
JSON.parse(response.body)
|
@@ -250,7 +255,7 @@ class NordigenOBClient
|
|
250
255
|
#############################################################################
|
251
256
|
def delete_requisition requisition_id
|
252
257
|
response = RestClient.delete(
|
253
|
-
"https://bankaccountdata.gocardless.com
|
258
|
+
"https://bankaccountdata.gocardless.com/api/v2/requisitions/#{requisition_id}/",
|
254
259
|
headers=@request_header)
|
255
260
|
JSON.parse(response.body)
|
256
261
|
response
|