src/Model/Campaign.php
public function format() {

        /*         * Add the mandatary props* */
        if (!is_null($this->fromEmail)) {
            $result[self::FROMEMAIL_KEY] = $this->fromEmail;
        }
        /*         * Add the optional props if any* */
        if (!is_null($this->optionalProperties)) {
            $result = array_merge($result, $this->optionalProperties);
        }


        return $result;
    }
public function format() {

        /*         * Add the mandatary props* */
        if (!is_null($this->fromEmail)) {
            $result[self::FROMEMAIL_KEY] = $this->fromEmail;
        }
        /*         * Add the optional props if any* */
        if (!is_null($this->optionalProperties)) {
            $result = array_merge($result, $this->optionalProperties);
        }


        return $result;
    }
public function format ( ) { /*         * Add the mandatary props* */ if ( ! is_null ( $ this -> fromEmail ) ) { $ result [ self :: FROMEMAIL_KEY ] = $ this -> fromEmail ; } /*         * Add the optional props if any* */ if ( ! is_null ( $ this -> optionalProperties ) ) { $ result = array_merge ( $ result , $ this -> optionalProperties ) ; } return $ result ; }
Format Campaign for MailJet API request
@return array
Format Campaign for MailJet API request