QuickBooks/IPP.php
public function provisionUser($Context, $email, $fname, $lname, $roleid = null, $udata = null)
	{
		$url = 'https://workplace.intuit.com/db/' . $this->_dbid;
		$action = 'API_ProvisionUser';

		$xml = '<qdbapi>
					<ticket>' . $Context->ticket() . '</ticket>
					<apptoken>' . $Context->token() . '</apptoken>';

		if ($roleid)
		{
			$xml .= '<roleid>' . $roleid . '</roleid>';
		}

		$xml .= '
				<email>' . $email . '</email>
				<fname>' . $fname . '</fname>
				<lname>' . $lname . '</lname>';

		if ($udata)
		{
			$xml .= '<udata>' . $udata . '</udata>';
		}

		$xml .= '
			</qdbapi>';

		$response = $this->_request($Context, QuickBooks_IPP::REQUEST_IPP, $url, $action, $xml);

		if ($this->_hasErrors($response))
		{
			return false;
		}

		return true;
	}
public function provisionUser($Context, $email, $fname, $lname, $roleid = null, $udata = null)
	{
		$url = 'https://workplace.intuit.com/db/' . $this->_dbid;
		$action = 'API_ProvisionUser';

		$xml = '<qdbapi>
					<ticket>' . $Context->ticket() . '</ticket>
					<apptoken>' . $Context->token() . '</apptoken>';

		if ($roleid)
		{
			$xml .= '<roleid>' . $roleid . '</roleid>';
		}

		$xml .= '
				<email>' . $email . '</email>
				<fname>' . $fname . '</fname>
				<lname>' . $lname . '</lname>';

		if ($udata)
		{
			$xml .= '<udata>' . $udata . '</udata>';
		}

		$xml .= '
			</qdbapi>';

		$response = $this->_request($Context, QuickBooks_IPP::REQUEST_IPP, $url, $action, $xml);

		if ($this->_hasErrors($response))
		{
			return false;
		}

		return true;
	}
/*
public function getEntitlementValues($Context)
{
$url = 'https://workplace.intuit.com/db/' . $this->_dbid;
$action = QuickBooks_IPP::API_GETENTITLEMENTVALUES;

$xml = '<qdbapi>
<ticket>' . $Context->ticket() . '</ticket>
<apptoken>' . $Context->token() . '</apptoken>
</qdbapi>';

return $this->_IPP($Context, $url, $action, $xml);
}

public function getEntitlementValuesAndUserRole($Context)
{
$url = 'https://workplace.intuit.com/db/' . $this->_dbid;
$action = QuickBooks_IPP::API_GETENTITLEMENTVALUESANDUSERROLE;

$xml = '<qdbapi>
<ticket>' . $Context->ticket() . '</ticket>
<apptoken>' . $Context->token() . '</apptoken>
</qdbapi>';

return $this->_IPP($Context, $url, $action, $xml);
}