quovo 1.0.11 → 1.0.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8dfb4c4fd4beadf9ab5e9d8141e9c8a026fa8ed
4
- data.tar.gz: 90fbbbb9cb1c50087109951c8121bec02138e96d
3
+ metadata.gz: 6fd1c04353c9fcd98bb479ae6cdf39837631409c
4
+ data.tar.gz: 47037bc2e79ac63fd1bf08bd1a5897ecd74f7445
5
5
  SHA512:
6
- metadata.gz: 9f3a198a19b9a39bad570d32b8427dabae349a0f052775ea8aa355ad3edd4c341a6f7cbd35271753c688dd5b656256c917fac8727d320b24a68867c85992afe8
7
- data.tar.gz: f6a782776e1c9ca1de590b187822749debd7ba9f5dfe9d6781085256a23b5323526a80b3832726d08c6128be58072a28319c8fdca859ea0f3658e88caf9fad86
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)
@@ -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'
@@ -35,5 +35,9 @@ module Quovo
35
35
  def webhooks
36
36
  @webhooks ||= Quovo::Api::Webhooks.new
37
37
  end
38
+
39
+ def extras
40
+ @extras ||= Quovo::Api::Extras.new
41
+ end
38
42
  end
39
43
  end
@@ -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
@@ -11,6 +11,7 @@ module Quovo
11
11
  website
12
12
  popularity_score
13
13
  status
14
+ country_code
14
15
  )
15
16
  end
16
17
  end
@@ -13,6 +13,7 @@ module Quovo
13
13
  image
14
14
  choices
15
15
  image_choices
16
+ id
16
17
  )
17
18
 
18
19
  undef :image
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Quovo
2
- VERSION = '1.0.11'.freeze
2
+ VERSION = '1.0.12'.freeze
3
3
  end
@@ -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.0'
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.11
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: 2017-09-25 00:00:00.000000000 Z
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.0'
82
+ version: '2.1'
81
83
  required_rubygems_version: !ruby/object:Gem::Requirement
82
84
  requirements:
83
85
  - - ">="