<?php
 /*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 * All rights reserved.
 *
 * This source code is licensed under the license found in the
 * LICENSE file in the root directory of this source tree.
 */

namespace PYS_PRO_GLOBAL\FacebookAds\Object;

use PYS_PRO_GLOBAL\FacebookAds\Object\Fields\ClickTrackingTagFields;
use PYS_PRO_GLOBAL\FacebookAds\Http\RequestInterface;

class ClickTrackingTag extends AbstractCrudObject {

  /**
   * @deprecated getEndpoint function is deprecated
   * @return string
   */
  protected function getEndpoint() {
    return 'trackingtag';
  }

  /**
   * @return ClickTrackingTagFields
   */
  public static function getFieldsEnum() {
    return ClickTrackingTagFields::getInstance();
  }

  public function deleteSelf(array $params = array()) {
    $this->getApi()->call(
      '/'.$this->parentId.'/'.$this->getEndpoint(),
      RequestInterface::METHOD_DELETE,
      $params);
  }
}
