Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/com/zoho/crm/api/record/RecordOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getRecord(string $id, string $moduleAPIName, ParameterMap $para
* @param BodyWrapper $request An instance of BodyWrapper
* @return APIResponse An instance of APIResponse
*/
public function updateRecord(string $id, string $moduleAPIName, BodyWrapper $request)
public function updateRecord(string $id, string $moduleAPIName, BodyWrapper $request, HeaderMap $header_map=null)
{
$handlerInstance=new CommonAPIHandler();
$apiPath="";
Expand All @@ -61,6 +61,7 @@ public function updateRecord(string $id, string $moduleAPIName, BodyWrapper $re
$handlerInstance->setCategoryMethod(Constants::REQUEST_CATEGORY_UPDATE);
$handlerInstance->setContentType('application/json');
$handlerInstance->setRequest($request);
$handlerInstance->setHeader($header_map);
Utility::getFields($moduleAPIName);
$handlerInstance->setModuleAPIName($moduleAPIName);
return $handlerInstance->apiCall(ActionHandler::class, 'application/json');
Expand All @@ -74,7 +75,7 @@ public function updateRecord(string $id, string $moduleAPIName, BodyWrapper $re
* @param ParameterMap $paramInstance An instance of ParameterMap
* @return APIResponse An instance of APIResponse
*/
public function deleteRecord(string $id, string $moduleAPIName, ParameterMap $paramInstance=null)
public function deleteRecord(string $id, string $moduleAPIName, ParameterMap $paramInstance=null, HeaderMap $header_map=null)
{
$handlerInstance=new CommonAPIHandler();
$apiPath="";
Expand All @@ -86,6 +87,7 @@ public function deleteRecord(string $id, string $moduleAPIName, ParameterMap $p
$handlerInstance->setHttpMethod(Constants::REQUEST_METHOD_DELETE);
$handlerInstance->setCategoryMethod(Constants::REQUEST_METHOD_DELETE);
$handlerInstance->setParam($paramInstance);
$handlerInstance->setHeader($header_map);
return $handlerInstance->apiCall(ActionHandler::class, 'application/json');

}
Expand Down