quovo 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05b9a24b4183e4fe22c85e547e1aac50521aa6b9
4
- data.tar.gz: 670c9a0628d8e4fe8b00ee7f2df6c8e541f5110c
3
+ metadata.gz: 5d08203e16ec477510fc40f0d97bace48b9e54ee
4
+ data.tar.gz: ce632cd0675812c08eea9de7a802520f54242038
5
5
  SHA512:
6
- metadata.gz: c09b69804689789b76378da23df02c4af570e725fc3dfcfdd93e75d0bec28a6e90ce1421d49413695745a0c739ec616c0b46f973f81c2dca85ac7fdad54e1b8d
7
- data.tar.gz: 865f6e351f80eadcd77d514d5b43677a134ad86ca1bf54170dde3ef646eb4e3f80c98a0d20dd60e8cb8b13cf1b58a7f91e8e2f5c6ff3da7ec72886889ac6798a
6
+ metadata.gz: daa8fce11d923bea0c6ed3c2d1d032fdef70071620d59c7970b4cba946b5bbee6f5b77ebc0947454dda07d4e9f97e508709d842d167bd7dde27ae6f0ba78f77b
7
+ data.tar.gz: 971e0408e788f61483bb1abe53063ba398e66563b0c8b81ce18d5cb221b712ce31f3ab15a47988b6297fa72a31fdd75f583dcaef2a8796b136b0df628fa753f3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### v1.0.5
2
+ [FEATURE] Add history/all api.
3
+
1
4
  ### v1.0.4
2
5
  [FEATURE] Allow count param for history api.
3
6
  [FIX] Fix caching expiration date for token
data/README.md CHANGED
@@ -93,18 +93,15 @@ Hook is a registered callback that invokes when web request happens.
93
93
  ```ruby
94
94
  client.users.all
95
95
  client.users.find(user_id)
96
- # Creates new user
97
- # additional parameters
98
- # name: - client's name
99
- # email: - client's email. Cannot match another user's email
100
- # phone: - client's phone number
101
- client.users.create(username)
96
+ # Creates new user
97
+ client.users.create(username, options)
102
98
  # Updates user information
103
- # additional parameters
99
+ client.users.update(user_id, options)
100
+ # Options
104
101
  # name: - client's name
105
102
  # email: - client's email. Cannot match another user's email
106
- # phone: - client's phone number
107
- client.users.update(user_id)
103
+ # phone: - client's phone number
104
+ # Destroy user
108
105
  client.users.delete(user_id)
109
106
  ```
110
107
 
@@ -133,17 +130,17 @@ Hook is a registered callback that invokes when web request happens.
133
130
 
134
131
  ### History
135
132
  ```ruby
136
- client.history.all
137
- # additional parameters
133
+ client.history.all(options)
134
+ client.history.for_user(user_id, options)
135
+ client.history.for_account(account_id, options)
136
+ client.history.for_portfolio(portfolio_id, options)
137
+ # Options
138
138
  # start: - pointer to next set of items
139
139
  # count: - max number of results to return
140
140
  # start_date: - filters out history before this date
141
141
  # end_date: - filters out history after this date
142
142
  # start_id: - filters out history before this id
143
- # end_id: - filters out history after this id
144
- client.history.for_user(user_id)
145
- client.history.for_account(account_id)
146
- client.history.for_portfolio(portfolio_id)
143
+ # end_id: - filters out history after this id
147
144
  ```
148
145
 
149
146
  ### Portfolios
@@ -157,11 +154,6 @@ Hook is a registered callback that invokes when web request happens.
157
154
 
158
155
  ### Positions
159
156
  ```ruby
160
- # Load all positions
161
- # additional parameters
162
- # start: - pointer to next set of items
163
- # count: - max number of results to return
164
- client.positions.all
165
157
  client.positions.for_user(user_id)
166
158
  client.positions.for_account(account_id)
167
159
  client.positions.for_portfolio(portfolio_id)
@@ -5,6 +5,14 @@ module Quovo
5
5
  using Quovo::Refinements::Require
6
6
  using Quovo::Refinements::Permit
7
7
 
8
+ def all(params = {})
9
+ params.permit!(:start_date, :end_date, :start_id, :end_id, :count)
10
+ api(:get, '/history', params)
11
+ .fetch('history')
12
+ .cast(Transaction)
13
+ .sort_by(&:sort_key)
14
+ end
15
+
8
16
  def for_user(id, params = {})
9
17
  id.require!(as: :id)
10
18
  params.permit!(:start_date, :end_date, :start_id, :end_id, :count)
data/lib/quovo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Quovo
2
- VERSION = '1.0.4'.freeze
2
+ VERSION = '1.0.5'.freeze
3
3
  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
4
+ version: 1.0.5
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: 2016-07-13 00:00:00.000000000 Z
12
+ date: 2016-07-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Quovo RESTful API client, configurable, thread-safe and well-tested
15
15
  email: