qbo_api 1.8.5 → 1.8.6

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
  SHA256:
3
- metadata.gz: f304a44d0c7d7231a3f5ef101e1005652bc9cd801d7263b6dc70138a52229c56
4
- data.tar.gz: 2a4544537ec874555c7e1aba96f0ebf2457a1bb34af0f3da651e86b9e38fdbff
3
+ metadata.gz: 6a3a9e096d34d00a73adf8376132e47c6f451125ae8d8e54a8a11c3c6f05e873
4
+ data.tar.gz: 267e99238cf927bc2d7e6f43fd1686a7c152768b46631dd6a4bff5d70fb599d4
5
5
  SHA512:
6
- metadata.gz: 4b02f2de3f7192ad90a5beb5b491be6fa05923f6c12c5b6c6f1a040f8a857013cd7201cfe3cfd50e7088a4b664976d3b87ecb9e33a567f79c4d95847e1885b8f
7
- data.tar.gz: 346a13001298cb240678ecbe151844181c7504d97263e16e6e118d9509d3962978bee1556a346d76c265b034189afbc8030c35b8c7885ac7f5c52c1902b3d415
6
+ metadata.gz: a43d92e16ad4d5fe494169b48e26a3633cd67d97c62900dc85ee693fb70fb2408ce4882608bf245250f9e21f11239361e7f6829d9ef7ed9fe93b8d3ce0d06cbc
7
+ data.tar.gz: d3c9d2c043d7139ae4592902ab32b337c85c17bd857c089d2eb52fe1f84f3ae98394b72926d9f0f6be24a8d9e76185515f3a484ec433d79c0ae4e8154f88f225
data/README.md CHANGED
@@ -8,6 +8,9 @@ Ruby client for the QuickBooks Online API version 3.
8
8
  - Robust error handling.
9
9
 
10
10
  ## Tutorials and Screencasts
11
+ - <a href="https://minimul.com/migrating-a-quickbooks-online-app-from-oauth1-to-oauth2-using-the-qbo_api-gem.html" target="_blank">Migrating a QuickBooks Online App from OAuth1 to OAuth2 using the qbo_api gem - Step 1</a>.
12
+ - <a href="https://minimul.com/migrating-a-quickbooks-online-app-from-oauth1-to-oauth2-using-the-qbo_api-gem-part-2.html" target="_blank">Migrating a QuickBooks Online App from OAuth1 to OAuth2 using the qbo_api gem - Step 2</a>.
13
+ - <a href="https://minimul.com/migrating-a-quickbooks-online-app-from-oauth1-to-oauth2-using-the-qbo_api-gem-part-3.html" target="_blank">Migrating a QuickBooks Online App from OAuth1 to OAuth2 using the qbo_api gem - Step 3</a>.
11
14
  - <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
15
  - <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
16
  - <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.
@@ -1,6 +1,13 @@
1
1
  class QboApi
2
2
  module Attachment
3
3
 
4
+ def read_attachment(id:)
5
+ raw_response = connection.get do |request|
6
+ request.url "#{realm_id}/attachable/#{id}"
7
+ end
8
+ response(raw_response, entity: :attachable)
9
+ end
10
+
4
11
  def upload_attachment(payload:, attachment:)
5
12
  content_type = payload['ContentType'] || payload[:ContentType]
6
13
  file_name = payload['FileName'] || payload[:FileName]
@@ -16,6 +23,16 @@ class QboApi
16
23
  response(raw_response, entity: :attachable)
17
24
  end
18
25
 
26
+ # The `attachable` must be the full payload returned in the read response
27
+ def delete_attachment(attachable:)
28
+ raw_response = connection.post do |request|
29
+ request.url "#{realm_id}/attachable?operation=delete"
30
+ request.body = attachable.to_json
31
+ end
32
+
33
+ response(raw_response, entity: :attachable)
34
+ end
35
+
19
36
  def attachment_connection
20
37
  @attachment_connection ||= authorized_multipart_connection(endpoint_url)
21
38
  end
@@ -1,3 +1,3 @@
1
1
  class QboApi
2
- VERSION = "1.8.5"
2
+ VERSION = "1.8.6"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.10"
21
+ spec.add_development_dependency "bundler", ">= 1.10"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
  spec.add_development_dependency "rspec"
24
24
  spec.add_development_dependency 'webmock'
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qbo_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.5
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Pelczarski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-13 00:00:00.000000000 Z
11
+ date: 2020-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.10'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.10'
27
27
  - !ruby/object:Gem::Dependency