lib/contacts/Recipient.php
public function jsonSerialize()
    {
        return array_filter(
            [
                'email' => $this->getEmail(),
                'first_name' => $this->getFirstName(),
                'last_name' => $this->getLastName()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
public function jsonSerialize()
    {
        return array_filter(
            [
                'email' => $this->getEmail(),
                'first_name' => $this->getFirstName(),
                'last_name' => $this->getLastName()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
public function jsonSerialize ( ) { return array_filter ( [ 'email' => $ this -> getEmail ( ) , 'first_name' => $ this -> getFirstName ( ) , 'last_name' => $ this -> getLastName ( ) ] , function ( $ value ) { return $ value !== null ; } ) ? : null ; }
Return an array representing a recipient object for the Twilio SendGrid API

@return null|array
Return an array representing a recipient object for the Twilio SendGrid API