qbo_api 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/README.md +35 -27
- data/lib/qbo_api/version.rb +1 -1
- data/qbo_api.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 922f5a2dd0bb1020d9366c1a993686aa5febdb50e54a5b4c2a6160e572612def
|
4
|
+
data.tar.gz: '032848b350e352d8edaf376cd49b41fbaae20bccf902473d775e90c513fc0ff5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4f17dcf8f2fe0680c34dbb8cf9c864d7d42887f291a968023e1538902a8460cc13d968f669777b53efbc21000d1db44b6e78d21ad8619514dd62c7c0375ba10
|
7
|
+
data.tar.gz: f2d7a86d02a465e6cc9ce8de0110c250c0e500a5d02b7e0cbc402e3cae37ae11832592ecef08d6c58de8735fd0081fbc8adae277efff3698416fc40da4d02274
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Ruby client for the QuickBooks Online API version 3.
|
|
13
13
|
</a>
|
14
14
|
|
15
15
|
|
16
|
-
## Ruby >= 2.
|
16
|
+
## Ruby >= 2.6 required
|
17
17
|
|
18
18
|
## Installation
|
19
19
|
|
@@ -91,7 +91,6 @@ QboApi.minor_version = 8
|
|
91
91
|
# Works with .get, .create, .update, .query methods
|
92
92
|
```
|
93
93
|
|
94
|
-
|
95
94
|
### Create
|
96
95
|
```ruby
|
97
96
|
invoice = {
|
@@ -163,6 +162,40 @@ QboApi.minor_version = 8
|
|
163
162
|
p response.size # => 28
|
164
163
|
```
|
165
164
|
|
165
|
+
### Import/retrieve all
|
166
|
+
*Note: There is some overlap with the `all` and the `get` methods. The `get` method is limited to 1000 results where the `all` method will return all the results no matter the number.*
|
167
|
+
```ruby
|
168
|
+
# retrieves all active customers
|
169
|
+
qbo_api.all(:customers).each do |c|
|
170
|
+
p "#{c['Id']} #{c['DisplayName']}"
|
171
|
+
end
|
172
|
+
|
173
|
+
# retrieves all active or inactive employees
|
174
|
+
qbo_api.all(:employees, inactive: true).each do |e|
|
175
|
+
p "#{e['Id']} #{e['DisplayName']}"
|
176
|
+
end
|
177
|
+
|
178
|
+
# retrieves all vendors by groups of 5
|
179
|
+
qbo_api.all(:vendor, max: 5).each do |v|
|
180
|
+
p v['DisplayName']
|
181
|
+
end
|
182
|
+
|
183
|
+
# retrieves all customers by groups of 2 using a custom select query
|
184
|
+
where = "WHERE Id IN ('5', '6', '7', '8', '9', '10')"
|
185
|
+
qbo_api.all(:customer, max: 2, select: "SELECT * FROM Customer #{where}").each do |c|
|
186
|
+
p c['DisplayName']
|
187
|
+
end
|
188
|
+
```
|
189
|
+
|
190
|
+
#### Note: .all() returns a Ruby Enumerator
|
191
|
+
|
192
|
+
```
|
193
|
+
api.all(:clients).take(50).each { |c| p c["Id"] }
|
194
|
+
api.all(:clients).count
|
195
|
+
api.all(:clients).first
|
196
|
+
api.all(:clients).to_a
|
197
|
+
```
|
198
|
+
|
166
199
|
### Search with irregular characters
|
167
200
|
```ruby
|
168
201
|
# Use the .esc() method
|
@@ -282,31 +315,6 @@ See [docs](https://developer.intuit.com/docs/0100_quickbooks_online/0100_essenti
|
|
282
315
|
end
|
283
316
|
```
|
284
317
|
|
285
|
-
### Import/retrieve all
|
286
|
-
*Note: There is some overlap with the `all` and the `get` methods. The `get` method is limited to 1000 results where the `all` method will return all the results no matter the number.*
|
287
|
-
```ruby
|
288
|
-
# retrieves all active customers
|
289
|
-
qbo_api.all(:customers).each do |c|
|
290
|
-
p "#{c['Id']} #{c['DisplayName']}"
|
291
|
-
end
|
292
|
-
|
293
|
-
# retrieves all active or inactive employees
|
294
|
-
qbo_api.all(:employees, inactive: true).each do |e|
|
295
|
-
p "#{e['Id']} #{e['DisplayName']}"
|
296
|
-
end
|
297
|
-
|
298
|
-
# retrieves all vendors by groups of 5
|
299
|
-
qbo_api.all(:vendor, max: 5).each do |v|
|
300
|
-
p v['DisplayName']
|
301
|
-
end
|
302
|
-
|
303
|
-
# retrieves all customers by groups of 2 using a custom select query
|
304
|
-
where = "WHERE Id IN ('5', '6', '7', '8', '9', '10')"
|
305
|
-
qbo_api.all(:customer, max: 2, select: "SELECT * FROM Customer #{where}").each do |c|
|
306
|
-
p c['DisplayName']
|
307
|
-
end
|
308
|
-
```
|
309
|
-
|
310
318
|
### What kind of QuickBooks entity?
|
311
319
|
```ruby
|
312
320
|
p qbo_api.is_transaction_entity?(:invoice) # => true
|
data/lib/qbo_api/version.rb
CHANGED
data/qbo_api.gemspec
CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
spec.add_development_dependency "rspec"
|
24
24
|
spec.add_development_dependency 'webmock'
|
25
|
+
spec.add_development_dependency 'rexml'
|
25
26
|
spec.add_development_dependency 'simple_oauth'
|
26
27
|
spec.add_development_dependency 'dotenv'
|
27
28
|
spec.add_development_dependency 'vcr'
|
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: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Pelczarski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rexml
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: simple_oauth
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
247
|
- !ruby/object:Gem::Version
|
234
248
|
version: '0'
|
235
249
|
requirements: []
|
236
|
-
rubygems_version: 3.
|
250
|
+
rubygems_version: 3.0.3
|
237
251
|
signing_key:
|
238
252
|
specification_version: 4
|
239
253
|
summary: Ruby JSON-only client for QuickBooks Online API v3. Built on top of the Faraday
|