qbo_api 2.0.2 → 3.0.3
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 +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/ci.yaml +29 -0
- data/.gitignore +1 -1
- data/README.md +78 -23
- data/example/base.rb +1 -0
- data/lib/qbo_api/api_methods.rb +13 -0
- data/lib/qbo_api/connection.rb +20 -15
- data/lib/qbo_api/entity.rb +13 -0
- data/lib/qbo_api/error.rb +19 -5
- data/lib/qbo_api/raise_http_exception.rb +43 -31
- data/lib/qbo_api/version.rb +1 -1
- data/qbo_api.gemspec +2 -2
- metadata +13 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d091daea142ea8b5f0637e93068ebec256c6ed5027b03725b576e003fa1997b3
|
|
4
|
+
data.tar.gz: d44cdfc123b586c2ee4a228f06ffa0d6c602e8897c18cfb656fd68aa7a7401c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61177b17927c994c049cc7975f0673b9893f04c39d7f0b61ec5af4d2a15d13ad0cfbf0fac5302b33ffedeeda43f5af474d22112a8ca1b22d7cf5fa31097fbae8
|
|
7
|
+
data.tar.gz: de16113918a2d51488654197f585d60f480e40aa107d51e5de471ae418cabf7c01c0691a57d8acbe4bf732610d1f1b6c049317cb2c7a9d08ce09fa21ab876a81
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ master ]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
rspec:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
env:
|
|
12
|
+
RUBYOPT: "-W:deprecated" # show warnings, deprecations only
|
|
13
|
+
FARADAY_VERSION: ${{ matrix.faraday }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
|
|
18
|
+
faraday: [ '~> 1.0', '~> 2.0' ]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Ruby
|
|
22
|
+
uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: ${{ matrix.ruby }}
|
|
25
|
+
bundler-cache: true
|
|
26
|
+
- name: Run RSpec
|
|
27
|
+
run: |
|
|
28
|
+
cp .env.test .env
|
|
29
|
+
bundle exec rspec spec/
|
data/.gitignore
CHANGED
data/README.md
CHANGED
|
@@ -81,7 +81,7 @@ QboApi.request_id = true
|
|
|
81
81
|
resp = qbo_api.create(:bill, payload: bill_hash, params: { requestid: qbo_api.uuid })
|
|
82
82
|
# Works with .get, .create, .update, .query methods
|
|
83
83
|
```
|
|
84
|
-
-
|
|
84
|
+
- By default, this client runs against the current "base" or major version of the QBO API. This client does not run against the latest QBO API [minor version](https://developer.intuit.com/app/developer/qbo/docs/learn/explore-the-quickbooks-online-api/minor-versions) by default. To run all requests with a specific minor version, you must specify it:
|
|
85
85
|
```ruby
|
|
86
86
|
QboApi.minor_version = 8
|
|
87
87
|
```
|
|
@@ -132,6 +132,12 @@ QboApi.minor_version = 8
|
|
|
132
132
|
p response['status'] # => "Deleted"
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
+
NOTE: If you are deleting a journal entry you have to use the following syntax with the underscore, even though this is inconsistent with how you create journal entries.
|
|
136
|
+
```ruby
|
|
137
|
+
response = qbo_api.delete(:journal_entry, id: 145)
|
|
138
|
+
p response['status'] # => "Deleted"
|
|
139
|
+
```
|
|
140
|
+
|
|
135
141
|
### Deactivate (only works for name list entities)
|
|
136
142
|
```ruby
|
|
137
143
|
response = qbo_api.deactivate(:employee, id: 55)
|
|
@@ -329,29 +335,78 @@ See [docs](https://developer.intuit.com/docs/0100_quickbooks_online/0100_essenti
|
|
|
329
335
|
p qbo_api.is_transaction_entity?(:customer) # => false
|
|
330
336
|
p qbo_api.is_name_list_entity?(:vendors) # => true
|
|
331
337
|
```
|
|
332
|
-
|
|
338
|
+
|
|
339
|
+
### Download Quickbooks PDF
|
|
340
|
+
A quickbooks supplied PDF can be downloaded for api endpoints which offer a PDF.
|
|
341
|
+
```ruby
|
|
342
|
+
qbo_api.get_pdf(:invoice, 121) # produces a pdf stream.
|
|
343
|
+
```
|
|
344
|
+
The PDF stream can then be saved using your preferred method.
|
|
345
|
+
```ruby
|
|
346
|
+
# example using Ruby on Rails with ActiveStorage
|
|
347
|
+
class Invoice
|
|
348
|
+
has_one_attached :pdf_file
|
|
349
|
+
end
|
|
350
|
+
invoice_number = 121
|
|
351
|
+
pdf_data = qbo_api.get_pdf(:invoice, invoice_numer) # returns raw pdf stream
|
|
352
|
+
pdf_io = StringIO.new(pdf_data) # convert to a StringIO object
|
|
353
|
+
filename = "invoice_no_#{invoice_number}"
|
|
354
|
+
|
|
355
|
+
invoice.pdf_file.attach(
|
|
356
|
+
io: pdf_io,
|
|
357
|
+
filename: filename,
|
|
358
|
+
content_type: 'application/pdf'
|
|
359
|
+
)
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
```ruby
|
|
363
|
+
# plain ruby example
|
|
364
|
+
invoice_number = 121
|
|
365
|
+
pdf_data = qbo_api.get_pdf(:invoice, invoice_numer) # returns raw pdf stream
|
|
366
|
+
filename = "invoice_no_#{invoice_number}.pdf"
|
|
367
|
+
|
|
368
|
+
File.write(filename, pdf_data)
|
|
369
|
+
```
|
|
370
|
+
## Spin up an example
|
|
333
371
|
- <a href="http://minimul.com/access-the-quickbooks-online-api-with-oauth2.html" target="_blank">Check out this article on spinning up the example</a>.
|
|
334
|
-
|
|
335
|
-
-
|
|
372
|
+
|
|
373
|
+
- Create a Intuit developer account at [https://developer.intuit.com](https://developer.intuit.com)
|
|
374
|
+
- Create an app in the intuit developer backend
|
|
375
|
+
- Go to [myapps](https://developer.intuit.com/app/developer/myapps)
|
|
376
|
+
- Create an app with both the `Accounting` & `Payments` selected.
|
|
377
|
+
|
|
378
|
+
- Setup the app and gather credentials
|
|
379
|
+
- Go to the [Development Dashboard](https://developer.intuit.com/app/developer/dashboard)
|
|
380
|
+
- Click on your App name
|
|
381
|
+
- Click "Keys & credentials" under Development Settings in left menu
|
|
382
|
+
- Copy the 'Client ID' and the 'Client Secret'
|
|
383
|
+
- Add a Redirect URI: `http://localhost:9393/oauth2-redirect` (or whatever PORT= is in your .env)
|
|
384
|
+
- Create a new Sandbox Company by clicking on "View Sandbox companies"
|
|
385
|
+
Don't use it for anything else besides testing this app.
|
|
386
|
+
- Copy the 'Company ID' for use later
|
|
387
|
+
1. Within 'Sandbox Company_US_1' click on the COG -> Additional info
|
|
388
|
+
2. Copy the 'Company ID'
|
|
389
|
+
|
|
390
|
+
- Setup qbo_api
|
|
391
|
+
- `git clone git://github.com/minimul/qbo_api && cd qbo_api`
|
|
392
|
+
- `bundle`
|
|
393
|
+
|
|
336
394
|
- Create a `.env` file
|
|
337
395
|
- `cp .env.example_app.oauth2 .env`
|
|
338
|
-
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
-
|
|
346
|
-
Don't use it for anything else besides testing this app.
|
|
347
|
-
-. Copy the 'Company ID' to your .env as QBO_API_COMPANY_ID
|
|
348
|
-
- Start up the example app
|
|
396
|
+
- Edit your .env and enter the following
|
|
397
|
+
```
|
|
398
|
+
export QBO_API_CLIENT_ID=[YOUR CLIENT ID]
|
|
399
|
+
export QBO_API_CLIENT_SECRET=[YOUR CLIENT SECRET]
|
|
400
|
+
export QBO_API_COMPANY_ID=[YOUR COMPANY ID]
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
- Start up the example app and test
|
|
349
404
|
- `ruby example/oauth2.rb`
|
|
350
|
-
- Go to `http://localhost:9393/oauth2`
|
|
351
|
-
- Use the `Connect to QuickBooks` button to connect to your QuickBooks sandbox, which you receive when signing up at [https://developer.intuit.com](https://developer.intuit.com).
|
|
352
|
-
- After successfully connecting to your sandbox go to :
|
|
353
|
-
- `http://localhost:9393/oauth2/customer/5`
|
|
405
|
+
- Go to `http://localhost:9393/oauth2`
|
|
406
|
+
- Use the `Connect to QuickBooks` button to connect to your QuickBooks sandbox, which you receive when signing up at [https://developer.intuit.com](https://developer.intuit.com).
|
|
407
|
+
- After successfully connecting to your sandbox go to `http://localhost:9393/oauth2/customer/5`
|
|
354
408
|
- You should see "Dukes Basketball Camp" displayed
|
|
409
|
+
|
|
355
410
|
- Checkout [`example/oauth2.rb`](https://github.com/minimul/qbo_api/blob/master/example/oauth2.rb)
|
|
356
411
|
to see what is going on under the hood.
|
|
357
412
|
|
|
@@ -372,8 +427,8 @@ for how to install ngrok and what it is.
|
|
|
372
427
|
Add the token to your .env as QBO_API_VERIFIER_TOKEN
|
|
373
428
|
|
|
374
429
|
- In another tab, create a customer via the API:
|
|
375
|
-
`bundle exec ruby -rqbo_api -rdotenv -e 'Dotenv.load; p QboApi.new(access_token: ENV.fetch("
|
|
376
|
-
(You'll also need to have added the QBO_API_COMPANY_ID and
|
|
430
|
+
`bundle exec ruby -rqbo_api -rdotenv -e 'Dotenv.load; p QboApi.new(access_token: ENV.fetch("QBO_API_ACCESS_TOKEN"), realm_id: ENV.fetch("QBO_API_COMPANY_ID")).create(:customer, payload: { DisplayName: "TestCustomer" })'`
|
|
431
|
+
(You'll also need to have added the QBO_API_COMPANY_ID and QBO_API_ACCESS_TOKEN to your .env)
|
|
377
432
|
|
|
378
433
|
There could be a delay of up to a minute before the webhook fires.
|
|
379
434
|
|
|
@@ -391,8 +446,8 @@ for how to install ngrok and what it is.
|
|
|
391
446
|
connection = build_connection('https://oauth.platform.intuit.com', headers: { 'Accept' => 'application/json' }) do |conn|
|
|
392
447
|
conn.basic_auth(client_id, client_secret)
|
|
393
448
|
conn.request :url_encoded # application/x-www-form-urlencoded
|
|
394
|
-
conn.
|
|
395
|
-
conn.use
|
|
449
|
+
conn.response :json
|
|
450
|
+
conn.use QboApi::RaiseHttpException
|
|
396
451
|
end
|
|
397
452
|
|
|
398
453
|
raw_response = connection.post do |req|
|
data/example/base.rb
CHANGED
data/lib/qbo_api/api_methods.rb
CHANGED
|
@@ -34,6 +34,11 @@ class QboApi
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
def get_pdf(entity, id)
|
|
38
|
+
path = "#{entity_path(entity)}/#{id}/pdf"
|
|
39
|
+
request(:get, entity: entity, path: path, headers: { 'Accept' => 'application/pdf' })
|
|
40
|
+
end
|
|
41
|
+
|
|
37
42
|
def create(entity, payload:, params: nil)
|
|
38
43
|
request(:post, entity: entity, path: entity_path(entity), payload: payload, params: params)
|
|
39
44
|
end
|
|
@@ -58,6 +63,14 @@ class QboApi
|
|
|
58
63
|
request(:post, entity: entity, path: entity_path(entity), payload: payload)
|
|
59
64
|
end
|
|
60
65
|
|
|
66
|
+
def void(entity, id:)
|
|
67
|
+
err_msg = "Void is only for voidable transaction entities. Use .delete or .deactivate instead"
|
|
68
|
+
raise QboApi::NotImplementedError.new, err_msg unless is_voidable_transaction_entity?(entity)
|
|
69
|
+
path = add_params_to_path(path: entity_path(entity), params: { operation: :void })
|
|
70
|
+
payload = set_update(entity, id)
|
|
71
|
+
request(:post, entity: entity, path: path, payload: payload)
|
|
72
|
+
end
|
|
73
|
+
|
|
61
74
|
private
|
|
62
75
|
|
|
63
76
|
def get_query_str(entity, query_filter_args)
|
data/lib/qbo_api/connection.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require 'faraday'
|
|
2
|
-
require '
|
|
2
|
+
require 'faraday/response/json'
|
|
3
|
+
require 'qbo_api/raise_http_exception'
|
|
3
4
|
require 'faraday/detailed_logger'
|
|
5
|
+
require 'faraday/multipart'
|
|
4
6
|
|
|
5
7
|
class QboApi
|
|
6
8
|
module Connection
|
|
@@ -9,9 +11,10 @@ class QboApi
|
|
|
9
11
|
headers['Accept'] ||= 'application/json'
|
|
10
12
|
headers['Content-Type'] ||= 'application/json;charset=UTF-8'
|
|
11
13
|
build_connection(url, headers: headers) do |conn|
|
|
14
|
+
conn.response :json
|
|
12
15
|
add_authorization_middleware(conn)
|
|
13
|
-
add_exception_middleware(conn)
|
|
14
16
|
conn.request :url_encoded
|
|
17
|
+
add_exception_middleware(conn)
|
|
15
18
|
add_connection_adapter(conn)
|
|
16
19
|
end
|
|
17
20
|
end
|
|
@@ -22,6 +25,7 @@ class QboApi
|
|
|
22
25
|
'Accept' => 'application/json'
|
|
23
26
|
}
|
|
24
27
|
build_connection(url, headers: headers) do |conn|
|
|
28
|
+
conn.response :json
|
|
25
29
|
add_authorization_middleware(conn)
|
|
26
30
|
add_exception_middleware(conn)
|
|
27
31
|
conn.request :multipart
|
|
@@ -39,7 +43,7 @@ class QboApi
|
|
|
39
43
|
|
|
40
44
|
def request(method, path:, entity: nil, payload: nil, params: nil, headers: nil)
|
|
41
45
|
raw_response = raw_request(method, conn: connection, path: path, params: params, payload: payload, headers: headers)
|
|
42
|
-
response(raw_response, entity: entity)
|
|
46
|
+
response(raw_response, entity: entity, headers: headers)
|
|
43
47
|
end
|
|
44
48
|
|
|
45
49
|
def raw_request(method, conn:, path:, payload: nil, params: nil, headers: nil)
|
|
@@ -59,22 +63,20 @@ class QboApi
|
|
|
59
63
|
end
|
|
60
64
|
end
|
|
61
65
|
|
|
62
|
-
def response(resp, entity: nil)
|
|
63
|
-
data =
|
|
66
|
+
def response(resp, entity: nil, headers: false)
|
|
67
|
+
data = resp.body
|
|
68
|
+
|
|
69
|
+
if headers
|
|
70
|
+
content_type = headers['Accept'] || headers['Content-Type']
|
|
71
|
+
return data if content_type&.include?('application/pdf')
|
|
72
|
+
end
|
|
73
|
+
|
|
64
74
|
entity ? entity_response(data, entity) : data
|
|
65
75
|
rescue => e
|
|
66
76
|
QboApi.logger.debug { "#{LOG_TAG} response parsing error: entity=#{entity.inspect} body=#{resp.body.inspect} exception=#{e.inspect}" }
|
|
67
77
|
data
|
|
68
78
|
end
|
|
69
79
|
|
|
70
|
-
def parse_response_body(resp)
|
|
71
|
-
body = resp.body
|
|
72
|
-
case resp.headers['Content-Type']
|
|
73
|
-
when /json/ then JSON.parse(body)
|
|
74
|
-
else body
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
|
|
78
80
|
private
|
|
79
81
|
|
|
80
82
|
def entity_response(data, entity)
|
|
@@ -101,11 +103,14 @@ class QboApi
|
|
|
101
103
|
end
|
|
102
104
|
|
|
103
105
|
def add_exception_middleware(conn)
|
|
104
|
-
conn.use
|
|
106
|
+
conn.use QboApi::RaiseHttpException
|
|
105
107
|
end
|
|
106
108
|
|
|
109
|
+
# Faraday 2 deprecated the FaradayMiddleware gem. Middleware is
|
|
110
|
+
# now part of Faraday itself, and :authorization can be used to pass
|
|
111
|
+
# the Bearer token.
|
|
107
112
|
def add_authorization_middleware(conn)
|
|
108
|
-
conn.request :
|
|
113
|
+
conn.request :authorization, 'Bearer', access_token
|
|
109
114
|
end
|
|
110
115
|
|
|
111
116
|
def entity_name(entity)
|
data/lib/qbo_api/entity.rb
CHANGED
|
@@ -20,6 +20,19 @@ class QboApi
|
|
|
20
20
|
sym.to_s.split('_').collect(&:capitalize).join
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
def is_voidable_transaction_entity?(entity)
|
|
24
|
+
voidable_transaction_entities.include?(singular(entity))
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def voidable_transaction_entities
|
|
28
|
+
%w{
|
|
29
|
+
BillPayment
|
|
30
|
+
Invoice
|
|
31
|
+
Payment
|
|
32
|
+
SalesReceipt
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
23
36
|
def is_transaction_entity?(entity)
|
|
24
37
|
transaction_entities.include?(singular(entity))
|
|
25
38
|
end
|
data/lib/qbo_api/error.rb
CHANGED
|
@@ -13,11 +13,25 @@ class QboApi
|
|
|
13
13
|
class Error < StandardError
|
|
14
14
|
attr_reader :fault
|
|
15
15
|
|
|
16
|
-
def initialize(errors =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
def initialize(errors = {})
|
|
17
|
+
@fault = errors
|
|
18
|
+
super(errors[:error_body])
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def fault_type
|
|
22
|
+
fault.dig(:error_body, 0, :fault_type)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def error_code
|
|
26
|
+
fault.dig(:error_body, 0, :error_code)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def error_message
|
|
30
|
+
fault.dig(:error_body, 0, :error_message)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def error_detail
|
|
34
|
+
fault.dig(:error_body, 0, :error_detail)
|
|
21
35
|
end
|
|
22
36
|
end
|
|
23
37
|
|
|
@@ -1,32 +1,44 @@
|
|
|
1
1
|
require 'faraday'
|
|
2
|
+
require 'faraday/response'
|
|
2
3
|
require 'nokogiri'
|
|
3
4
|
# @private
|
|
4
|
-
|
|
5
|
+
class QboApi
|
|
5
6
|
# @private
|
|
6
|
-
class RaiseHttpException < Faraday::
|
|
7
|
-
def
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
7
|
+
class RaiseHttpException < Faraday::Response::RaiseError
|
|
8
|
+
def on_complete(env)
|
|
9
|
+
case env[:status]
|
|
10
|
+
when 400
|
|
11
|
+
raise QboApi::BadRequest.new(error_message(env))
|
|
12
|
+
when 401
|
|
13
|
+
raise QboApi::Unauthorized.new(error_message(env))
|
|
14
|
+
when 403
|
|
15
|
+
raise QboApi::Forbidden.new(error_message(env))
|
|
16
|
+
when 404
|
|
17
|
+
raise QboApi::NotFound.new(error_message(env))
|
|
18
|
+
when 407
|
|
19
|
+
# mimic the behavior that we get with proxy requests with HTTPS
|
|
20
|
+
msg = %(407 "Proxy Authentication Required")
|
|
21
|
+
raise Faraday::ProxyAuthError.new(msg, response_values(env))
|
|
22
|
+
when 409
|
|
23
|
+
raise Faraday::ConflictError, response_values(env)
|
|
24
|
+
when 422
|
|
25
|
+
raise Faraday::UnprocessableEntityError, response_values(env)
|
|
26
|
+
when 429
|
|
27
|
+
raise QboApi::TooManyRequests.new(error_message(env))
|
|
28
|
+
when 500
|
|
29
|
+
raise QboApi::InternalServerError.new(error_message(env))
|
|
30
|
+
when 502
|
|
31
|
+
raise QboApi::BadGateway.new({ error_body: env.reason_phrase })
|
|
32
|
+
when 503
|
|
33
|
+
raise QboApi::ServiceUnavailable.new(error_message(env))
|
|
34
|
+
when 504
|
|
35
|
+
raise QboApi::GatewayTimeout.new(error_message(env))
|
|
36
|
+
when ClientErrorStatuses
|
|
37
|
+
raise Faraday::ClientError, response_values(env)
|
|
38
|
+
when ServerErrorStatuses
|
|
39
|
+
raise Faraday::ServerError, response_values(env)
|
|
40
|
+
when nil
|
|
41
|
+
raise Faraday::NilStatusError, response_values(env)
|
|
30
42
|
end
|
|
31
43
|
end
|
|
32
44
|
|
|
@@ -36,13 +48,13 @@ module FaradayMiddleware
|
|
|
36
48
|
|
|
37
49
|
private
|
|
38
50
|
|
|
39
|
-
def error_message(
|
|
51
|
+
def error_message(env)
|
|
40
52
|
{
|
|
41
|
-
method:
|
|
42
|
-
url:
|
|
43
|
-
status:
|
|
44
|
-
error_body: error_body(
|
|
45
|
-
intuit_tid:
|
|
53
|
+
method: env.method,
|
|
54
|
+
url: env.url,
|
|
55
|
+
status: env.status,
|
|
56
|
+
error_body: error_body(env.body),
|
|
57
|
+
intuit_tid: env[:response_headers]['intuit_tid']
|
|
46
58
|
}
|
|
47
59
|
end
|
|
48
60
|
|
data/lib/qbo_api/version.rb
CHANGED
data/qbo_api.gemspec
CHANGED
|
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
|
|
|
25
25
|
spec.add_development_dependency 'dotenv'
|
|
26
26
|
spec.add_development_dependency 'vcr'
|
|
27
27
|
spec.add_development_dependency 'amazing_print'
|
|
28
|
-
spec.add_runtime_dependency 'faraday'
|
|
29
|
-
spec.add_runtime_dependency 'faraday_middleware'
|
|
28
|
+
spec.add_runtime_dependency 'faraday', '>= 1.10.0'
|
|
30
29
|
spec.add_runtime_dependency 'faraday-detailed_logger'
|
|
30
|
+
spec.add_runtime_dependency 'faraday-multipart'
|
|
31
31
|
spec.add_runtime_dependency 'nokogiri'
|
|
32
32
|
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:
|
|
4
|
+
version: 3.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christian Pelczarski
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-07-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -114,16 +114,16 @@ dependencies:
|
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
117
|
+
version: 1.10.0
|
|
118
118
|
type: :runtime
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
124
|
+
version: 1.10.0
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
126
|
+
name: faraday-detailed_logger
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
129
|
- - ">="
|
|
@@ -137,7 +137,7 @@ dependencies:
|
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name: faraday-
|
|
140
|
+
name: faraday-multipart
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - ">="
|
|
@@ -164,7 +164,7 @@ dependencies:
|
|
|
164
164
|
- - ">="
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
166
|
version: '0'
|
|
167
|
-
description:
|
|
167
|
+
description:
|
|
168
168
|
email:
|
|
169
169
|
- christian@minimul.com
|
|
170
170
|
executables: []
|
|
@@ -173,6 +173,8 @@ extra_rdoc_files: []
|
|
|
173
173
|
files:
|
|
174
174
|
- ".env.example_app.oauth2"
|
|
175
175
|
- ".env.test"
|
|
176
|
+
- ".github/dependabot.yml"
|
|
177
|
+
- ".github/workflows/ci.yaml"
|
|
176
178
|
- ".gitignore"
|
|
177
179
|
- ".travis.yml"
|
|
178
180
|
- Gemfile
|
|
@@ -204,7 +206,7 @@ homepage: https://github.com/minimul/qbo_api
|
|
|
204
206
|
licenses:
|
|
205
207
|
- MIT
|
|
206
208
|
metadata: {}
|
|
207
|
-
post_install_message:
|
|
209
|
+
post_install_message:
|
|
208
210
|
rdoc_options: []
|
|
209
211
|
require_paths:
|
|
210
212
|
- lib
|
|
@@ -219,8 +221,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
219
221
|
- !ruby/object:Gem::Version
|
|
220
222
|
version: '0'
|
|
221
223
|
requirements: []
|
|
222
|
-
rubygems_version: 3.
|
|
223
|
-
signing_key:
|
|
224
|
+
rubygems_version: 3.3.26
|
|
225
|
+
signing_key:
|
|
224
226
|
specification_version: 4
|
|
225
227
|
summary: Ruby JSON-only client for QuickBooks Online API v3. Built on top of the Faraday
|
|
226
228
|
gem.
|