diff --git a/src/com/zoho/crm/api/record/RecordOperations.php b/src/com/zoho/crm/api/record/RecordOperations.php index 4ca04b8..7ba2888 100644 --- a/src/com/zoho/crm/api/record/RecordOperations.php +++ b/src/com/zoho/crm/api/record/RecordOperations.php @@ -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=""; @@ -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'); @@ -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=""; @@ -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'); }