Justin
Justin

Reputation: 39

How to set Vendor Tax ID and 1099 Eligibility in API?

I'm currently using Consolibyte's PHP QB classes to interface with the QB api.

I've been successfully creating and updating Vendor's in QB for a while. However, we have a new requirement to use the API to store vendor's tax information.

I've tried to lookup the correct syntax to set these, but have been unsuccessful thus far.

My most recent attempt was:

$Vendor->setVendorTaxIdent($provider->taxId); $Vendor->setIsVendorEligibleFor1099(true);

The rest of the information set gets updated properly, and the return from

$result = $VendorService->update($this->context, $this->realm, $provider->vendorId, $Vendor);

seems to indicate success.

Please let me know if you need anymore context. Thanks!

Upvotes: 1

Views: 200

Answers (1)

Keith Palmer Jr.
Keith Palmer Jr.

Reputation: 27952

Have you referred to the documentation?

The documentation indicates:

  • TaxIdentifier: String, max 20 characters
  • Vendor1099: Boolean

The geters and seters exactly mirror the documented fields. So unsurprisingly, you'll have these methods:

$Vendor->setTaxIdentifier($string); $string = $Vendor->getTaxIdentifier();

And:

$Vendor->setVendor1099($boolean); $boolean = $Vendor->getVendor1099();

If you continue to have trouble, make sure you post the XML request you're sending to QuickBooks. You can get this by doing:

print($VendorService->lastRequest()); print($VendorService->lastResponse());

Upvotes: 1

Related Questions