plaid-kilt 0.5.5 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/plaid/client/client.rb +1 -1
- data/lib/plaid/client/thin_client.rb +1 -1
- data/lib/plaid/scaffold/category.rb +17 -0
- data/lib/plaid/scaffold/scaffold.rb +6 -0
- data/lib/plaid.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 891a73fab60023c939acd2d9874dbb87acbb6544
|
4
|
+
data.tar.gz: 08a92a44b16bd3c41fb82c1fe61648c5d78ae35a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77a1a2feba64f74555f8e5970f6ee9b52dab4625b1cfa1f27fb9fb346d445fde8342ad229d4afa4f9589dab35cc507824b27792d4e3e3239aadb4e1deb198087
|
7
|
+
data.tar.gz: 1efd3aff599f14c5e64e70d021561162e21039fcff386d984f1426d247d99e8acddc947e3d7892f2c7eaa7aeffd50a980dd592126c565922b073224ed68e4a01
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/lib/plaid/client/client.rb
CHANGED
@@ -46,7 +46,7 @@ module Plaid
|
|
46
46
|
self.mfa_type = nil
|
47
47
|
self.mfa_message = nil
|
48
48
|
self.is_mfa_initialized = false
|
49
|
-
yield(response)
|
49
|
+
yield(response) if block_given?
|
50
50
|
elsif response.code.eql? 201 #mfa
|
51
51
|
mfa_201 = PlaidResponse.new(response, "MFA")
|
52
52
|
self.access_token = mfa_201.access_token
|
@@ -51,7 +51,7 @@ module Plaid
|
|
51
51
|
#generic method for handling the structure of the response. Only creates an error object if there is an error (business error) from Plaid.com. Yields to the block with calling function
|
52
52
|
def handle(response)
|
53
53
|
if response.code.eql? 200
|
54
|
-
yield(response)
|
54
|
+
yield(response) if block_given?
|
55
55
|
else
|
56
56
|
PlaidError.new(response, "Error")
|
57
57
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Plaid
|
2
|
+
module Scaffold
|
3
|
+
module Categories
|
4
|
+
|
5
|
+
module ClassMethods
|
6
|
+
def get_category(id)
|
7
|
+
response = self.get('/categories/' + id.to_s)
|
8
|
+
PlaidObject.new(response)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.included(base)
|
13
|
+
base.extend(ClassMethods)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -3,6 +3,7 @@ module Plaid
|
|
3
3
|
class Base
|
4
4
|
|
5
5
|
require 'plaid/scaffold/institution'
|
6
|
+
require 'plaid/scaffold/category'
|
6
7
|
require 'plaid/client/configuration'
|
7
8
|
require 'plaid/plaid_object'
|
8
9
|
require 'plaid/plaid_error'
|
@@ -10,6 +11,7 @@ module Plaid
|
|
10
11
|
require 'httparty'
|
11
12
|
require 'singleton'
|
12
13
|
include Plaid::Scaffold::Institutions
|
14
|
+
include Plaid::Scaffold::Categories
|
13
15
|
include Plaid::Client::Configurations
|
14
16
|
include HTTParty
|
15
17
|
include Singleton
|
@@ -34,6 +36,10 @@ module Plaid
|
|
34
36
|
@@institutions
|
35
37
|
end
|
36
38
|
|
39
|
+
def self.category(cat_id)
|
40
|
+
self.get_category(cat_id) rescue "There is something wrong with Plaid!"
|
41
|
+
end
|
42
|
+
|
37
43
|
end
|
38
44
|
end
|
39
45
|
end
|
data/lib/plaid.rb
CHANGED
@@ -31,6 +31,7 @@ require 'plaid/client/balance'
|
|
31
31
|
require 'plaid/client/followup'
|
32
32
|
require 'plaid/scaffold/scaffold'
|
33
33
|
require 'plaid/scaffold/institution'
|
34
|
+
require 'plaid/scaffold/category'
|
34
35
|
require 'plaid/plaid_object'
|
35
36
|
require 'plaid/plaid_error'
|
36
37
|
require 'plaid/plaid_response'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plaid-kilt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Koisch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- lib/plaid/plaid_error.rb
|
125
125
|
- lib/plaid/plaid_object.rb
|
126
126
|
- lib/plaid/plaid_response.rb
|
127
|
+
- lib/plaid/scaffold/category.rb
|
127
128
|
- lib/plaid/scaffold/institution.rb
|
128
129
|
- lib/plaid/scaffold/scaffold.rb
|
129
130
|
- lib/plaid/text/exposition.rb
|