tableau-mkt/elomentary

View on GitHub
src/Api/Assets/Email/Signature/Rule.php

Summary

Maintainability
B
6 hrs
Test Coverage
<?php

/**
 * @file
 * Contains \Eloqua\Api\Assets\Email\Signature\Rule.
 */

namespace Eloqua\Api\Assets\Email\Signature;

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 e-mail signature rule.
 */
class Rule extends AbstractApi implements CreatableInterface, ReadableInterface, UpdateableInterface, DestroyableInterface, SearchableInterface {

  /**
   * {@inheritdoc}
   */
  public function search($search, array $options = array()) {
    return $this->get('assets/email/signature/rules', array_merge(array(
      'search' => $search,
    ), $options));
  }

  /**
   * {@inheritdoc}
   */
  public function create($data) {
    return $this->post('assets/email/signature/rule', $data);
  }

  /**
   * {@inheritdoc}
   */
  public function show($id, $depth = 'complete', $extensions = null) {
    return $this->get('assets/email/signature/rule/' . rawurlencode($id), array(
      'depth' => $depth,
      'extensions' => $extensions,
    ));
  }

  /**
   * {@inheritdoc}
   */
  public function update($id, $data) {
    return $this->put('assets/email/signature/rule/' . rawurlencode($id), $data);
  }

  /**
   * {@inheritdoc}
   */
  public function remove($id) {
    return $this->delete('assets/email/signature/rule/' . rawurlencode($id));
  }

}