public function applyResponseMap($updateTokens = false)
    {
        $responseMap = $this->getResponseMap();
        // Check the responseMap to discern where field values should go.
        if (count($responseMap)) {
            foreach ($responseMap as $alias => $value) {
                $oldValue = $this->contact->getFieldValue($alias);
                if ($oldValue !== $value) {
                    $this->contact->addUpdatedField($alias, $value, $oldValue);
                    if ($updateTokens) {
                        $this->tokenHelper->addContext([$alias => $value]);
                    }
                    $this->setLogs('Updating Contact: '.$alias.' = '.$value, 'fieldsUpdated');
                    $this->updatedFields = true;
                }
            }
        }

        return $this->updatedFields;
    }
public function applyResponseMap($updateTokens = false)
    {
        $responseMap = $this->getResponseMap();
        // Check the responseMap to discern where field values should go.
        if (count($responseMap)) {
            foreach ($responseMap as $alias => $value) {
                $oldValue = $this->contact->getFieldValue($alias);
                if ($oldValue !== $value) {
                    $this->contact->addUpdatedField($alias, $value, $oldValue);
                    if ($updateTokens) {
                        $this->tokenHelper->addContext([$alias => $value]);
                    }
                    $this->setLogs('Updating Contact: '.$alias.' = '.$value, 'fieldsUpdated');
                    $this->updatedFields = true;
                }
            }
        }

        return $this->updatedFields;
    }
public function applyResponseMap ( $ updateTokens = false ) { $ responseMap = $ this -> getResponseMap ( ) ; // Check the responseMap to discern where field values should go. if ( count ( $ responseMap ) ) { foreach ( $ responseMap as $ alias => $ value ) { $ oldValue = $ this -> contact -> getFieldValue ( $ alias ) ; if ( $ oldValue !== $ value ) { $ this -> contact -> addUpdatedField ( $ alias , $ value , $ oldValue ) ; if ( $ updateTokens ) { $ this -> tokenHelper -> addContext ( [ $ alias => $ value ] ) ; } $ this -> setLogs ( 'Updating Contact: ' . $ alias . ' = ' . $ value , 'fieldsUpdated' ) ; $ this -> updatedFields = true ; } } } return $ this -> updatedFields ; }
Apply the responsemap to update a contact entity.

@param bool $updateTokens

@return bool
Apply the responsemap to update a contact entity .