quovo 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/quovo.rb +2 -0
- data/lib/quovo/api.rb +4 -0
- data/lib/quovo/api/challenges.rb +17 -0
- data/lib/quovo/api/extras.rb +15 -0
- data/lib/quovo/models/brokerage.rb +1 -0
- data/lib/quovo/models/challenge.rb +1 -0
- data/lib/quovo/models/extra.rb +47 -0
- data/lib/quovo/models/portfolio.rb +3 -2
- data/lib/quovo/version.rb +1 -1
- data/quovo.gemspec +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fd1c04353c9fcd98bb479ae6cdf39837631409c
|
4
|
+
data.tar.gz: 47037bc2e79ac63fd1bf08bd1a5897ecd74f7445
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0342e0a653e145606372cb7536eeaaae07f6ab9f9921d36008b6ed5aec0edecafeb427c66a845eaf0c560b33511776e1a3384af6970dd75490552798a2c41b1a
|
7
|
+
data.tar.gz: cf257d2775d414a87d1b69360203f719d6518d14ee4d39317537ac7b0be4712a4d95f86548239f810de4e85da316369f9b92b1256160c042a4a10cec497642e4
|
data/README.md
CHANGED
@@ -126,6 +126,10 @@ Hook is a registered callback that invokes when web request happens.
|
|
126
126
|
client.challenges.answers!(account_id, [{question: 'question text', answer: 'answer text'}])
|
127
127
|
# for choice questions
|
128
128
|
client.challenges.answers!(account_id, [{question: 'question text', answer: 0}])
|
129
|
+
# find single challenge
|
130
|
+
client.challenges.find(challenge_id)
|
131
|
+
# answer single challenge
|
132
|
+
client.challenges.answer!(challenge_id, {question: 'question text', answer: 'answer text'})
|
129
133
|
```
|
130
134
|
|
131
135
|
### History
|
@@ -189,6 +193,11 @@ Hook is a registered callback that invokes when web request happens.
|
|
189
193
|
client.webhooks.delete(name)
|
190
194
|
```
|
191
195
|
|
196
|
+
### Extras
|
197
|
+
```ruby
|
198
|
+
client.extras.for_portfolio(portfolio_id)
|
199
|
+
```
|
200
|
+
|
192
201
|
|
193
202
|
## Contributors
|
194
203
|
* Canopy Financials [https://www.canopyfa.com](https://www.canopyfa.com)
|
data/lib/quovo.rb
CHANGED
@@ -37,11 +37,13 @@ require 'quovo/models/position'
|
|
37
37
|
require 'quovo/models/transaction'
|
38
38
|
require 'quovo/models/iframe_token'
|
39
39
|
require 'quovo/models/webhook'
|
40
|
+
require 'quovo/models/extra'
|
40
41
|
|
41
42
|
require 'quovo/api/base'
|
42
43
|
require 'quovo/api/brokerages'
|
43
44
|
require 'quovo/api/accounts'
|
44
45
|
require 'quovo/api/challenges'
|
46
|
+
require 'quovo/api/extras'
|
45
47
|
require 'quovo/api/portfolios'
|
46
48
|
require 'quovo/api/users'
|
47
49
|
require 'quovo/api/positions'
|
data/lib/quovo/api.rb
CHANGED
data/lib/quovo/api/challenges.rb
CHANGED
@@ -23,6 +23,23 @@ module Quovo
|
|
23
23
|
.fetch('challenges')
|
24
24
|
.cast(Challenge)
|
25
25
|
end
|
26
|
+
|
27
|
+
def find(challenge_id)
|
28
|
+
challenge_id.require!(as: 'challenge_id')
|
29
|
+
api(:get, "/challenges/#{challenge_id}")
|
30
|
+
.fetch('challenge')
|
31
|
+
.cast(Challenge)
|
32
|
+
end
|
33
|
+
|
34
|
+
def answer!(challenge_id, answer)
|
35
|
+
challenge_id.require!(as: 'challenge_id')
|
36
|
+
answer.require!(as: 'answer')
|
37
|
+
|
38
|
+
params = { answer: answer.to_json }
|
39
|
+
api(:put, "/challenges/#{challenge_id}", params)
|
40
|
+
.fetch('challenge')
|
41
|
+
.cast(Challenge)
|
42
|
+
end
|
26
43
|
end
|
27
44
|
end
|
28
45
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Quovo
|
2
|
+
module Api
|
3
|
+
class Extras < Base
|
4
|
+
using Quovo::Refinements::Cast
|
5
|
+
using Quovo::Refinements::Require
|
6
|
+
|
7
|
+
def for_portfolio(id)
|
8
|
+
id.require!(as: :id)
|
9
|
+
api(:get, "/portfolios/#{id}/extras")
|
10
|
+
.fetch('extras')
|
11
|
+
.cast(Extra)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Quovo
|
2
|
+
module Models
|
3
|
+
class Extra < Base
|
4
|
+
using Quovo::Refinements::ToTime
|
5
|
+
|
6
|
+
fields %i(
|
7
|
+
casp_apr
|
8
|
+
credit_limit
|
9
|
+
due_date
|
10
|
+
interest_rate
|
11
|
+
is_overdue
|
12
|
+
last_payment
|
13
|
+
last_payment_date
|
14
|
+
last_statement_balance
|
15
|
+
last_statement_date
|
16
|
+
loan_type
|
17
|
+
maturity_type
|
18
|
+
min_payment
|
19
|
+
original_principal
|
20
|
+
origination_date
|
21
|
+
portfolio
|
22
|
+
ytd_interest_paid
|
23
|
+
ytd_principal_paid
|
24
|
+
)
|
25
|
+
|
26
|
+
undef :due_date
|
27
|
+
def due_date
|
28
|
+
@due_date.to_time
|
29
|
+
end
|
30
|
+
|
31
|
+
undef :last_payment_date
|
32
|
+
def last_payment_date
|
33
|
+
@last_payment_date.to_time
|
34
|
+
end
|
35
|
+
|
36
|
+
undef :last_statement_date
|
37
|
+
def last_statement_date
|
38
|
+
@last_statement_date.to_time
|
39
|
+
end
|
40
|
+
|
41
|
+
undef :origination_date
|
42
|
+
def origination_date
|
43
|
+
@origination_date.to_time
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -18,8 +18,9 @@ module Quovo
|
|
18
18
|
Thrift\ Savings\ Plan
|
19
19
|
UGMA UTMA
|
20
20
|
Variable\ Annuity
|
21
|
+
RRSP RESP RRIF LIRA LRSP LRIF LIF RLIF TFSA RDSP PRIF
|
21
22
|
),
|
22
|
-
'Banking' => %w(Certificate\ of\ Deposit Checking Credit\ Card Savings),
|
23
|
+
'Banking' => %w(Certificate\ of\ Deposit Checking Credit\ Card Savings Misc.\ Banking),
|
23
24
|
'Insurance' => %w(
|
24
25
|
Annuity Fixed\ Annuity Insurance
|
25
26
|
Term\ Life\ Insurance
|
@@ -27,7 +28,7 @@ module Quovo
|
|
27
28
|
Variable\ Life\ Insurance
|
28
29
|
Whole\ Life\ Insurance
|
29
30
|
),
|
30
|
-
'Loan' => %w(Auto\ Loan Loan Mortgage Student\ Loan),
|
31
|
+
'Loan' => %w(Auto\ Loan Loan Mortgage Student\ Loan HELOC),
|
31
32
|
'Other' => %w(Alternative Limited\ Partnership Misc Real\ Estate),
|
32
33
|
'Unknown' => %w(Unknown)
|
33
34
|
}.freeze
|
data/lib/quovo/version.rb
CHANGED
data/quovo.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
|
16
16
|
spec.require_paths = ['lib']
|
17
17
|
|
18
|
-
spec.required_ruby_version = '>= 2.
|
18
|
+
spec.required_ruby_version = '>= 2.1'
|
19
19
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
20
|
f.match(%r{^(tests|bin|)/}) || f[0] == '.'
|
21
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quovo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Gorkunov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Quovo RESTful API client, configurable, thread-safe and well-tested
|
15
15
|
email:
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- lib/quovo/api/base.rb
|
31
31
|
- lib/quovo/api/brokerages.rb
|
32
32
|
- lib/quovo/api/challenges.rb
|
33
|
+
- lib/quovo/api/extras.rb
|
33
34
|
- lib/quovo/api/history.rb
|
34
35
|
- lib/quovo/api/iframe_token.rb
|
35
36
|
- lib/quovo/api/portfolios.rb
|
@@ -45,6 +46,7 @@ files:
|
|
45
46
|
- lib/quovo/models/brokerage.rb
|
46
47
|
- lib/quovo/models/challenge.rb
|
47
48
|
- lib/quovo/models/choice.rb
|
49
|
+
- lib/quovo/models/extra.rb
|
48
50
|
- lib/quovo/models/iframe_token.rb
|
49
51
|
- lib/quovo/models/image.rb
|
50
52
|
- lib/quovo/models/portfolio.rb
|
@@ -77,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
77
79
|
requirements:
|
78
80
|
- - ">="
|
79
81
|
- !ruby/object:Gem::Version
|
80
|
-
version: '2.
|
82
|
+
version: '2.1'
|
81
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
84
|
requirements:
|
83
85
|
- - ">="
|