qbo_api 1.6.6 → 1.7.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdc10d932fd283adbce9198fdd164ab9cbf059c5
4
- data.tar.gz: 7ab9647de1f34b36978a3718474cb6644461f1b2
3
+ metadata.gz: 5a48fcf25fec6a568c7a5e1d355f2cc42bfb710c
4
+ data.tar.gz: 2ea36ee6c00ad12eb0532190fe0acc8c06c03a6b
5
5
  SHA512:
6
- metadata.gz: 701c4e1075f1e97533d2ee3e26867ae1b428a93dd8193e46009fea36cac835fd8a7c6b33de2315762d5af7c0ca00e362a01fcb04f663dd308bacd7c65f1bbdfd
7
- data.tar.gz: 73db5f7dada2e5d9a9a6fc7906e3ea974a4b5911f6e96ff9d359a0bc3a7b935ab89563be79a7a7135810c95400b10c760e16737dfcba42d50c340b059c60eb80
6
+ metadata.gz: b11bb3a2b6851ef73ecbedbb0abf34e9f5964deeee81cce669662c9bc42909ce463c913a05eeb351ac1b92d1c5e4d099133894e230955a696b73fff478e56711
7
+ data.tar.gz: 2af0467625d1b5a03bd0f9ffd5e246124a294fed4d01ccf8d0b346d332cfd957426c83223d70d08161ceaba491875cc7a1307c4506999d59d08969ea7c5f5218
data/.gitignore CHANGED
@@ -9,9 +9,13 @@
9
9
  /tmp/
10
10
  .env
11
11
  .ruby-version
12
+ .ruby-gemset
13
+ .byebug_history
12
14
  *.gem
13
15
  .rspec
14
16
  todo.txt
15
17
  *.sess
16
18
  *.log
19
+ spec/temp/spec_status.txt
20
+ *.swp
17
21
  scrap.txt
data/README.md CHANGED
@@ -78,6 +78,15 @@ Or install it yourself as:
78
78
  ### TLS v1.2
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
+ ### 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.
83
+ If ActiveSupport is loaded, you can achieve proper serialization with the following configuration:
84
+ ```ruby
85
+ ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
86
+ ActiveSupport::JSON::Encoding.time_precision = 0
87
+ ```
88
+ If you're not using ActiveSupport, you'll need to use `#iso8601` method to convert your `Time`/`DateTime` instances to strings before passing them to a QboApi instance. Failure to do so will result in a raised QboApi::BadRequest exception.
89
+
81
90
  ### Configuration options
82
91
  - By default this client runs against a QBO sandbox. To run against the production QBO API URL do:
83
92
  ```ruby
@@ -111,7 +111,7 @@ class QboApi
111
111
  req.url path
112
112
  when :post, :put
113
113
  req.url path
114
- req.body = JSON.generate(payload)
114
+ req.body = payload.to_json
115
115
  end
116
116
  end
117
117
  response(raw_response, entity: entity)
@@ -8,7 +8,7 @@ class QboApi
8
8
  request.url "#{realm_id}/upload"
9
9
  request.body = {
10
10
  'file_metadata_01':
11
- Faraday::UploadIO.new(StringIO.new(JSON.generate(payload)), 'application/json', 'attachment.json'),
11
+ Faraday::UploadIO.new(StringIO.new(payload.to_json), 'application/json', 'attachment.json'),
12
12
  'file_content_01':
13
13
  Faraday::UploadIO.new(attachment, content_type, file_name)
14
14
  }
@@ -1,3 +1,3 @@
1
1
  class QboApi
2
- VERSION = "1.6.6"
2
+ VERSION = "1.7.0"
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.6.6
4
+ version: 1.7.0
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-20 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler