<commit_before><?php
namespace Fortifi\Sdk\Models\Affiliate;

use Fortifi\FortifiApi\Affiliate\Endpoints\AffiliateCampaignEndpoint;
use Fortifi\FortifiApi\Affiliate\Payloads\Campaign\CreateAffiliateCampaignPayload;
use Fortifi\FortifiApi\Affiliate\Payloads\Campaign\SetNameAffiliateCampaignPayload;
use Fortifi\FortifiApi\Affiliate\Payloads\Campaign\SetOptionsAffiliateCampaignPayload;
use Fortifi\FortifiApi\Affiliate\Responses\Campaign\AffiliateCampaignResponse;
use Fortifi\FortifiApi\Affiliate\Responses\Campaign\AffiliateCampaignsResponse;
use Fortifi\FortifiApi\Affiliate\Responses\Campaign\CreateAffiliateCampaignResponse;
use Fortifi\FortifiApi\Foundation\Payloads\FidPayload;
use Fortifi\FortifiApi\Foundation\Payloads\PaginatedDataNodePayload;
use Fortifi\FortifiApi\Foundation\Requests\FortifiApiRequestInterface;
use Fortifi\FortifiApi\Foundation\Responses\BoolResponse;
use Fortifi\Sdk\Models\Api\FortifiApiModel;

class AffiliateCampaignModel extends FortifiApiModel
{
  /**
   * @param int    $limit
   * @param int    $page
   * @param string $sortField
   * @param string $sortDirection
   * @param bool   $showDeleted
   * @param string $filter
   *
   * @return AffiliateCampaignsResponse|FortifiApiRequestInterface
   */
  public function all(
    $limit = 10, $page = 1, $sortField = null,
    $sortDirection = null, $showDeleted = false, $filter = null
  )
  {
    $payload = new PaginatedDataNodePayload();
    $payload->limit = $limit;
    $payload->page = $page;
    $payload->sortField = $sortField;
    $payload->sortDirection = $sortDirection;
    $payload->showDeleted = $showDeleted;
    $payload->filter = $filter;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->all($payload)->get();
  }

  /**
   * @param string $fid
   *
   * @return AffiliateCampaignResponse|FortifiApiRequestInterface
   */
  public function retrieve($fid)
  {
    $payload = new FidPayload();
    $payload->fid = $fid;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->retrieve($payload)->get();
  }

  /**
   * @param string $affiliateFid
   * @param string $companyFid
   * @param string $displayName
   *
   * @return FortifiApiRequestInterface|CreateAffiliateCampaignResponse
   */
  public function create($affiliateFid, $companyFid, $displayName)
  {
    $payload = new CreateAffiliateCampaignPayload();
    $payload->affiliateFid = $affiliateFid;
    $payload->companyFid = $companyFid;
    $payload->displayName = $displayName;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->create($payload)->get();
  }

  /**
   * @param string $fid
   * @param string $displayName
   *
   * @return FortifiApiRequestInterface|BoolResponse
   */
  public function setName($fid, $displayName)
  {
    $payload = new SetNameAffiliateCampaignPayload();
    $payload->fid = $fid;
    $payload->displayName = $displayName;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->setName($payload)->get();
  }

  /**
   * @param string $fid
   * @param string $options
   *
   * @return FortifiApiRequestInterface|BoolResponse
   */
  public function setOptions($fid, $options)
  {
    $payload = new SetOptionsAffiliateCampaignPayload();
    $payload->fid = $fid;
    $payload->options = $options;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->setOptions($payload)->get();
  }
}<commit_msg>new delete method for affiliate campaigns<commit_after><?php
namespace Fortifi\Sdk\Models\Affiliate;

use Fortifi\FortifiApi\Affiliate\Endpoints\AffiliateCampaignEndpoint;
use Fortifi\FortifiApi\Affiliate\Payloads\Campaign\CreateAffiliateCampaignPayload;
use Fortifi\FortifiApi\Affiliate\Payloads\Campaign\SetNameAffiliateCampaignPayload;
use Fortifi\FortifiApi\Affiliate\Payloads\Campaign\SetOptionsAffiliateCampaignPayload;
use Fortifi\FortifiApi\Affiliate\Responses\Campaign\AffiliateCampaignResponse;
use Fortifi\FortifiApi\Affiliate\Responses\Campaign\AffiliateCampaignsResponse;
use Fortifi\FortifiApi\Affiliate\Responses\Campaign\CreateAffiliateCampaignResponse;
use Fortifi\FortifiApi\Foundation\Payloads\FidPayload;
use Fortifi\FortifiApi\Foundation\Payloads\PaginatedDataNodePayload;
use Fortifi\FortifiApi\Foundation\Requests\FortifiApiRequestInterface;
use Fortifi\FortifiApi\Foundation\Responses\BoolResponse;
use Fortifi\Sdk\Models\Api\FortifiApiModel;

class AffiliateCampaignModel extends FortifiApiModel
{
  /**
   * @param int    $limit
   * @param int    $page
   * @param string $sortField
   * @param string $sortDirection
   * @param bool   $showDeleted
   * @param string $filter
   *
   * @return AffiliateCampaignsResponse|FortifiApiRequestInterface
   */
  public function all(
    $limit = 10, $page = 1, $sortField = null,
    $sortDirection = null, $showDeleted = false, $filter = null
  )
  {
    $payload = new PaginatedDataNodePayload();
    $payload->limit = $limit;
    $payload->page = $page;
    $payload->sortField = $sortField;
    $payload->sortDirection = $sortDirection;
    $payload->showDeleted = $showDeleted;
    $payload->filter = $filter;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->all($payload)->get();
  }

  /**
   * @param string $fid
   *
   * @return AffiliateCampaignResponse|FortifiApiRequestInterface
   */
  public function retrieve($fid)
  {
    $payload = new FidPayload();
    $payload->fid = $fid;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->retrieve($payload)->get();
  }

  /**
   * @param string $affiliateFid
   * @param string $companyFid
   * @param string $displayName
   *
   * @return FortifiApiRequestInterface|CreateAffiliateCampaignResponse
   */
  public function create($affiliateFid, $companyFid, $displayName)
  {
    $payload = new CreateAffiliateCampaignPayload();
    $payload->affiliateFid = $affiliateFid;
    $payload->companyFid = $companyFid;
    $payload->displayName = $displayName;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->create($payload)->get();
  }

  /**
   * @param string $fid
   * @param string $displayName
   *
   * @return FortifiApiRequestInterface|BoolResponse
   */
  public function setName($fid, $displayName)
  {
    $payload = new SetNameAffiliateCampaignPayload();
    $payload->fid = $fid;
    $payload->displayName = $displayName;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->setName($payload)->get();
  }

  /**
   * @param string $fid
   * @param string $options
   *
   * @return FortifiApiRequestInterface|BoolResponse
   */
  public function setOptions($fid, $options)
  {
    $payload = new SetOptionsAffiliateCampaignPayload();
    $payload->fid = $fid;
    $payload->options = $options;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->setOptions($payload)->get();
  }

  /**
   * @param string $fid
   *
   * @return FortifiApiRequestInterface|BoolResponse
   */
  public function delete($fid)
  {
    $payload = new FidPayload();
    $payload->fid = $fid;

    $ep = AffiliateCampaignEndpoint::bound($this->getApi());
    return $ep->delete($payload)->get();
  }
}
{'fraction_non_alphanumeric': 0.12890189520624304, 'fraction_numerical': 0.0008361204013377926, 'mean_word_length': 4.441243366186505, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '817935', 'n_tokens_mistral': 2363, 'n_tokens_neox': 2317, 'n_words': 376}