https://github.com/qbwc/qbxml
QBXML Parser and Validation Tool
https://github.com/qbwc/qbxml
quickbooks ruby
Last synced: 20 days ago
JSON representation
QBXML Parser and Validation Tool
- Host: GitHub
- URL: https://github.com/qbwc/qbxml
- Owner: qbwc
- License: mit
- Created: 2012-12-12T12:35:27.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2026-04-01T00:46:59.000Z (24 days ago)
- Last Synced: 2026-04-01T02:51:00.717Z (24 days ago)
- Topics: quickbooks, ruby
- Language: Ruby
- Size: 279 KB
- Stars: 30
- Watchers: 4
- Forks: 42
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
qbxml is a QBXML parser and validation tool. QBXML is used when integrating with QuickBooks Desktop. If you use QuickBooks Online, look elsewhere.
## Installation
Add this line to your application's Gemfile:
gem 'qbxml'
And then execute:
$ bundle
Or install it yourself as:
$ gem install qbxml
## Usage
### Initialization
The QBXML supported depends on whether you use QuickBooks (`:qb`) or
QuickBooks Point of Sale (`:qbpos`) and on the version of QuickBooks used.
```ruby
q = Qbxml.new(:qb, '7.0')
```
### API Introspection
Return all types defined in the schema
```ruby
q.types
```
Return all types matching a certain pattern
```ruby
q.types('Customer')
q.types(/Customer/)
```
Print the xml template for a specific type
```ruby
puts q.describe('CustomerModRq')
```
### QBXML To Ruby
Convert valid QBXML to a ruby hash
```ruby
q.from_qbxml(xml)
```
### Ruby To QBXML
Convert a ruby hash to QBXML, skipping validation
```ruby
q.to_qbxml(hsh)
```
Convert a ruby hash to QBXML and validate all types
```ruby
q.to_qbxml(hsh, validate: true)
```
## Caveats
QuickBooks only supports [ISO-8859-1](http://en.wikipedia.org/wiki/ISO/IEC_8859-1) characters. Any characters outside of ISO-8859-1 will become question marks in QuickBooks.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request