Saves the contact message to the database for later administration
@param Contact $contactMessage
487712
public function saveContact(Contact $contactMessage)
    {
        /* @var $mapper \SspContact\Mapper\Contact */
        $mapper = $this->getServiceLocator()->get('contact_mapper');
        $mapper->insert($contactMessage);
    }
719313
public function record(EventMessage $message): void
    {
        $eventRecord = new EventRecord(
            $message,
            $this->aggregateId,
            $this->aggregateType,
            $this->nextSequence()
        );
        $this->lastSequence = $eventRecord->sequenceNumber();
        $this->eventRecords->add($eventRecord);
    }
610499
public function updateContact(Contact $contact, array $attributes)
    {
        $attributes = $this->loadContactAttributes($attributes);

        return $contact->fill($attributes)->save();
    }
181357
public function setConnectorContactToReImport($customerId)
    {
        $contactModel = $this->contactFactory->create();
        $contactModel->loadByCustomerId($customerId)
            ->setEmailImported(
                \Dotdigitalgroup\Email\Model\Contact::EMAIL_CONTACT_NOT_IMPORTED
            );
        $this->contactResource->save($contactModel);
    }
866568
public function setContactClient(ContactClient $contactClient)
    {
        $this->contactClient = $contactClient;
        $this->setPayload($this->contactClient->getApiPayload());

        return $this;
    }
1284629
public function setContactId($contactId)
    {
        $this->set(self::MTC_ID, $contactId);

        if ($sessionId = $this->getSessionId()) {
            $this->set($sessionId, $contactId);
        }

        return $this;
    }
967841
def update_contact(contact)
      raise "contact_id or contact_number is required for updating contacts" if contact.contact_id.nil? and contact.contact_number.nil?
      save_contact(contact)
    end
1351830
public function deleteFromId( $ContactEmailId){
        $rest = $this->getService( self::API_EMAIL . $ContactEmailId);
        $rest->DELETE();

        return $rest->getSuccess();
    }
770470
def save_contact(contact)
      request_xml = contact.to_xml

      response_xml = nil
      create_or_save = nil
      if contact.contact_id.nil? && contact.contact_number.nil?
        # Create new contact record.
        response_xml = http_put(@client, "#{@xero_url}/Contacts", request_xml, {})
        create_or_save = :create
      else
        # Update existing contact record.
        response_xml = http_post(@client, "#{@xero_url}/Contacts", request_xml, {})
        create_or_save = :save
      end

      response = parse_response(response_xml, {:request_xml => request_xml}, {:request_signature => "#{create_or_save == :create ? 'PUT' : 'POST'}/contact"})
      contact.contact_id = response.contact.contact_id if response.contact && response.contact.contact_id
      response
    end
632582
public function updateContactList($contactListId, array $data = [])
	{
		return $this->sendRequest(
			$this->createRequest('PATCH', sprintf('contact_lists/%d', $contactListId), [], $data)
		);
	}
923225
public function delete(Contact $contact): void
    {
        $id = $contact->getId();

        $contact->setId(null);

        $this->client->delete($this->prepareUrlForKey('delete-contact', ['id' => $id]));
    }
850147
public function addContact(Contact $contact): Contact
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use create() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->create($contact);
    }
1259676
public function update( models\Call\ContactEntry $ContactEntry){
        $rest = $this->getService( self::API_CONTACT . $ContactEntry->getId());
        $rest->PUT( $ContactEntry);

        return $rest->getResult( models\Call\ContactEntry::class);
    }
338670
public function destroy(Contact $contact)
    {
        $contact->delete();

        return intend([
            'url' => route('managerarea.contacts.index'),
            'with' => ['warning' => trans('cortex/foundation::messages.resource_deleted', ['resource' => trans('cortex/contacts::common.contact'), 'identifier' => $contact->full_name])],
        ]);
    }
598316
function createContact() {
    $cnt = count( $this->contact );
    if( 0 >= $cnt )
      return;
    $output = null;
    foreach( $this->contact as $contact ) {
      $attributes = $this->_createParams( $contact['params'], array( 'ALTREP', 'LANGUAGE' ));
      $content    = $this->_strrep( $contact['value'] );
      $output    .= $this->_createElement( 'CONTACT', $attributes, $content );
    }
    return $output;
  }
1085615
public function mergeContactIntoAddressData(array &$addressData, ContactInterface $contact)
    {
        $addressData['firstName'] = $contact->getFirstName();
        $addressData['lastName'] = $contact->getLastName();
        $addressData['fullName'] = $contact->getFullName();
        $addressData['salutation'] = $contact->getSalutation();
        $addressData['formOfAddress'] = $contact->getFormOfAddress();
        if ($contact->getTitle() !== null) {
            $addressData['title'] = $contact->getTitle()->getTitle();
        }
    }
673130
public function save()
    {
        $collection = $this->getContactsCollection();

        try {
            $contractSaved = true;
            $contactsSaved = $collection->save();

            if ($this->getContract() !== null) {
                $this->getContract()->save();
            }

            return $contactsSaved && $contractSaved;
        } catch (ResponseErrorException $e) {
            return $e->getMessage();
        }
    }