quovo 1.0.4 → 1.0.5
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +12 -20
- data/lib/quovo/api/history.rb +8 -0
- data/lib/quovo/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 5d08203e16ec477510fc40f0d97bace48b9e54ee
         | 
| 4 | 
            +
              data.tar.gz: ce632cd0675812c08eea9de7a802520f54242038
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: daa8fce11d923bea0c6ed3c2d1d032fdef70071620d59c7970b4cba946b5bbee6f5b77ebc0947454dda07d4e9f97e508709d842d167bd7dde27ae6f0ba78f77b
         | 
| 7 | 
            +
              data.tar.gz: 971e0408e788f61483bb1abe53063ba398e66563b0c8b81ce18d5cb221b712ce31f3ab15a47988b6297fa72a31fdd75f583dcaef2a8796b136b0df628fa753f3
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        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 | 
            -
               | 
| 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 | 
            -
               | 
| 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 | 
            -
               | 
| 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 | 
            -
               | 
| 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)
         | 
    
        data/lib/quovo/api/history.rb
    CHANGED
    
    | @@ -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
    
    
    
        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.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- | 
| 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:
         |