plaidio 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plaidio/call.rb +4 -2
- data/lib/plaidio/customer.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8822dd44a0a4799420d5eb30e2e8a7cd002734a
|
4
|
+
data.tar.gz: c6f2644bc533270e6d35dec08227de333c18575a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16b1c85ba3470a6516d2e79f5c7c1007fa48ef7ef44b96adfc1c30cb9144479d74ec5f5cb6323fdb63c97af349c01d91444b524384e4c95db50e682e8e6a9d89
|
7
|
+
data.tar.gz: cc3dd5c7be6fe8bdf04a6e6b7a029677e15cdd3591f312adf3345856591bd03ac231910b4546864775b27267b970628c61ae5e19fb7ae550e2f5c0b4d2b1e39e
|
data/lib/plaidio/call.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'rest_client'
|
2
|
+
|
1
3
|
module Plaidio
|
2
4
|
class Call
|
3
5
|
|
@@ -23,7 +25,7 @@ module Plaidio
|
|
23
25
|
|
24
26
|
def parse_response(response)
|
25
27
|
case response.code
|
26
|
-
when
|
28
|
+
when 200
|
27
29
|
@parsed_response = Hash.new
|
28
30
|
@parsed_response[:code] = response.code
|
29
31
|
response = JSON.parse(response)
|
@@ -31,7 +33,7 @@ module Plaidio
|
|
31
33
|
@parsed_response[:accounts] = response["accounts"]
|
32
34
|
@parsed_response[:transactions] = response["transactions"]
|
33
35
|
return @parsed_response
|
34
|
-
when
|
36
|
+
when 201
|
35
37
|
@parsed_response = Hash.new
|
36
38
|
@parsed_response[:code] = response.code
|
37
39
|
response = JSON.parse(response)
|
data/lib/plaidio/customer.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'rest_client'
|
2
|
+
|
1
3
|
module Plaidio
|
2
4
|
# This is used when a customer needs to be defined by the plaid access token.
|
3
5
|
# Abstracting as a class makes it easier since we wont have to redefine the access_token over and over.
|
@@ -34,7 +36,7 @@ module Plaidio
|
|
34
36
|
case method
|
35
37
|
when 1
|
36
38
|
case response.code
|
37
|
-
when
|
39
|
+
when 200
|
38
40
|
@parsed_response = Hash.new
|
39
41
|
@parsed_response[:code] = response.code
|
40
42
|
response = JSON.parse(response)
|
@@ -50,7 +52,7 @@ module Plaidio
|
|
50
52
|
end
|
51
53
|
when 2
|
52
54
|
case response.code
|
53
|
-
when
|
55
|
+
when 200
|
54
56
|
@parsed_response = Hash.new
|
55
57
|
@parsed_response[:code] = response.code
|
56
58
|
response = JSON.parse(response)
|
@@ -64,7 +66,7 @@ module Plaidio
|
|
64
66
|
end
|
65
67
|
when 3
|
66
68
|
case response.code
|
67
|
-
when
|
69
|
+
when 200
|
68
70
|
@parsed_response = Hash.new
|
69
71
|
@parsed_response[:code] = response.code
|
70
72
|
response = JSON.parse(response)
|