qbo_api 1.7.0 → 1.7.1

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: 5a48fcf25fec6a568c7a5e1d355f2cc42bfb710c
4
- data.tar.gz: 2ea36ee6c00ad12eb0532190fe0acc8c06c03a6b
3
+ metadata.gz: 368838159586d1ffaf77d1618d13838cecbccbab
4
+ data.tar.gz: 6caa3bae70dabfc99de0260fdd6845c21658f392
5
5
  SHA512:
6
- metadata.gz: b11bb3a2b6851ef73ecbedbb0abf34e9f5964deeee81cce669662c9bc42909ce463c913a05eeb351ac1b92d1c5e4d099133894e230955a696b73fff478e56711
7
- data.tar.gz: 2af0467625d1b5a03bd0f9ffd5e246124a294fed4d01ccf8d0b346d332cfd957426c83223d70d08161ceaba491875cc7a1307c4506999d59d08969ea7c5f5218
6
+ metadata.gz: 515b977dbe1ddd7ac9ba90fa9715d594a58307114141013b48a7c4d6ae9f6fb9995434c597a9a3e73ffe6316b2c3e5701936b7db66b079ba59a02793663f9414
7
+ data.tar.gz: 41af9ba95cd96304e225d8f3d4b892f84475c6f1bb78d57c6be79d3ad178df1a185aba1a52808e966aa7ec2f1683535db643d1d6ae520784cd426e9b0ab8b84b
@@ -0,0 +1,2 @@
1
+ export QBO_API_CONSUMER_KEY=<Your QuickBooks apps consumer key>
2
+ export QBO_API_CONSUMER_SECRET=<Your QuickBooks apps consumer secret>
@@ -0,0 +1,2 @@
1
+ export QBO_API_CLIENT_ID=<Your QuickBooks Apps Client ID>
2
+ export QBO_API_CLIENT_SECRET=<Your QuickBooks Apps Client Secret>
data/.env.test ADDED
@@ -0,0 +1,6 @@
1
+ export QBO_API_CONSUMER_KEY=
2
+ export QBO_API_CONSUMER_SECRET=
3
+ export QBO_API_ACCESS_TOKEN=
4
+ export QBO_API_ACCESS_TOKEN_SECRET=
5
+ export QBO_API_OAUTH2_ACCESS_TOKEN=
6
+ export QBO_API_COMPANY_ID=12345
data/.travis.yml CHANGED
@@ -1,9 +1,16 @@
1
+ sudo: false
1
2
  language: ruby
2
3
  rvm:
3
4
  - 2.2.2
4
5
  - 2.3.0
5
6
 
6
- sudo: false
7
+ before_script:
8
+ - cp .env.test .env
9
+
10
+ script:
11
+ - bundle exec rspec spec/
12
+
13
+
7
14
  notifications:
8
15
  email:
9
16
  - christian@minimul.com
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # QboApi
2
2
 
3
3
  Ruby client for the QuickBooks Online API version 3.
4
- - Built on top of the excellent Faraday gem.
5
- - JSON only support.
4
+ - Built on top of the excellent Faraday gem.
5
+ - JSON only support.
6
6
  - Please don't ask about XML support. [Intuit has stated](https://github.com/ruckus/quickbooks-ruby/issues/257#issuecomment-126834454) that JSON is the primary data format for the QuickBooks API (v3 and beyond). This gem will specialize in JSON only. The [`quickbooks-ruby`](https://github.com/ruckus/quickbooks-ruby) gem has fantastic support for those who favor XML.
7
7
  - Features specs built directly against a QuickBooks Online Sandbox via the VCR gem.
8
8
  - Robust error handling.
@@ -10,9 +10,9 @@ Ruby client for the QuickBooks Online API version 3.
10
10
  ## Tutorials and Screencasts
11
11
  - <a href="http://minimul.com/introducing-a-new-ruby-quickbooks-online-client.html" target="_blank">Why qbo_api is a better choice </a> than the <a href="https://github.com/ruckus/quickbooks-ruby" target="_blank">quickbooks-ruby</a> gem.
12
12
  - <a href="http://minimul.com/getting-started-with-the-modern-ruby-quickbooks-online-client-qbo_api-part-1.html" target="_blank">Part 1</a>: Learn how to spin up the <a href="https://github.com/minimul/qbo_api#spin-up-an-example">example app</a>.
