/** * (non-PHPdoc) * @see BaseExample::run() */ public function run() { $values = $this->formValues; printf('<h2>Creating redirect creative from image URL "%s"</h2>', $values['image_url']); $creative = new Google_Service_Dfareporting_Creative(); $creative->setAdvertiserId($values['advertiser_id']); $creative->setName('Test redirect creative'); $creative->setRedirectUrl($values['image_url']); $creative->setType('REDIRECT'); $size = new Google_Service_Dfareporting_Size(); $size->setId($values['size_id']); $creative->setSize($size); $result = $this->service->creatives->insert($values['user_profile_id'], $creative); $this->printResultsTable('Redirect creative created.', array($result)); }