src/Api/Assets/Campaign.php
<?php
/**
* @file
* Contains \Eloqua\Api\Assets\Campaign.
*/
namespace Eloqua\Api\Assets;
use Eloqua\Api\AbstractApi;
use Eloqua\Api\CreatableInterface;
use Eloqua\Api\DestroyableInterface;
use Eloqua\Api\ReadableInterface;
use Eloqua\Api\SearchableInterface;
use Eloqua\Api\UpdateableInterface;
/**
* Eloqua Campaign.
*/
class Campaign extends AbstractApi implements SearchableInterface, CreatableInterface, ReadableInterface, DestroyableInterface, UpdateableInterface {
/**
* {@inheritdoc}
*/
public function search($search, array $options = array()) {
return $this->get('assets/campaigns', array_merge(array(
'search' => $search,
), $options));
}
/**
* {@inheritdoc}
*/
public function create($data) {
return $this->post('assets/campaign', $data);
}
/**
* {@inheritdoc}
*/
public function show($id, $depth = 'complete', $extensions = null) {
return $this->get('assets/campaign/' . rawurlencode($id), array(
'depth' => $depth,
'extensions' => $extensions,
));
}
/**
* {@inheritdoc}
*/
public function update($id, $data) {
return $this->put('assets/campaign/' . rawurlencode($id), $data);
}
/**
* {@inheritdoc}
*/
public function remove($id) {
return $this->delete('assets/campaign/' . rawurlencode($id));
}
}