我正在使用Intuit QuickBooks Online的PHP SDK,我想为员工设置属性UseTimeEntry,但是它对我不起作用。
$item = $dataService->FindbyId('Employee', 1);
$theResourceObj = Employee::update($item , [
"UseTimeEntry" => "UseTimeEntry" //UseTimeEntry Enumerated Values: NotSet, DoNotUseTimeEntry, UseTimeEntry
]);
$resultingObj = $dataService->Add($theResourceObj);
$error = $dataService->getLastError();
if ($error) {
echo "The Status code is: " . $error->getHttpStatusCode() . "\n";
echo "The Helper message is: " . $error->getOAuthHelperError() . "\n";
echo "The Response message is: " . $error->getResponseBody() . "\n";
}
else {
echo "Created Id={$resultingObj->Id}. Reconstructed response body:\n\n";
$xmlBody = XmlObjectSerializer::getPostXmlFromArbitraryEntity($resultingObj, $urlResource);
echo $xmlBody . "\n";
}
作为回应,没有显示任何错误,但是当我尝试从Intuit找一个员工时,“ UseTimeEntry”仍然显示为空。
请帮助我。