build_where_clause() and build_choose_clause() both attempt to escape single quotes in the provided strings. However, they do not handle backslashes, which means it's possible to un-escape the single quote.
>>> build_where_clause(DisplayName=r"Smith's Shop")
"DisplayName = 'Smith\\'s Shop'"
>>> build_where_clause(DisplayName=r"Smith\'s Shop")
"DisplayName = 'Smith\\\\'s Shop'"
This results in an error from the QuickBooks API, and could also be used to inject additional clauses into the search query.
>>> Customer.filter(DisplayName=r"Smith\'s Shop", qb=qb)
quickbooks.exceptions.ValidationException: QB Validation Exception 4000: Error parsing query