The v3 APIs can communicate with two different platforms:
QuickBooks for Windows
QuickBooks Online
For QuickBooks for Windows, all of the Id values have two parts:
- domain (this indicates whether or not the object is still in the "ng" not-yet-synced domain, or whether it's synced to QuickBooks and is now in the "qb" domain
- id value (the actual integer value)
For QuickBooks Online, the Id values only have one part:
To keep things consistent across both platforms, we have elected to make the library return a bracketed version of the Id values that gives you both the domain and the id value, so that regardless of whether you're talking to QuickBooks desktop or QuickBooks Online, the representation of the Ids is the same.
You can strip the {-}
stuff off with this method:
$Id = '{-15}';
$my_int = QuickBooks_IPP_IDS::usableIDType($Id);
print($my_int); // prints just 15
You could certainly modify the code (it's all open-source after all) but it's not recommended as it will break your upgrade path. Also, note that if you ever start to offer QuickBooks for Windows syncing via v3 (or v4 or v5 or etc. etc. etc. when they are released) you're going to have to revert all of your changes.