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

Commit

Permalink
feat(Type): add type update by key request
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Schulze committed Mar 11, 2016
1 parent 422cdee commit 72e4bd2
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/Request/Types/TypeUpdateByKeyRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* @author @jayS-de <jens.schulze@commercetools.de>
*/

namespace Commercetools\Core\Request\Types;

use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Request\AbstractUpdateByKeyRequest;
use Commercetools\Core\Model\Type\Type;
use Commercetools\Core\Response\ApiResponseInterface;

/**
* @package Commercetools\Core\Request\Types
* @link https://dev.commercetools.com/http-api-projects-types.html#update-type-by-key
* @method Type mapResponse(ApiResponseInterface $response)
*/
class TypeUpdateByKeyRequest extends AbstractUpdateByKeyRequest
{
protected $resultClass = '\Commercetools\Core\Model\Type\Type';

/**
* @param string $key
* @param string $version
* @param array $actions
* @param Context $context
*/
public function __construct($key, $version, array $actions = [], Context $context = null)
{
parent::__construct(TypesEndpoint::endpoint(), $key, $version, $actions, $context);
}

/**
* @param string $key
* @param int $version
* @param Context $context
* @return static
*/
public static function ofKeyAndVersion($key, $version, Context $context = null)
{
return new static($key, $version, [], $context);
}
}

0 comments on commit 72e4bd2

Please # to comment.