Skip to content
Norman Snyder edited this page May 24, 2024 · 10 revisions

Welcome to the quickbooks-ruby wiki!

Various tips, tricks and guides should be posted here.

Creating Objects

Taxes on a Sales Receipt

Fetching Objects

Retrieving ALL objects of a certain Entity type

Handling an apostrophe in a Customer name in Ruby 3.0.7

With Ruby 2.6, to find a customer such as O'Brian, we had to gsub the apostrophe with "\\'" . Having just upgraded to Ruby 3.0.7, I found that searching raised this error: Error parsing query: QueryParserError: Encountered " "s "" at line 1, column 59. Was expecting one of: ... "iterator" ... "maxresults" ... ... "order" ... "orderby" ... "startposition" ...

To overcome the problem, I used escaped_name = (family.qb_display_name || "").gsub("'", "'")

Clone this wiki locally