|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * Copyright (c) 2020, Nosto Solutions Ltd |
| 4 | + * All rights reserved. |
| 5 | + * |
| 6 | + * Redistribution and use in source and binary forms, with or without modification, |
| 7 | + * are permitted provided that the following conditions are met: |
| 8 | + * |
| 9 | + * 1. Redistributions of source code must retain the above copyright notice, |
| 10 | + * this list of conditions and the following disclaimer. |
| 11 | + * |
| 12 | + * 2. Redistributions in binary form must reproduce the above copyright notice, |
| 13 | + * this list of conditions and the following disclaimer in the documentation |
| 14 | + * and/or other materials provided with the distribution. |
| 15 | + * |
| 16 | + * 3. Neither the name of the copyright holder nor the names of its contributors |
| 17 | + * may be used to endorse or promote products derived from this software without |
| 18 | + * specific prior written permission. |
| 19 | + * |
| 20 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 21 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 22 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 23 | + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
| 24 | + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 25 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 26 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
| 27 | + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 29 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 | + * |
| 31 | + * @author Nosto Solutions Ltd <[email protected]> |
| 32 | + * @copyright 2020 Nosto Solutions Ltd |
| 33 | + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause |
| 34 | + * |
| 35 | + */ |
| 36 | + |
| 37 | +namespace Nosto\Cmp\Model\Merchandise; |
| 38 | + |
| 39 | +use Nosto\Cmp\Model\Facet\FacetInterface; |
| 40 | +use Nosto\Types\Signup\AccountInterface; |
| 41 | + |
| 42 | +class MerchandiseRequestParams |
| 43 | +{ |
| 44 | + /** @var AccountInterface */ |
| 45 | + private $nostoAccount; |
| 46 | + |
| 47 | + /** @var FacetInterface */ |
| 48 | + private $facets; |
| 49 | + |
| 50 | + /** @var string */ |
| 51 | + private $customerId; |
| 52 | + |
| 53 | + /** @var string */ |
| 54 | + private $category; |
| 55 | + |
| 56 | + /** @var int */ |
| 57 | + private $pageNumber; |
| 58 | + |
| 59 | + /** @var int */ |
| 60 | + private $limit; |
| 61 | + |
| 62 | + /** @var bool */ |
| 63 | + private $previewMode; |
| 64 | + |
| 65 | + /** @var string */ |
| 66 | + private $batchToken; |
| 67 | + |
| 68 | + /** |
| 69 | + * @param AccountInterface $nostoAccount |
| 70 | + * @param FacetInterface $facets |
| 71 | + * @param string $customerId |
| 72 | + * @param string $category |
| 73 | + * @param int $pageNumber |
| 74 | + * @param int $limit |
| 75 | + * @param bool $previewMode |
| 76 | + * @param string $batchToken |
| 77 | + */ |
| 78 | + public function __construct( |
| 79 | + AccountInterface $nostoAccount, |
| 80 | + FacetInterface $facets, |
| 81 | + string $customerId, |
| 82 | + string $category, |
| 83 | + int $pageNumber, |
| 84 | + int $limit, |
| 85 | + bool $previewMode, |
| 86 | + string $batchToken |
| 87 | + ) { |
| 88 | + $this->nostoAccount = $nostoAccount; |
| 89 | + $this->facets = $facets; |
| 90 | + $this->customerId = $customerId; |
| 91 | + $this->category = $category; |
| 92 | + $this->pageNumber = $pageNumber; |
| 93 | + $this->limit = $limit; |
| 94 | + $this->previewMode = $previewMode; |
| 95 | + $this->batchToken = $batchToken; |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * @return AccountInterface |
| 100 | + */ |
| 101 | + public function getNostoAccount(): AccountInterface |
| 102 | + { |
| 103 | + return $this->nostoAccount; |
| 104 | + } |
| 105 | + |
| 106 | + /** |
| 107 | + * @param AccountInterface $nostoAccount |
| 108 | + */ |
| 109 | + public function setNostoAccount(AccountInterface $nostoAccount): void |
| 110 | + { |
| 111 | + $this->nostoAccount = $nostoAccount; |
| 112 | + } |
| 113 | + |
| 114 | + /** |
| 115 | + * @return FacetInterface |
| 116 | + */ |
| 117 | + public function getFacets(): FacetInterface |
| 118 | + { |
| 119 | + return $this->facets; |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * @param FacetInterface $facets |
| 124 | + */ |
| 125 | + public function setFacets(FacetInterface $facets): void |
| 126 | + { |
| 127 | + $this->facets = $facets; |
| 128 | + } |
| 129 | + |
| 130 | + /** |
| 131 | + * @return string |
| 132 | + */ |
| 133 | + public function getCustomerId(): string |
| 134 | + { |
| 135 | + return $this->customerId; |
| 136 | + } |
| 137 | + |
| 138 | + /** |
| 139 | + * @param string $customerId |
| 140 | + */ |
| 141 | + public function setCustomerId(string $customerId): void |
| 142 | + { |
| 143 | + $this->customerId = $customerId; |
| 144 | + } |
| 145 | + |
| 146 | + /** |
| 147 | + * @return string |
| 148 | + */ |
| 149 | + public function getCategory(): string |
| 150 | + { |
| 151 | + return $this->category; |
| 152 | + } |
| 153 | + |
| 154 | + /** |
| 155 | + * @param string $category |
| 156 | + */ |
| 157 | + public function setCategory(string $category): void |
| 158 | + { |
| 159 | + $this->category = $category; |
| 160 | + } |
| 161 | + |
| 162 | + /** |
| 163 | + * @return int |
| 164 | + */ |
| 165 | + public function getPageNumber(): int |
| 166 | + { |
| 167 | + return $this->pageNumber; |
| 168 | + } |
| 169 | + |
| 170 | + /** |
| 171 | + * @param int $pageNumber |
| 172 | + */ |
| 173 | + public function setPageNumber(int $pageNumber): void |
| 174 | + { |
| 175 | + $this->pageNumber = $pageNumber; |
| 176 | + } |
| 177 | + |
| 178 | + /** |
| 179 | + * @return int |
| 180 | + */ |
| 181 | + public function getLimit(): int |
| 182 | + { |
| 183 | + return $this->limit; |
| 184 | + } |
| 185 | + |
| 186 | + /** |
| 187 | + * @param int $limit |
| 188 | + */ |
| 189 | + public function setLimit(int $limit): void |
| 190 | + { |
| 191 | + $this->limit = $limit; |
| 192 | + } |
| 193 | + |
| 194 | + /** |
| 195 | + * @return bool |
| 196 | + */ |
| 197 | + public function isPreviewMode(): bool |
| 198 | + { |
| 199 | + return $this->previewMode; |
| 200 | + } |
| 201 | + |
| 202 | + /** |
| 203 | + * @param bool $previewMode |
| 204 | + */ |
| 205 | + public function setPreviewMode(bool $previewMode): void |
| 206 | + { |
| 207 | + $this->previewMode = $previewMode; |
| 208 | + } |
| 209 | + |
| 210 | + /** |
| 211 | + * @return string |
| 212 | + */ |
| 213 | + public function getBatchToken(): string |
| 214 | + { |
| 215 | + return $this->batchToken; |
| 216 | + } |
| 217 | + |
| 218 | + /** |
| 219 | + * @param string $batchToken |
| 220 | + */ |
| 221 | + public function setBatchToken(string $batchToken): void |
| 222 | + { |
| 223 | + $this->batchToken = $batchToken; |
| 224 | + } |
| 225 | +} |
0 commit comments