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

Commit

Permalink
feat(Review): add update by key request
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Schulze committed Mar 10, 2016
1 parent 82f3e0c commit 710c89e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/Request/Reviews/ReviewUpdateByKeyRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* @author @jayS-de <jens.schulze@commercetools.de>
*/

namespace Commercetools\Core\Request\Reviews;

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

/**
* @package Commercetools\Core\Request\Reviews
* @link https://dev.commercetools.com/http-api-projects-reviews.html#update-review
* @method Review mapResponse(ApiResponseInterface $response)
*/
class ReviewUpdateByKeyRequest extends AbstractUpdateByKeyRequest
{
protected $resultClass = '\Commercetools\Core\Model\Review\Review';

/**
* @param string $key
* @param string $version
* @param array $actions
* @param Context $context
*/
public function __construct($key, $version, array $actions = [], Context $context = null)
{
parent::__construct(ReviewsEndpoint::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 710c89e

Please # to comment.