Model/Apiconnector/Client.php
public function postCampaignAttachments($campaignId, $data)
    {
        $url = $this->getApiEndpoint() . self::REST_CREATE_CAMPAIGN
            . "/$campaignId/attachments";
        $this->setUrl($url)
            ->setVerb('POST')
            ->buildPostBody($data);

        $result = $this->execute();

        if (isset($result->message)) {
            $this->helper->debug('postCampaignAttachments', [' CAMPAIGN ATTACHMENT ' .
                $result->message]);
        }

        return $result;
    }
public function postCampaignAttachments($campaignId, $data)
    {
        $url = $this->getApiEndpoint() . self::REST_CREATE_CAMPAIGN
            . "/$campaignId/attachments";
        $this->setUrl($url)
            ->setVerb('POST')
            ->buildPostBody($data);

        $result = $this->execute();

        if (isset($result->message)) {
            $this->helper->debug('postCampaignAttachments', [' CAMPAIGN ATTACHMENT ' .
                $result->message]);
        }

        return $result;
    }
public function postCampaignAttachments ( $ campaignId , $ data ) { $ url = $ this -> getApiEndpoint ( ) . self :: REST_CREATE_CAMPAIGN . "/$campaignId/attachments" ; $ this -> setUrl ( $ url ) -> setVerb ( 'POST' ) -> buildPostBody ( $ data ) ; $ result = $ this -> execute ( ) ; if ( isset ( $ result -> message ) ) { $ this -> helper -> debug ( 'postCampaignAttachments' , [ ' CAMPAIGN ATTACHMENT ' . $ result -> message ] ) ; } return $ result ; }
Adds a document to a campaign as an attachment.

@param int $campaignId
@param array $data

@return null
@throws \Exception
Adds a document to a campaign as an attachment .