Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
feat(CustomObject): add delete by id request
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Schulze committed Dec 29, 2015
1 parent f1dd757 commit 9eb8ba7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/Request/CustomObjects/CustomObjectDeleteRequest.php
@@ -0,0 +1,39 @@
<?php
/**
* @author @jayS-de <jens.schulze@commercetools.de>
*/

namespace Commercetools\Core\Request\CustomObjects;

use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Request\AbstractDeleteRequest;

/**
* Class CustomObjectDeleteRequest
*/
class CustomObjectDeleteRequest extends AbstractDeleteRequest
{
protected $resultClass = '\Commercetools\Core\Model\CustomObject\CustomObject';

/**
* @param string $id
* @param int $version
* @param Context $context
*/
public function __construct($id, $version, Context $context = null)
{
parent::__construct(CustomObjectsEndpoint::endpoint(), $id, $version, $context);
}

/**
* @param string $id
* @param int $version
* @param Context $context
* @return static
*/
public static function ofIdAndVersion($id, $version, Context $context = null)
{
return new static($id, $version, $context);
}
}

0 comments on commit 9eb8ba7

Please sign in to comment.