| 1 | <?php |
||
| 16 | trait PriceSelectTrait |
||
| 17 | { |
||
| 18 | |||
| 19 | 7 | protected function select($key, $value) |
|
| 20 | { |
||
| 21 | 7 | if (!is_null($value)) { |
|
| 22 | 7 | $this->addParamObject(new Parameter($key, $value)); |
|
| 23 | } |
||
| 24 | |||
| 25 | 7 | return $this; |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $currency |
||
| 30 | * @return $this |
||
| 31 | */ |
||
| 32 | 7 | public function currency($currency) |
|
| 33 | { |
||
| 34 | 7 | return $this->select('priceCurrency', $currency); |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $country |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | 1 | public function country($country) |
|
| 42 | { |
||
| 43 | 1 | return $this->select('priceCountry', $country); |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param ChannelReference $channel |
||
| 48 | * @return $this |
||
| 49 | */ |
||
| 50 | public function channel(ChannelReference $channel) |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param CustomerGroupReference $customerGroup |
||
| 57 | * @return $this |
||
| 58 | */ |
||
| 59 | public function customerGroup(CustomerGroupReference $customerGroup) |
||
| 63 | } |
||
| 64 |