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

Commit

Permalink
feat(ProductSearch): add price select parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Schulze committed Dec 29, 2015
1 parent 9eb8ba7 commit f1717b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/Request/CustomObjects/CustomObjectDeleteRequest.php
Expand Up @@ -36,4 +36,3 @@ public static function ofIdAndVersion($id, $version, Context $context = null)
return new static($id, $version, $context);
}
}

10 changes: 5 additions & 5 deletions src/Request/SelectTrait.php → src/Request/PriceSelectTrait.php
Expand Up @@ -13,7 +13,7 @@
/**
* @method $this addParamObject(ParameterInterface $param)
*/
trait SelectTrait
trait PriceSelectTrait
{

protected function select($key, $value)
Expand All @@ -31,7 +31,7 @@ protected function select($key, $value)
*/
public function currency($currency)
{
return $this->select('currency', $currency);
return $this->select('priceCurrency', $currency);
}

/**
Expand All @@ -40,7 +40,7 @@ public function currency($currency)
*/
public function country($country)
{
return $this->select('country', $country);
return $this->select('priceCountry', $country);
}

/**
Expand All @@ -49,7 +49,7 @@ public function country($country)
*/
public function channel(ChannelReference $channel)
{
return $this->select('channel', $channel->getId());
return $this->select('priceChannel', $channel->getId());
}

/**
Expand All @@ -58,6 +58,6 @@ public function channel(ChannelReference $channel)
*/
public function customerGroup(CustomerGroupReference $customerGroup)
{
return $this->select('customerGroup', $customerGroup->getId());
return $this->select('priceCustomerGroup', $customerGroup->getId());
}
}
4 changes: 2 additions & 2 deletions src/Request/Products/ProductProjectionSearchRequest.php
Expand Up @@ -7,7 +7,7 @@
namespace Commercetools\Core\Request\Products;

use Commercetools\Core\Request\ExpandTrait;
use Commercetools\Core\Request\SelectTrait;
use Commercetools\Core\Request\PriceSelectTrait;
use Commercetools\Core\Request\Query\Parameter;
use Commercetools\Core\Request\QueryRequestInterface;
use Commercetools\Core\Request\SortRequestInterface;
Expand Down Expand Up @@ -38,7 +38,7 @@ class ProductProjectionSearchRequest extends AbstractProjectionRequest implement
use ExpandTrait;
use PageTrait;
use SortTrait;
use SelectTrait;
use PriceSelectTrait;

protected $resultClass = '\Commercetools\Core\Model\Product\ProductProjectionCollection';

Expand Down

0 comments on commit f1717b8

Please sign in to comment.