qbwc 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -1
- data/.travis.yml +6 -0
- data/README.md +152 -144
- data/Rakefile +7 -1
- data/lib/generators/qbwc/install/install_generator.rb +20 -4
- data/lib/generators/qbwc/install/templates/config/qbwc.rb +42 -26
- data/lib/generators/qbwc/install/templates/controllers/qbwc_controller.rb +2 -38
- data/lib/generators/qbwc/install/templates/db/migrate/create_qbwc_jobs.rb +15 -0
- data/lib/generators/qbwc/install/templates/db/migrate/create_qbwc_sessions.rb +16 -0
- data/lib/qbwc.rb +107 -71
- data/lib/qbwc/active_record.rb +6 -0
- data/lib/qbwc/active_record/job.rb +111 -0
- data/lib/qbwc/active_record/session.rb +52 -0
- data/lib/qbwc/controller.rb +176 -0
- data/lib/qbwc/job.rb +81 -18
- data/lib/qbwc/railtie.rb +8 -0
- data/lib/qbwc/request.rb +14 -23
- data/lib/qbwc/session.rb +100 -72
- data/lib/qbwc/version.rb +1 -1
- data/lib/qbwc/worker.rb +16 -0
- data/qbwc.gemspec +11 -5
- data/test/qbwc/controllers/controller_test.rb +157 -0
- data/test/qbwc/integration/job_management_test.rb +86 -0
- data/test/qbwc/integration/request_generation_test.rb +340 -0
- data/test/qbwc/integration/response_test.rb +303 -0
- data/test/qbwc/integration/routes_test.rb +38 -0
- data/test/qbwc/integration/session_test.rb +94 -0
- data/test/test_helper.rb +248 -0
- data/test/wash_out_helper.rb +76 -0
- metadata +133 -55
- data/Gemfile.lock +0 -72
- data/lib/qbwc/soap_wrapper.rb +0 -35
- data/lib/qbwc/soap_wrapper/QBWebConnectorSvc.rb +0 -69
- data/lib/qbwc/soap_wrapper/QBWebConnectorSvc.wsdl +0 -312
- data/lib/qbwc/soap_wrapper/default.rb +0 -198
- data/lib/qbwc/soap_wrapper/defaultMappingRegistry.rb +0 -163
- data/lib/qbwc/soap_wrapper/defaultServant.rb +0 -133
- data/spec/spec_helper.rb +0 -17
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 29001e1940a32d3b067eccfb012a676fef8791e5
|
4
|
+
data.tar.gz: 5700d148297caecaf087fb73c8ac4aebe27f2cba
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c12ab12caac68c60bbfc08977acc0c60346ee5d53870e45175ae1f02cd06d2237ed6b80e06a799129b8f41f5491ea00fae502fe74069d2d266b99e729ef15286
|
7
|
+
data.tar.gz: 1bece5acbd95f05a7eaf06f23df0c2726718e1082571e630ac0ba8fe296b708c7727fdcafa8d914bc5eb7f0299f7dda735baaa64895730026b3d186e8cd136ba
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,182 +1,190 @@
|
|
1
|
-
|
1
|
+
QBWC lets your Rails 4 application talk to QuickBooks Desktop.
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](https://travis-ci.org/qbwc/qbwc.svg?branch=master)](https://travis-ci.org/qbwc/qbwc)
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
`gem install qbwc`
|
8
8
|
|
9
|
-
|
9
|
+
Or add it to your Gemfile
|
10
10
|
|
11
|
-
|
11
|
+
`gem "qbwc"`
|
12
12
|
|
13
|
-
|
13
|
+
and run
|
14
|
+
|
15
|
+
`bundle install`
|
16
|
+
|
17
|
+
## Configuration
|
14
18
|
|
15
19
|
Run the generator:
|
16
20
|
|
17
|
-
|
21
|
+
`rails generate qbwc:install`
|
22
|
+
|
23
|
+
Then the migrations:
|
24
|
+
|
25
|
+
`rake db:migrate`
|
26
|
+
|
27
|
+
Open `config/initializers/qbwc.rb` and check the settings there. (Re-)start your app.
|
28
|
+
|
29
|
+
Quickbooks *requires* HTTPS connections when connecting to remote machines. [ngrok](https://ngrok.com/) may be useful to fulfill this requirement.
|
30
|
+
|
31
|
+
|
32
|
+
### Authentication and multiple company files ###
|
33
|
+
|
34
|
+
If connecting to more than one company file or if you want different logins for different users, you can configure QBWC authentication. This is a `Proc` in `config/initializers/qbwc.rb` that accepts the username and password and returns the path to the QuickBooks company file to access:
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
c.authenticator = Proc.new{|username, password|
|
38
|
+
# qubert can access Oceanic
|
39
|
+
next "C:\\QuickBooks\\Oceanic.QBW" if username == "qubert" && password == "brittany"
|
40
|
+
# quimby can access Veridian
|
41
|
+
next "C:\\QuickBooks\\Veridian.QBW" if username == "quimby" && password == "bethany"
|
42
|
+
# no one else has access
|
43
|
+
next nil
|
44
|
+
}
|
45
|
+
```
|
46
|
+
|
47
|
+
## QuickBooks configuration
|
48
|
+
|
49
|
+
Install [QuickBooks Web Connector](http://marketplace.intuit.com/webconnector/) on the machine that has QuickBooks installed.
|
50
|
+
|
51
|
+
For a single-user, single-company install, on the QuickBooks machine, visit the path /qbwc/qwc on your domain over an HTTPS connection. Download the file it provides. In QuickBooks Web Connector, click "Add an application", and pick the file. Give Quickbooks the password you specified in `config/initializers/qbwc.rb`.
|
52
|
+
|
53
|
+
At this point, QuickBooks Web Connector should be able to send requests to your app, but will have nothing to do, and say "No data exchange required".
|
54
|
+
|
55
|
+
### Multiple users and multiple company files ###
|
56
|
+
|
57
|
+
If you want to have more than one person to connect to the same QuickBooks company file, you will need to manually edit the QWC file to change the `OwnerID` (any GUID will do) before giving it to QuickBooks Web Connector.
|
58
|
+
|
59
|
+
If you want each person to have their own login, set up authentication per [Authentication and multiple company files](#authentication-and-multiple-company-files). In the QWC file, you will need to change `UserName`.
|
60
|
+
|
61
|
+
If you are connecting to multiple company files, you will additionally need to change `AppName` and `FileID` (any GUID) to be unique to each file.
|
62
|
+
|
63
|
+
|
64
|
+
## Creating jobs
|
65
|
+
|
66
|
+
QuickBooks Web Connector (the app you installed above) acts as the HTTP client, and your app acts as the HTTP server. To have QuickBooks perform tasks, you must add a qbwc job to your app, then get QuickBooks Web Connector to check your app for work to do.
|
18
67
|
|
19
|
-
|
68
|
+
To create a job (e.g. from `rails console` or wherever):
|
20
69
|
|
21
|
-
|
70
|
+
```ruby
|
71
|
+
require 'qbwc'
|
72
|
+
QBWC.add_job(:list_customers, true, '', CustomerTestWorker)
|
73
|
+
```
|
22
74
|
|
23
|
-
*
|
24
|
-
*
|
75
|
+
* The first argument is a unique name for the job. You can use this later to disable or delete the job.
|
76
|
+
* The second argument indicates whether the job is initially enabled.
|
77
|
+
* The third argument specifies the path to the QuickBooks company file this job affects. An empty string will make the job run against any company file.
|
78
|
+
* The fourth argument is your worker class. See the next section for a description of workers.
|
25
79
|
|
26
|
-
|
80
|
+
Your job will be persisted in your database and will remain active and run every time QuickBooks Web Connector runs an update. If you don't want this to happen, you can have have your job disable or delete itself after completion. For example:
|
27
81
|
|
28
|
-
|
82
|
+
```ruby
|
83
|
+
def handle_response(r, session, job, request, data)
|
84
|
+
QBWC.delete_job(job)
|
85
|
+
end
|
29
86
|
|
30
|
-
|
87
|
+
```
|
31
88
|
|
32
|
-
|
89
|
+
Alternately, you can custom logic in your worker's `requests` and `should_run?` methods, as described below.
|
33
90
|
|
34
|
-
The QBWC gem provides a persistent work queue for the Web Connector to talk to.
|
35
|
-
|
36
|
-
Every time the Web Connector initiates a new conversation with the application a
|
37
|
-
Session will be created. The Session is a collection of jobs and the requests
|
38
|
-
that comprise these jobs. A new Session will automatically queue up all the work
|
39
|
-
available across all currently enabled jobs for processing by the web connector.
|
40
|
-
The session instance will persist across all requests until the work it contains
|
41
|
-
has been exhausted. You never have to interact with the Session class directly
|
42
|
-
(unless you want to...) since creating a new job will automatically add it's
|
43
|
-
work to the next session instance.
|
44
|
-
|
45
|
-
A Job is just a named work queue. It consists of a name and a code block. The
|
46
|
-
block can contain:
|
47
|
-
|
48
|
-
* A single qbxml request
|
49
|
-
* An array of qbxml requests
|
50
|
-
* Code that genrates a qbxml request
|
51
|
-
* Code that generates an array of qbxml requests
|
52
|
-
|
53
|
-
*Note: All requests may be in ruby hash form, generated using quickbooks_api.
|
54
|
-
Raw requests are supported supported as of 0.0.3 (8/28/2012)*
|
55
|
-
|
56
|
-
The code block is re-evaluated every time a session instance with that job is
|
57
|
-
created. Only enabled jobs are added to a new session instance.
|
58
|
-
|
59
|
-
An optional response processor block can also be added to a job. Responses to
|
60
|
-
all requests are either processed immediately after being received or saved for
|
61
|
-
processing after the web connector closes its connection. The delayed processing
|
62
|
-
configuration option decides this.
|
63
|
-
|
64
|
-
Here is the rough order in which things happen:
|
65
|
-
|
66
|
-
1. The Web Connector initiates a connection
|
67
|
-
2. A new Session is created (with work from all enabled jobs)
|
68
|
-
3. The web connector requests work
|
69
|
-
4. The session responds with the next request in the work queue
|
70
|
-
5. The web connector provides a response
|
71
|
-
6. The session responds with the current progress of the work queue (0 - 100)
|
72
|
-
6. The response is processed or saved for later processing
|
73
|
-
7. If progress == 100 then the web connector closes the connection, otherwise goto 3
|
74
|
-
8. Saved responses are processed if any exist
|
75
91
|
|
76
|
-
|
92
|
+
## Workers ##
|
77
93
|
|
78
|
-
|
94
|
+
A job is associated to a worker, which is an object descending from `QBWC::Worker` that can define three methods:
|
79
95
|
|
80
|
-
|
81
|
-
|
82
|
-
|
96
|
+
- `requests(job)` - defines the request(s) that QuickBooks should process - returns a `Hash` or an `Array` of `Hash`es.
|
97
|
+
- `should_run?(job)` - whether this job should run (e.g. you can have a job run only under certain circumstances) - returns `Boolean` and defaults to `true`.
|
98
|
+
- `handle_response(response, session, job, request, data)` - defines what to do with the response from Quickbooks.
|
83
99
|
|
84
|
-
|
100
|
+
All three methods are not invoked until a QuickBooks Web Connector session has been established with your web service.
|
85
101
|
|
86
|
-
|
87
|
-
# response processing work here
|
88
|
-
end
|
102
|
+
A sample worker to get a list of customers from QuickBooks:
|
89
103
|
|
90
|
-
|
91
|
-
|
92
|
-
* Using a non unique job name will overwrite the existing job
|
104
|
+
```ruby
|
105
|
+
require 'qbwc'
|
93
106
|
|
94
|
-
|
107
|
+
class CustomerTestWorker < QBWC::Worker
|
95
108
|
|
96
|
-
|
109
|
+
def requests(job)
|
110
|
+
{
|
111
|
+
:customer_query_rq => {
|
112
|
+
:xml_attributes => { "requestID" =>"1", 'iterator' => "Start" },
|
113
|
+
:max_returned => 100
|
114
|
+
}
|
115
|
+
}
|
116
|
+
end
|
97
117
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
:xml_attributes => { "onError" => "stopOnError"},
|
102
|
-
:customer_add_rq =>
|
103
|
-
[
|
104
|
-
{
|
105
|
-
:xml_attributes => {"requestID" => "1"}, ##Optional
|
106
|
-
:customer_add => { :name => "GermanGR" }
|
107
|
-
}
|
108
|
-
]
|
109
|
-
}
|
110
|
-
]
|
111
|
-
}
|
112
|
-
|
113
|
-
Add a Customer (Unwrapped)
|
118
|
+
def handle_response(r, session, job, request, data)
|
119
|
+
# handle_response will get customers in groups of 100. When this is 0, we're done.
|
120
|
+
complete = r['xml_attributes']['iteratorRemainingCount'] == '0'
|
114
121
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
}
|
122
|
-
]
|
123
|
-
}
|
122
|
+
r['customer_ret'].each do |qb_cus|
|
123
|
+
qb_id = qb_cus['list_id']
|
124
|
+
qb_name = qb_cus['name']
|
125
|
+
Rails.logger.info("#{qb_id} #{qb_name}")
|
126
|
+
end
|
127
|
+
end
|
124
128
|
|
125
|
-
|
126
|
-
|
127
|
-
QBWC.add_job(:import_vendors) do
|
128
|
-
[
|
129
|
-
:vendor_query_rq =>
|
130
|
-
{
|
131
|
-
:xml_attributes => { "requestID" =>"1", 'iterator' => "Start" },
|
132
|
-
|
133
|
-
:max_returned => 5,
|
134
|
-
:owner_id => 0,
|
135
|
-
:from_modified_date=> "1984-01-29T22:03:19"
|
136
|
-
|
137
|
-
}
|
138
|
-
]
|
139
|
-
end
|
140
|
-
|
141
|
-
Get All Vendors (Raw QBXML)
|
142
|
-
|
143
|
-
QBWC.add_job(:import_vendors) do
|
144
|
-
'<QBXML>
|
145
|
-
<QBXMLMsgsRq onError="continueOnError">
|
146
|
-
<VendorQueryRq requestID="6" iterator="Start">
|
147
|
-
<MaxReturned>5</MaxReturned>
|
148
|
-
<FromModifiedDate>1984-01-29T22:03:19-05:00</FromModifiedDate>
|
149
|
-
<OwnerID>0</OwnerID>
|
150
|
-
</VendorQueryRq>
|
151
|
-
</QBXMLMsgsRq>
|
152
|
-
</QBXML>
|
153
|
-
'
|
154
|
-
end
|
155
|
-
|
156
|
-
### Managing Jobs
|
157
|
-
|
158
|
-
Jobs can be added, removed, enabled, and disabled. See the above section for
|
159
|
-
details on adding new jobs.
|
160
|
-
|
161
|
-
Removing jobs is as easy as deleting them from the jobs hash.
|
162
|
-
|
163
|
-
QBWC.jobs.delete('my job')
|
164
|
-
|
165
|
-
Disabling a job
|
166
|
-
|
167
|
-
QBWC.jobs['my job'].disable
|
168
|
-
|
169
|
-
Enabling a job
|
170
|
-
|
171
|
-
QBWC.jobs['my job'].enable
|
129
|
+
end
|
130
|
+
```
|
172
131
|
|
173
132
|
|
133
|
+
Use the [Onscreen Reference for Intuit Software Development Kits](https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html) (use Format: qbXML) to see request and response formats to use in your jobs. Use underscored, lowercased versions of all tags (e.g. `customer_query_rq`, not `CustomerQueryRq`).
|
134
|
+
|
135
|
+
### Referencing memory values when constructing requests ###
|
136
|
+
|
137
|
+
A `QBWC::Worker#requests` method cannot access values that are in-memory (global variables, local variables, model attributes, etc.) at the time that `QBWC.add_job` is called; however, in lieu of using `QBWC::Worker#requests`, you can construct and pass requests directly to `QBWC.add_job` (`Hash`, `String`, or array of `Hash`es and `String`s). These requests will be immediately persisted by `QBWC.add_job` (in contrast to requests constructed by `QBWC::Worker#requests`, which are persisted during a QuickBooks Web Connector session).
|
138
|
+
|
139
|
+
If requests are passed to `QBWC.add_job`, the `requests` method on your worker will be ignored.
|
140
|
+
|
141
|
+
### Referencing memory values when handling responses ###
|
142
|
+
|
143
|
+
Similarly, a `QBWC::Worker#handle_response` method cannot access variables that are in-memory at the time that `QBWC.add_job` is called; however, you can optionally pass a serializable value (for example, String, Array, or Hash) to `QBWC.add_job`. This data will immediately be persisted by `QBWC.add_job`, then later passed to `QBWC::Worker#handle_response` during a QuickBooks Web Connector session.
|
144
|
+
|
145
|
+
## Sessions ##
|
146
|
+
|
147
|
+
In certain cases, you may want to perform some initialization prior to each QuickBooks Web Connector session. For this purpose, you may optionally provide initialization code that will be invoked once when each QuickBooks Web Connector session is established, and prior to executing any queued jobs. This initialization code will not be invoked for any session in which no jobs are queued.
|
148
|
+
|
149
|
+
You assign this initialization code either (a) during configuration, and/or (b) in application code by calling `set_session_initializer` (prior to any QuickBooks Web Connector session being established). For example:
|
150
|
+
|
151
|
+
In config/initializers/qbwc.rb:
|
152
|
+
|
153
|
+
```ruby
|
154
|
+
c.session_initializer = Proc.new{|session|
|
155
|
+
puts "New QuickBooks Web Connector session has been established (configured session initializer)"
|
156
|
+
}
|
157
|
+
```
|
158
|
+
|
159
|
+
In application code:
|
160
|
+
```ruby
|
161
|
+
require 'qbwc'
|
162
|
+
|
163
|
+
QBWC.set_session_initializer() do |session|
|
164
|
+
puts "New QuickBooks Web Connector session has been established (overridden session initializer)"
|
165
|
+
@information_from_jobs = {}
|
166
|
+
end if the_application_needs_a_different_session_initializer
|
167
|
+
|
168
|
+
QBWC.add_job(:list_customers, false, '', CustomerTestWorker)
|
169
|
+
|
170
|
+
```
|
171
|
+
|
172
|
+
Note: If you `set_session initializer` in your application code, you're only affecting the process that your application code runs in. A request to another process (e.g. if you're multiprocess or you restarted the server) means that QBWC won't see the session initializer.
|
173
|
+
|
174
|
+
Note: a QuickBooks Web Connector session is established when you manually run (update) an application's web service in QuickBooks Web Connector, or when QuickBooks Web Connector automatically executes a scheduled update.
|
175
|
+
|
176
|
+
## Handling errors ##
|
177
|
+
|
178
|
+
By default, when an error response is received from QuickBooks, `QBWC::Worker#handle_response` will be invoked but no further requests will be processed in the current job or in subsequent jobs. However, the job will remain persisted and so will be attempted again at next QuickBooks Web Connector session. Unless there is some intervention, presumably the job will fail again and block all remaining jobs and their requests from being serviced.
|
179
|
+
|
180
|
+
To have qbwc continue with the next request after receiving an error, set `on_error` to `:continue` in `config/initializers/qbwc.rb`.
|
181
|
+
|
174
182
|
## Contributing to qbwc
|
175
|
-
|
183
|
+
|
176
184
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
177
185
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
178
186
|
* Fork the project
|
179
187
|
* Start a feature/bugfix branch
|
180
188
|
* Commit and push until you are happy with your contribution
|
181
189
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
182
|
-
*
|
190
|
+
* Run tests - `rake test`.
|
data/Rakefile
CHANGED
@@ -1,24 +1,40 @@
|
|
1
1
|
require 'rails/generators'
|
2
|
+
require 'rails/generators/active_record'
|
2
3
|
|
3
4
|
module QBWC
|
4
5
|
module Generators
|
5
6
|
class InstallGenerator < Rails::Generators::Base
|
7
|
+
include Rails::Generators::Migration
|
8
|
+
extend Rails::Generators::Migration
|
9
|
+
|
6
10
|
namespace "qbwc:install"
|
7
11
|
desc "Copy Quickbooks Web Connector default files"
|
8
12
|
source_root File.expand_path('../templates', __FILE__)
|
13
|
+
argument :controller_name, :type => :string, :default => 'qbwc'
|
9
14
|
|
10
15
|
def copy_config
|
11
16
|
template('config/qbwc.rb', "config/initializers/qbwc.rb")
|
12
17
|
end
|
13
18
|
|
14
19
|
def copy_controller
|
15
|
-
template('controllers/qbwc_controller.rb', "app/controllers
|
20
|
+
template('controllers/qbwc_controller.rb', "app/controllers/#{controller_name}_controller.rb")
|
21
|
+
end
|
22
|
+
|
23
|
+
def active_record
|
24
|
+
migration_template 'db/migrate/create_qbwc_jobs.rb', 'db/migrate/create_qbwc_jobs.rb'
|
25
|
+
migration_template 'db/migrate/create_qbwc_sessions.rb', 'db/migrate/create_qbwc_sessions.rb'
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.next_migration_number(dirname)
|
29
|
+
::ActiveRecord::Generators::Base.next_migration_number(dirname)
|
16
30
|
end
|
17
31
|
|
18
|
-
|
19
|
-
route("
|
32
|
+
def setup_routes
|
33
|
+
route("wash_out :#{controller_name}")
|
34
|
+
route("get '#{controller_name}/qwc' => '#{controller_name}#qwc'")
|
35
|
+
route("get '#{controller_name}/action' => '#{controller_name}#_generate_wsdl'")
|
20
36
|
end
|
21
37
|
|
22
38
|
end
|
23
39
|
end
|
24
|
-
end
|
40
|
+
end
|
@@ -1,39 +1,55 @@
|
|
1
1
|
QBWC.configure do |c|
|
2
|
-
|
3
|
-
#
|
2
|
+
|
3
|
+
# Credentials to be entered in QuickBooks Web Connector.
|
4
4
|
c.username = "foo"
|
5
5
|
c.password = "bar"
|
6
|
-
|
7
|
-
#Path to
|
6
|
+
|
7
|
+
# Path to QuickBooks company file on the client. Empty string to use whatever file is open when the connector runs.
|
8
8
|
c.company_file_path = ""
|
9
|
+
|
10
|
+
# Instead of using hard coded username, password, and path, use a proc
|
11
|
+
# to determine who has access to what. Useful for multiple users or
|
12
|
+
# multiple company files.
|
13
|
+
# c.authenticator = Proc.new{|username, password|
|
14
|
+
# # qubert can access Oceanic
|
15
|
+
# next "C:\\QuickBooks\\Oceanic.QBW" if username == "qubert" && password == "brittany"
|
16
|
+
# # quimby can access Veridian
|
17
|
+
# next "C:\\QuickBooks\\Veridian.QBW" if username == "quimby" && password == "bethany"
|
18
|
+
# # no one else has access
|
19
|
+
# next nil
|
20
|
+
# }
|
21
|
+
|
22
|
+
# Code to execute after each session is authenticated
|
23
|
+
# Can be re-assigned by calling QBWC.set_session_initializer
|
24
|
+
# c.session_initializer = Proc.new{|session|
|
25
|
+
# puts "New QuickBooks Web Connector session has been established"
|
26
|
+
# }
|
27
|
+
|
28
|
+
# QBXML version to use. Check the "Implementation" column in the QuickBooks Onscreen Reference to see which fields are supported in which versions. Newer versions of QuickBooks are backwards compatible with older QBXML versions.
|
29
|
+
c.min_version = "7.0"
|
9
30
|
|
10
|
-
#
|
11
|
-
c.min_version = 7.0
|
12
|
-
|
13
|
-
#Quickbooks Type (either :qb or :qbpos)
|
31
|
+
# Quickbooks type (either :qb or :qbpos).
|
14
32
|
c.api = :qb
|
33
|
+
|
34
|
+
# Storage module. Only :active_record is currently supported.
|
35
|
+
c.storage = :active_record
|
15
36
|
|
16
|
-
#
|
17
|
-
c.support_site_url =
|
37
|
+
# Support URL shown in QuickBooks Web Connector. nil will use root path of the app.
|
38
|
+
c.support_site_url = nil
|
18
39
|
|
19
|
-
#
|
40
|
+
# Unique user GUID. If you want access by multiple users to the same file, you will need to modify this in the generated QWC file.
|
20
41
|
c.owner_id = '{57F3B9B1-86F1-4fcc-B1EE-566DE1813D20}'
|
21
42
|
|
22
|
-
#
|
23
|
-
|
24
|
-
|
25
|
-
#
|
26
|
-
c.delayed_processing = false
|
27
|
-
|
28
|
-
# In the event of an error in the communication process do you wish the sync to stop or blaze through
|
29
|
-
#
|
30
|
-
# Options:
|
31
|
-
# :stop
|
32
|
-
# :continue
|
43
|
+
# How often to run web service (in minutes) or nil to only run manually.
|
44
|
+
c.minutes_to_run = nil
|
45
|
+
|
46
|
+
# In the event of an error running requests, :stop all work or :continue with the next request?
|
33
47
|
c.on_error = :stop
|
34
48
|
|
35
|
-
#
|
36
|
-
|
37
|
-
|
38
|
-
|
49
|
+
# Logger to use.
|
50
|
+
c.logger = Rails.logger
|
51
|
+
|
52
|
+
# Some log lines contain sensitive information
|
53
|
+
# (default false on production, true otherwise)
|
54
|
+
# c.log_requests_and_responses = false
|
39
55
|
end
|