public function pushLead($contact, $event = [])
    {
        $this->reset();
        $this->getEvent($event);

        if (empty($this->event['config']['contactclient'])) {
            return false;
        }

        /** @var Contact $contactModel */
        $clientModel = $this->getContactClientModel();
        $client      = $clientModel->getEntity($this->event['config']['contactclient']);

        $this->sendContact($client, $contact, false);

        // Returning false will typically cause a retry.
        // If an error occurred and we do not wish to retry we should return true.
        return $this->valid ? $this->valid : !$this->retry;
    }
public function pushLead($contact, $event = [])
    {
        $this->reset();
        $this->getEvent($event);

        if (empty($this->event['config']['contactclient'])) {
            return false;
        }

        /** @var Contact $contactModel */
        $clientModel = $this->getContactClientModel();
        $client      = $clientModel->getEntity($this->event['config']['contactclient']);

        $this->sendContact($client, $contact, false);

        // Returning false will typically cause a retry.
        // If an error occurred and we do not wish to retry we should return true.
        return $this->valid ? $this->valid : !$this->retry;
    }
public function pushLead ( $ contact , $ event = [ ] ) { $ this -> reset ( ) ; $ this -> getEvent ( $ event ) ; if ( empty ( $ this -> event [ 'config' ] [ 'contactclient' ] ) ) { return false ; } /** @var Contact $contactModel */ $ clientModel = $ this -> getContactClientModel ( ) ; $ client = $ clientModel -> getEntity ( $ this -> event [ 'config' ] [ 'contactclient' ] ) ; $ this -> sendContact ( $ client , $ contact , false ) ; // Returning false will typically cause a retry. // If an error occurred and we do not wish to retry we should return true. return $ this -> valid ? $ this -> valid : ! $ this -> retry ; }
Push a contact to a preconfigured Contact Client.

@param Contact $contact
@param array   $event

@return bool

@throws Exception
Push a contact to a preconfigured Contact Client .