qbo_api 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/qbo_api.rb +4 -2
- data/lib/qbo_api/util.rb +12 -0
- data/lib/qbo_api/version.rb +1 -1
- 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: 08dbbbedc1e37cfbad306aba463253f581e9e4c4
|
4
|
+
data.tar.gz: 64d8f03692b8e77db74e875f5bf54d5b2972b46f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f244c4a525ebcf4b6f894a392e391af4286a64086e145ea5eed23d614f7248ccc415be2a1faad5672e1dfff39c116b688c7866d28dbfffe8389a9996863cafbb
|
7
|
+
data.tar.gz: 1d4b41dfbc68fe0d1794d2a0a508b4fb26bbade1fd5e1866ec9c4915ffc2d242238c856dbc847a7cba7f1d8857fa0daf30b6a7f6920aaf1ee2cd755bd1afcc33
|
data/README.md
CHANGED
@@ -107,7 +107,8 @@ QboApi.logger = Rails.logger
|
|
107
107
|
|
108
108
|
### Change data capture (CDC) query
|
109
109
|
```ruby
|
110
|
-
response = api.cdc('estimate
|
110
|
+
response = api.cdc(entities: 'estimate', changed_since: '2011-10-10T09:00:00-07:00')
|
111
|
+
# You can also send in a Time object e.g. changed_since: Time.now
|
111
112
|
expect(response['CDCResponse'].size).to eq 1
|
112
113
|
ids = response['CDCResponse'][0]['QueryResponse'][0]['Estimate'].collect{ |e| e['Id'] }
|
113
114
|
p ids
|
data/lib/qbo_api.rb
CHANGED
@@ -9,10 +9,12 @@ require_relative 'qbo_api/configuration'
|
|
9
9
|
require_relative 'qbo_api/error'
|
10
10
|
require_relative 'qbo_api/raise_http_exception'
|
11
11
|
require_relative 'qbo_api/entity'
|
12
|
+
require_relative 'qbo_api/util'
|
12
13
|
|
13
14
|
class QboApi
|
14
15
|
extend Configuration
|
15
16
|
include Entity
|
17
|
+
include Util
|
16
18
|
attr_reader :realm_id
|
17
19
|
|
18
20
|
REQUEST_TOKEN_URL = 'https://oauth.intuit.com/oauth/v1/get_request_token'
|
@@ -51,8 +53,8 @@ class QboApi
|
|
51
53
|
request(:get, entity: entity, path: path)
|
52
54
|
end
|
53
55
|
|
54
|
-
def cdc(
|
55
|
-
path = "#{realm_id}/cdc?entities=#{
|
56
|
+
def cdc(entities:, changed_since:)
|
57
|
+
path = "#{realm_id}/cdc?entities=#{entities}&changedSince=#{cdc_time(changed_since)}"
|
56
58
|
request(:get, path: path)
|
57
59
|
end
|
58
60
|
|
data/lib/qbo_api/util.rb
ADDED
data/lib/qbo_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qbo_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Pelczarski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -229,6 +229,7 @@ files:
|
|
229
229
|
- lib/qbo_api/entity.rb
|
230
230
|
- lib/qbo_api/error.rb
|
231
231
|
- lib/qbo_api/raise_http_exception.rb
|
232
|
+
- lib/qbo_api/util.rb
|
232
233
|
- lib/qbo_api/version.rb
|
233
234
|
- qbo_api.gemspec
|
234
235
|
homepage: https://github.com/minimul/qbo_api
|