13
- - <a href="http://minimul.com/the-modern-ruby-quickbooks-client-part-2.html" target="_blank">Part 2</a>: <a href="https://github.com/minimul/qbo_api#running-the-specs">Running the specs</a> to aid you in understanding a QuickBooks API transaction.
13
+ - <a href="http://minimul.com/the-modern-ruby-quickbooks-client-part-2.html" target="_blank">Part 2</a>: <a href="https://github.com/minimul/qbo_api#running-the-specs">Running the specs</a> to aid you in understanding a QuickBooks API transaction.
14
14
  - <a href="http://minimul.com/the-modern-ruby-quickbooks-client-contributing.html" target="_blank">Part 3</a>: <a href="https://github.com/minimul/qbo_api#creating-new-specs-or-modifying-existing-spec-that-have-been-recorded-using-the-vcr-gem">Contributing to the gem</a>.
15
- ### Important Note: The videos are out of date.
15
+ ### Important Note: The videos are out of date.
16
16
  If you signed up for a Intuit developer account after July 17th, 2017 then you will have to
17
17
  follow <a href='#OAuth2-example'>OAuth2: Spin up an example</a>
18
18
  ## The Book
@@ -79,7 +79,7 @@ Or install it yourself as:
79
79
  Intuit will be [requiring](https://developer.intuit.com/hub/blog/2017/08/03/upgrading-your-apps-to-support-tls-1-2) API client connections to be negotiated over TLS1.2 by December 31st, 2017. Using the default HTTP client (Net::HTTP) with Faraday this is the case with QboApi, however, if you are using another HTTP client you may need to directly set the TLS version negotiation manually.
80
80
 
81
81
  ### DateTime serialization
82
- Some QBO entities have attributes of type DateTime (e.g., Time Activities with StartTime and EndTime). All DateTimes passed to the QBO API must be serialized in ISO 8601 format.
82
+ Some QBO entities have attributes of type DateTime (e.g., Time Activities with StartTime and EndTime). All DateTimes passed to the QBO API must be serialized in ISO 8601 format.
83
83
  If ActiveSupport is loaded, you can achieve proper serialization with the following configuration:
84
84
  ```ruby
85
85
  ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
@@ -145,7 +145,7 @@ QboApi.minor_version = 8
145
145
 
146
146
  ### Update
147
147
  ```ruby
148
- customer = {
148
+ customer = {
149
149
  DisplayName: 'Jack Doe',
150
150
  PrimaryPhone: {
151
151
  FreeFormNumber: "(415) 444-1234"
@@ -205,9 +205,9 @@ QboApi.minor_version = 8
205
205
  ```ruby
206
206
  payload = {"AttachableRef":
207
207
  [
208
- {"EntityRef":
208
+ {"EntityRef":
209
209
  {
210
- "type": "Invoice",
210
+ "type": "Invoice",
211
211
  "value": "111"
212
212
  }
213
213
  }
@@ -237,7 +237,7 @@ Be aware that any errors will not raise a `QboApi::Error`, but will be returned
237
237
  ### Change data capture (CDC) query
238
238
  ```ruby
239
239
  response = qbo_api.cdc(entities: 'estimate', changed_since: '2011-10-10T09:00:00-07:00')
240
- # You can also send in a Time object e.g. changed_since: Time.now
240
+ # You can also send in a Time object e.g. changed_since: Time.now
241
241
  expect(response['CDCResponse'].size).to eq 1
242
242
  ids = response['CDCResponse'][0]['QueryResponse'][0]['Estimate'].collect{ |e| e['Id'] }
243
243
  p ids
@@ -299,7 +299,7 @@ See [docs](https://developer.intuit.com/docs/0100_quickbooks_online/0100_essenti
299
299
 
300
300
  ### Respond to an error
301
301
  ```ruby
302
- customer = { DisplayName: 'Weiskopf Consulting' }
302
+ customer = { DisplayName: 'Weiskopf Consulting' }
303
303
  begin
304
304
  response = qbo_api.create(:customer, payload: customer)
305
305
  rescue QboApi::BadRequest => e
@@ -327,7 +327,7 @@ See [docs](https://developer.intuit.com/docs/0100_quickbooks_online/0100_essenti
327
327
  qbo_api.all(:vendor, max: 5).each do |v|
328
328
  p v['DisplayName']
329
329
  end
330
-
330
+
331
331
  # retrieves all customers by groups of 2 using a custom select query
332
332
  where = "WHERE Id IN ('5', '6', '7', '8', '9', '10')"
333
333
  qbo_api.all(:customer, max: 2, select: "SELECT * FROM Customer #{where}").each do |c|
@@ -349,14 +349,11 @@ See [docs](https://developer.intuit.com/docs/0100_quickbooks_online/0100_essenti
349
349
  - `git clone git://github.com/minimul/qbo_api && cd qbo_api`
350
350
  - `bundle`
351
351
  - Create a `.env` file
352
+ - `cp .env.example_app.oauth2 .env`
352
353
  - If needed create an account at [https://developer.intuit.com](https://developer.intuit.com)
353
354
  - Click `Get started coding`
354
355
  - Create an app with both the `Accounting` & `Payments` selected.
355
356
  - Go to the `Development` tab and copy and paste the client id and client secret into the `.env` file.
356
- ```ruby
357
- export QBO_API_CLIENT_ID=<Your QuickBooks Apps Client ID>
358
- export QBO_API_CLIENT_SECRET=<Your QuickBooks Apps Client Secret>
359
- ```
360
357
  - Note: the `.env` file will be automatically loaded after you run the next step.
361
358
  - Start up the example app
362
359
  - `ruby example/app.rb`
@@ -373,14 +370,11 @@ export QBO_API_CLIENT_SECRET=<Your QuickBooks Apps Client Secret>
373
370
  - `git clone git://github.com/minimul/qbo_api && cd qbo_api`
374
371
  - `bundle`
375
372
  - Create a `.env` file
373
+ - `cp .env.example_app.oauth1 .env`
376
374
  - If needed create an account at [https://developer.intuit.com](https://developer.intuit.com)
377
375
  - Click `Get started coding`
378
376
  - Create an app with both the `Accounting` & `Payments` selected.
379
377
  - Go to the `Development` tab and copy and paste the consumer key and secret into the `.env` file.
380
- ```ruby
381
- export QBO_API_CONSUMER_KEY=<Your QuickBooks apps consumer key>
382
- export QBO_API_CONSUMER_SECRET=<Your QuickBooks apps consumer secret>
383
- ```
384
378
  - Note: the `.env` file will be automatically loaded after you run the next step.
385
379
  - Start up the example app
386
380
  - `ruby example/app.rb`
@@ -403,17 +397,10 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/minimu
403
397
  - `git clone git://github.com/minimul/qbo_api && cd qbo_api`
404
398
  - `bundle`
405
399
  - Create a `.env` file
406
- - If you are just running the specs then at minimum your `.env` needs to look like the following:
407
- ```ruby
408
- export QBO_API_CONSUMER_KEY=
409
- export QBO_API_CONSUMER_SECRET=
410
- export QBO_API_ACCESS_TOKEN=
411
- export QBO_API_ACCESS_TOKEN_SECRET=
412
- export QBO_API_OAUTH2_ACCESS_TOKEN=
413
- export QBO_API_COMPANY_ID=12345
414
- ```
400
+ - `cp .env.test .env`
401
+ - Update it if your are making HTTP requests.
415
402
  - `bundle exec rspec spec/`
416
-
403
+
417
404
  #### Creating new specs or modifying existing spec that have been recorded using the VCR gem.
418
405
  - All specs that require interaction with the API must be recorded against your personal QuickBooks sandbox. More coming on how to create or modifying existing specs against your sandbox.
419
406
  - <a href="http://minimul.com/the-modern-ruby-quickbooks-client-contributing.html" target="_blank">Check out this tutorial and screencast on contributing to qbo_api</a>.
@@ -1,3 +1,3 @@
1
1
  class QboApi
2
- VERSION = "1.7.0"
2
+ VERSION = "1.7.1"
3
3
  end
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.7.0
4
+ version: 1.7.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: 2018-01-31 00:00:00.000000000 Z
11
+ date: 2018-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -255,6 +255,9 @@ executables: []
255
255
  extensions: []
256
256
  extra_rdoc_files: []
257
257
  files:
258
+ - ".env.example_app.oauth1"
259
+ - ".env.example_app.oauth2"
260
+ - ".env.test"
258
261
  - ".gitignore"
259
262
  - ".travis.yml"
260
263
  - Gemfile