public function Update($entity)
    {
        $this->serviceContext->IppConfiguration->Logger->RequestLog->Log(TraceLevel::Info, "Called Method: Update.");

        // Validate parameter
        if (!$entity) {
            $this->serviceContext->IppConfiguration->Logger->RequestLog->Log(TraceLevel::Error, "Argument Null Exception");
            throw new IdsException('Argument Null Exception');
        }
        $this->verifyOperationAccess($entity, __FUNCTION__);

        $httpsPostBody = $this->executeObjectSerializer($entity, $urlResource);

        // Builds resource Uri
        // Handle some special cases
        if ((strtolower('preferences') == strtolower($urlResource)) &&
            (CoreConstants::IntuitServicesTypeQBO == $this->serviceContext->serviceType)
        ) {
            // URL format for *QBO* prefs request is different than URL format for *QBD* prefs request
            $uri = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, $urlResource));
        }
        //We no longer support QBD on PHP SDK The code is removed.
        /*else if ((strtolower('company') == strtolower($urlResource)) &&
                (CoreConstants::IntuitServicesTypeQBO == $this->serviceContext->serviceType)) {
            // URL format for *QBD* companyinfo request is different than URL format for *QBO* companyinfo request
            $urlResource = 'companyInfo';
            $uri = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, $urlResource . '?operation=update'));
        }*/ else {
            // Normal case
            $uri = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, $urlResource . '?operation=update'));
        }

        // Send Request and return response
        return $this->sendRequestParseResponseBodyAndHandleHttpError($entity, $uri, $httpsPostBody, DataService::UPDATE);
    }
public function Update($entity)
    {
        $this->serviceContext->IppConfiguration->Logger->RequestLog->Log(TraceLevel::Info, "Called Method: Update.");

        // Validate parameter
        if (!$entity) {
            $this->serviceContext->IppConfiguration->Logger->RequestLog->Log(TraceLevel::Error, "Argument Null Exception");
            throw new IdsException('Argument Null Exception');
        }
        $this->verifyOperationAccess($entity, __FUNCTION__);

        $httpsPostBody = $this->executeObjectSerializer($entity, $urlResource);

        // Builds resource Uri
        // Handle some special cases
        if ((strtolower('preferences') == strtolower($urlResource)) &&
            (CoreConstants::IntuitServicesTypeQBO == $this->serviceContext->serviceType)
        ) {
            // URL format for *QBO* prefs request is different than URL format for *QBD* prefs request
            $uri = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, $urlResource));
        }
        //We no longer support QBD on PHP SDK The code is removed.
        /*else if ((strtolower('company') == strtolower($urlResource)) &&
                (CoreConstants::IntuitServicesTypeQBO == $this->serviceContext->serviceType)) {
            // URL format for *QBD* companyinfo request is different than URL format for *QBO* companyinfo request
            $urlResource = 'companyInfo';
            $uri = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, $urlResource . '?operation=update'));
        }*/ else {
            // Normal case
            $uri = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, $urlResource . '?operation=update'));
        }

        // Send Request and return response
        return $this->sendRequestParseResponseBodyAndHandleHttpError($entity, $uri, $httpsPostBody, DataService::UPDATE);
    }
public function Update ( $ entity ) { $ this -> serviceContext -> IppConfiguration -> Logger -> RequestLog -> Log ( TraceLevel :: Info , "Called Method: Update." ) ; // Validate parameter if ( ! $ entity ) { $ this -> serviceContext -> IppConfiguration -> Logger -> RequestLog -> Log ( TraceLevel :: Error , "Argument Null Exception" ) ; throw new IdsException ( 'Argument Null Exception' ) ; } $ this -> verifyOperationAccess ( $ entity , __FUNCTION__ ) ; $ httpsPostBody = $ this -> executeObjectSerializer ( $ entity , $ urlResource ) ; // Builds resource Uri // Handle some special cases if ( ( strtolower ( 'preferences' ) == strtolower ( $ urlResource ) ) && ( CoreConstants :: IntuitServicesTypeQBO == $ this -> serviceContext -> serviceType ) ) { // URL format for *QBO* prefs request is different than URL format for *QBD* prefs request $ uri = implode ( CoreConstants :: SLASH_CHAR , array ( 'company' , $ this -> serviceContext -> realmId , $ urlResource ) ) ; } //We no longer support QBD on PHP SDK The code is removed. /*else if ((strtolower('company') == strtolower($urlResource)) &&
                (CoreConstants::IntuitServicesTypeQBO == $this->serviceContext->serviceType)) {
            // URL format for *QBD* companyinfo request is different than URL format for *QBO* companyinfo request
            $urlResource = 'companyInfo';
            $uri = implode(CoreConstants::SLASH_CHAR, array('company', $this->serviceContext->realmId, $urlResource . '?operation=update'));
        }*/ else { // Normal case $ uri = implode ( CoreConstants :: SLASH_CHAR , array ( 'company' , $ this -> serviceContext -> realmId , $ urlResource . '?operation=update' ) ) ; } // Send Request and return response return $ this -> sendRequestParseResponseBodyAndHandleHttpError ( $ entity , $ uri , $ httpsPostBody , DataService :: UPDATE ) ; }
Updates an entity under the specified realm. The realm must be set in the context.

@param IPPIntuitEntity $entity Entity to Update.
@return IPPIntuitEntity Returns an updated version of the entity with updated identifier and sync token.
@throws IdsException
Updates an entity under the specified realm . The realm must be set in the context .