| Total Complexity | 71 |
| Total Lines | 1284 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
Complex classes like AkeneoPimService often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use AkeneoPimService, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 19 | class AkeneoPimService extends AbstractService implements AkeneoPimServiceInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | * |
||
| 24 | * @api |
||
| 25 | * |
||
| 26 | * @param int $pageSize The size of the page returned by the server. |
||
| 27 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 28 | * |
||
| 29 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 30 | */ |
||
| 31 | public function getAllProducts($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 32 | { |
||
| 33 | return $this->getFactory() |
||
| 34 | ->createAkeneoPimAdapterFactory() |
||
| 35 | ->createProductApiAdapter() |
||
| 36 | ->all($pageSize, $queryParameters); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | * |
||
| 42 | * @api |
||
| 43 | * |
||
| 44 | * @param int $pageSize The size of the page returned by the server. |
||
| 45 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 46 | * |
||
| 47 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 48 | */ |
||
| 49 | public function getAllCategories($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 50 | { |
||
| 51 | return $this->getFactory() |
||
| 52 | ->createAkeneoPimAdapterFactory() |
||
| 53 | ->createCategoryApiAdapter() |
||
| 54 | ->all($pageSize, $queryParameters); |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritdoc} |
||
| 59 | * |
||
| 60 | * @api |
||
| 61 | * |
||
| 62 | * @param int $pageSize The size of the page returned by the server. |
||
| 63 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 64 | * |
||
| 65 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 66 | */ |
||
| 67 | public function getAllAttributes($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 68 | { |
||
| 69 | return $this->getFactory() |
||
| 70 | ->createAkeneoPimAdapterFactory() |
||
| 71 | ->createAttributeApiAdapter() |
||
| 72 | ->all($pageSize, $queryParameters); |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * {@inheritdoc} |
||
| 77 | * |
||
| 78 | * @api |
||
| 79 | * |
||
| 80 | * @param string $attributeCode Code of the attribute |
||
| 81 | * @param int $pageSize The size of the page returned by the server. |
||
| 82 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 83 | * |
||
| 84 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 85 | */ |
||
| 86 | public function getAllAttributeOptions($attributeCode, $pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 87 | { |
||
| 88 | return $this->getFactory() |
||
| 89 | ->createAkeneoPimAdapterFactory() |
||
| 90 | ->createAttributeOptionApiAdapter() |
||
| 91 | ->all($attributeCode, $pageSize, $queryParameters); |
||
| 92 | } |
||
| 93 | |||
| 94 | /** |
||
| 95 | * {@inheritdoc} |
||
| 96 | * |
||
| 97 | * @api |
||
| 98 | * |
||
| 99 | * @param int $pageSize The size of the page returned by the server. |
||
| 100 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 101 | * |
||
| 102 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 103 | */ |
||
| 104 | public function getAllAttributeGroups($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 105 | { |
||
| 106 | return $this->getFactory() |
||
| 107 | ->createAkeneoPimAdapterFactory() |
||
| 108 | ->createAttributeGroupApiAdapter() |
||
| 109 | ->all($pageSize, $queryParameters); |
||
| 110 | } |
||
| 111 | |||
| 112 | /** |
||
| 113 | * {@inheritdoc} |
||
| 114 | * |
||
| 115 | * @api |
||
| 116 | * |
||
| 117 | * @param int $pageSize The size of the page returned by the server. |
||
| 118 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 119 | * |
||
| 120 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 121 | */ |
||
| 122 | public function getAllChannels($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 123 | { |
||
| 124 | return $this->getFactory() |
||
| 125 | ->createAkeneoPimAdapterFactory() |
||
| 126 | ->createChannelApiAdapter() |
||
| 127 | ->all($pageSize, $queryParameters); |
||
| 128 | } |
||
| 129 | |||
| 130 | /** |
||
| 131 | * {@inheritdoc} |
||
| 132 | * |
||
| 133 | * @api |
||
| 134 | * |
||
| 135 | * @param int $pageSize The size of the page returned by the server. |
||
| 136 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 137 | * |
||
| 138 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 139 | */ |
||
| 140 | public function getAllCurrencies($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 141 | { |
||
| 142 | return $this->getFactory() |
||
| 143 | ->createAkeneoPimAdapterFactory() |
||
| 144 | ->createCurrencyApiAdapter() |
||
| 145 | ->all($pageSize, $queryParameters); |
||
| 146 | } |
||
| 147 | |||
| 148 | /** |
||
| 149 | * {@inheritdoc} |
||
| 150 | * |
||
| 151 | * @api |
||
| 152 | * |
||
| 153 | * @param int $pageSize The size of the page returned by the server. |
||
| 154 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 155 | * |
||
| 156 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 157 | */ |
||
| 158 | public function getAllLocales($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 159 | { |
||
| 160 | return $this->getFactory() |
||
| 161 | ->createAkeneoPimAdapterFactory() |
||
| 162 | ->createLocaleApiAdapter() |
||
| 163 | ->all($pageSize, $queryParameters); |
||
| 164 | } |
||
| 165 | |||
| 166 | /** |
||
| 167 | * {@inheritdoc} |
||
| 168 | * |
||
| 169 | * @api |
||
| 170 | * |
||
| 171 | * @param int $pageSize The size of the page returned by the server. |
||
| 172 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 173 | * |
||
| 174 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 175 | */ |
||
| 176 | public function getAllFamilies($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 177 | { |
||
| 178 | return $this->getFactory() |
||
| 179 | ->createAkeneoPimAdapterFactory() |
||
| 180 | ->createFamilyApiAdapter() |
||
| 181 | ->all($pageSize, $queryParameters); |
||
| 182 | } |
||
| 183 | |||
| 184 | /** |
||
| 185 | * {@inheritdoc} |
||
| 186 | * |
||
| 187 | * @api |
||
| 188 | * |
||
| 189 | * @param string $familyCode Family code from which you want to get a list of family variants. |
||
| 190 | * @param int $pageSize The size of the page returned by the server. |
||
| 191 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 192 | * |
||
| 193 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 194 | */ |
||
| 195 | public function getAllFamilyVariants($familyCode, $pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 196 | { |
||
| 197 | return $this->getFactory() |
||
| 198 | ->createAkeneoPimAdapterFactory() |
||
| 199 | ->createFamilyVariantApiAdapter() |
||
| 200 | ->all($familyCode, $pageSize, $queryParameters); |
||
| 201 | } |
||
| 202 | |||
| 203 | /** |
||
| 204 | * {@inheritdoc} |
||
| 205 | * |
||
| 206 | * @api |
||
| 207 | * |
||
| 208 | * @param int $pageSize The size of the page returned by the server. |
||
| 209 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 210 | * |
||
| 211 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 212 | */ |
||
| 213 | public function getAllMeasureFamilies($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 214 | { |
||
| 215 | return $this->getFactory() |
||
| 216 | ->createAkeneoPimAdapterFactory() |
||
| 217 | ->createMeasureFamilyApiAdapter() |
||
| 218 | ->all($pageSize, $queryParameters); |
||
| 219 | } |
||
| 220 | |||
| 221 | /** |
||
| 222 | * {@inheritdoc} |
||
| 223 | * |
||
| 224 | * @api |
||
| 225 | * |
||
| 226 | * @param int $pageSize The size of the page returned by the server. |
||
| 227 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 228 | * |
||
| 229 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 230 | */ |
||
| 231 | public function getAllAssociationTypes($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 232 | { |
||
| 233 | return $this->getFactory() |
||
| 234 | ->createAkeneoPimAdapterFactory() |
||
| 235 | ->createAssociationTypeApiAdapter() |
||
| 236 | ->all($pageSize, $queryParameters); |
||
| 237 | } |
||
| 238 | |||
| 239 | /** |
||
| 240 | * {@inheritdoc} |
||
| 241 | * |
||
| 242 | * @api |
||
| 243 | * |
||
| 244 | * @param int $pageSize The size of the page returned by the server. |
||
| 245 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 246 | * |
||
| 247 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 248 | */ |
||
| 249 | public function getAllProductMediaFiles($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 250 | { |
||
| 251 | return $this->getFactory() |
||
| 252 | ->createAkeneoPimAdapterFactory() |
||
| 253 | ->createProductMediaFileApiAdapter() |
||
| 254 | ->all($pageSize, $queryParameters); |
||
| 255 | } |
||
| 256 | |||
| 257 | /** |
||
| 258 | * {@inheritdoc} |
||
| 259 | * |
||
| 260 | * @api |
||
| 261 | * |
||
| 262 | * @param int $pageSize The size of the page returned by the server. |
||
| 263 | * @param array $queryParameters Additional query parameters to pass in the request |
||
| 264 | * |
||
| 265 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 266 | */ |
||
| 267 | public function getAllProductModels($pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 268 | { |
||
| 269 | return $this->getFactory() |
||
| 270 | ->createAkeneoPimAdapterFactory() |
||
| 271 | ->createProductModelApiAdapter() |
||
| 272 | ->all($pageSize, $queryParameters); |
||
| 273 | } |
||
| 274 | |||
| 275 | /** |
||
| 276 | * {@inheritdoc} |
||
| 277 | * |
||
| 278 | * @api |
||
| 279 | * |
||
| 280 | * @param string $code Code of the attribute |
||
| 281 | * |
||
| 282 | * @return array |
||
| 283 | */ |
||
| 284 | public function getAttribute($code): array |
||
| 285 | { |
||
| 286 | return $this->getFactory() |
||
| 287 | ->createAkeneoPimAdapterFactory() |
||
| 288 | ->createAttributeApiAdapter() |
||
| 289 | ->get($code); |
||
| 290 | } |
||
| 291 | |||
| 292 | /** |
||
| 293 | * {@inheritdoc} |
||
| 294 | * |
||
| 295 | * @api |
||
| 296 | * |
||
| 297 | * @param string $code Code of the attribute group |
||
| 298 | * |
||
| 299 | * @return array |
||
| 300 | */ |
||
| 301 | public function getAttributeGroup($code): array |
||
| 302 | { |
||
| 303 | return $this->getFactory() |
||
| 304 | ->createAkeneoPimAdapterFactory() |
||
| 305 | ->createAttributeGroupApiAdapter() |
||
| 306 | ->get($code); |
||
| 307 | } |
||
| 308 | |||
| 309 | /** |
||
| 310 | * {@inheritdoc} |
||
| 311 | * |
||
| 312 | * @api |
||
| 313 | * |
||
| 314 | * @param string $attributeCode Code of the attribute |
||
| 315 | * @param string $code Code of the attribute option |
||
| 316 | * |
||
| 317 | * @return array |
||
| 318 | */ |
||
| 319 | public function getAttributeOption($attributeCode, $code): array |
||
| 320 | { |
||
| 321 | return $this->getFactory() |
||
| 322 | ->createAkeneoPimAdapterFactory() |
||
| 323 | ->createAttributeOptionApiAdapter() |
||
| 324 | ->get($attributeCode, $code); |
||
| 325 | } |
||
| 326 | |||
| 327 | /** |
||
| 328 | * {@inheritdoc} |
||
| 329 | * |
||
| 330 | * @api |
||
| 331 | * |
||
| 332 | * @param string $code Code of the category |
||
| 333 | * |
||
| 334 | * @return array |
||
| 335 | */ |
||
| 336 | public function getCategory($code): array |
||
| 337 | { |
||
| 338 | return $this->getFactory() |
||
| 339 | ->createAkeneoPimAdapterFactory() |
||
| 340 | ->createCategoryApiAdapter() |
||
| 341 | ->get($code); |
||
| 342 | } |
||
| 343 | |||
| 344 | /** |
||
| 345 | * {@inheritdoc} |
||
| 346 | * |
||
| 347 | * @api |
||
| 348 | * |
||
| 349 | * @param string $code Code of the channel |
||
| 350 | * |
||
| 351 | * @return array |
||
| 352 | */ |
||
| 353 | public function getChannel($code): array |
||
| 354 | { |
||
| 355 | return $this->getFactory() |
||
| 356 | ->createAkeneoPimAdapterFactory() |
||
| 357 | ->createChannelApiAdapter() |
||
| 358 | ->get($code); |
||
| 359 | } |
||
| 360 | |||
| 361 | /** |
||
| 362 | * {@inheritdoc} |
||
| 363 | * |
||
| 364 | * @api |
||
| 365 | * |
||
| 366 | * @param string $code Code of the currency |
||
| 367 | * |
||
| 368 | * @return array |
||
| 369 | */ |
||
| 370 | public function getCurrency($code): array |
||
| 371 | { |
||
| 372 | return $this->getFactory() |
||
| 373 | ->createAkeneoPimAdapterFactory() |
||
| 374 | ->createCurrencyApiAdapter() |
||
| 375 | ->get($code); |
||
| 376 | } |
||
| 377 | |||
| 378 | /** |
||
| 379 | * {@inheritdoc} |
||
| 380 | * |
||
| 381 | * @api |
||
| 382 | * |
||
| 383 | * @param string $code Code of the locale |
||
| 384 | * |
||
| 385 | * @return array |
||
| 386 | */ |
||
| 387 | public function getLocale($code): array |
||
| 388 | { |
||
| 389 | return $this->getFactory() |
||
| 390 | ->createAkeneoPimAdapterFactory() |
||
| 391 | ->createLocaleApiAdapter() |
||
| 392 | ->get($code); |
||
| 393 | } |
||
| 394 | |||
| 395 | /** |
||
| 396 | * {@inheritdoc} |
||
| 397 | * |
||
| 398 | * @api |
||
| 399 | * |
||
| 400 | * @param string $code Code of the family |
||
| 401 | * |
||
| 402 | * @return array |
||
| 403 | */ |
||
| 404 | public function getFamily($code): array |
||
| 405 | { |
||
| 406 | return $this->getFactory() |
||
| 407 | ->createAkeneoPimAdapterFactory() |
||
| 408 | ->createFamilyApiAdapter() |
||
| 409 | ->get($code); |
||
| 410 | } |
||
| 411 | |||
| 412 | /** |
||
| 413 | * {@inheritdoc} |
||
| 414 | * |
||
| 415 | * @api |
||
| 416 | * |
||
| 417 | * @param string $familyCode Code of the family |
||
| 418 | * @param string $code Code of the family variant |
||
| 419 | * |
||
| 420 | * @return array |
||
| 421 | */ |
||
| 422 | public function getFamilyVariant($familyCode, $code): array |
||
| 423 | { |
||
| 424 | return $this->getFactory() |
||
| 425 | ->createAkeneoPimAdapterFactory() |
||
| 426 | ->createFamilyVariantApiAdapter() |
||
| 427 | ->get($familyCode, $code); |
||
| 428 | } |
||
| 429 | |||
| 430 | /** |
||
| 431 | * {@inheritdoc} |
||
| 432 | * |
||
| 433 | * @api |
||
| 434 | * |
||
| 435 | * @param string $code Code of the measure family |
||
| 436 | * |
||
| 437 | * @return array |
||
| 438 | */ |
||
| 439 | public function getMeasureFamily($code): array |
||
| 440 | { |
||
| 441 | return $this->getFactory() |
||
| 442 | ->createAkeneoPimAdapterFactory() |
||
| 443 | ->createMeasureFamilyApiAdapter() |
||
| 444 | ->get($code); |
||
| 445 | } |
||
| 446 | |||
| 447 | /** |
||
| 448 | * {@inheritdoc} |
||
| 449 | * |
||
| 450 | * @api |
||
| 451 | * |
||
| 452 | * @param string $code Code of the product |
||
| 453 | * |
||
| 454 | * @return array |
||
| 455 | */ |
||
| 456 | public function getProduct($code): array |
||
| 457 | { |
||
| 458 | return $this->getFactory() |
||
| 459 | ->createAkeneoPimAdapterFactory() |
||
| 460 | ->createProductApiAdapter() |
||
| 461 | ->get($code); |
||
| 462 | } |
||
| 463 | |||
| 464 | /** |
||
| 465 | * {@inheritdoc} |
||
| 466 | * |
||
| 467 | * @api |
||
| 468 | * |
||
| 469 | * @param string $code Code of the product media file |
||
| 470 | * |
||
| 471 | * @return array |
||
| 472 | */ |
||
| 473 | public function getProductMediaFile($code): array |
||
| 474 | { |
||
| 475 | return $this->getFactory() |
||
| 476 | ->createAkeneoPimAdapterFactory() |
||
| 477 | ->createProductMediaFileApiAdapter() |
||
| 478 | ->get($code); |
||
| 479 | } |
||
| 480 | |||
| 481 | /** |
||
| 482 | * {@inheritdoc} |
||
| 483 | * |
||
| 484 | * @api |
||
| 485 | * |
||
| 486 | * @param string $code Code of the product model |
||
| 487 | * |
||
| 488 | * @return array |
||
| 489 | */ |
||
| 490 | public function getProductModel($code): array |
||
| 491 | { |
||
| 492 | return $this->getFactory() |
||
| 493 | ->createAkeneoPimAdapterFactory() |
||
| 494 | ->createProductModelApiAdapter() |
||
| 495 | ->get($code); |
||
| 496 | } |
||
| 497 | |||
| 498 | /** |
||
| 499 | * {@inheritdoc} |
||
| 500 | * |
||
| 501 | * @api |
||
| 502 | * |
||
| 503 | * @param int $limit The maximum number of attributes to return. |
||
| 504 | * @param bool $withCount Set to true to return the total count of attributes. |
||
| 505 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 506 | * |
||
| 507 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 508 | */ |
||
| 509 | public function getAttributesListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 510 | { |
||
| 511 | return $this->getFactory() |
||
| 512 | ->createAkeneoPimAdapterFactory() |
||
| 513 | ->createAttributeApiAdapter() |
||
| 514 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 515 | } |
||
| 516 | |||
| 517 | /** |
||
| 518 | * {@inheritdoc} |
||
| 519 | * |
||
| 520 | * @api |
||
| 521 | * |
||
| 522 | * @param int $limit The maximum number of attribute groups to return. |
||
| 523 | * @param bool $withCount Set to true to return the total count of attribute groups. |
||
| 524 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 525 | * |
||
| 526 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 527 | */ |
||
| 528 | public function getAttributeGroupsListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 529 | { |
||
| 530 | return $this->getFactory() |
||
| 531 | ->createAkeneoPimAdapterFactory() |
||
| 532 | ->createAttributeGroupApiAdapter() |
||
| 533 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 534 | } |
||
| 535 | |||
| 536 | /** |
||
| 537 | * {@inheritdoc} |
||
| 538 | * |
||
| 539 | * @api |
||
| 540 | * |
||
| 541 | * @param string $attributeCode Code of the attribute |
||
| 542 | * @param int $limit The maximum number of resources to return. |
||
| 543 | * @param bool $withCount Set to true to return the total count of resources. |
||
| 544 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 545 | * |
||
| 546 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 547 | */ |
||
| 548 | public function getAttributeOptionsListPerPage($attributeCode, $limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 549 | { |
||
| 550 | return $this->getFactory() |
||
| 551 | ->createAkeneoPimAdapterFactory() |
||
| 552 | ->createAttributeOptionApiAdapter() |
||
| 553 | ->listPerPage($attributeCode, $limit, $withCount, $queryParameters); |
||
| 554 | } |
||
| 555 | |||
| 556 | /** |
||
| 557 | * {@inheritdoc} |
||
| 558 | * |
||
| 559 | * @api |
||
| 560 | * |
||
| 561 | * @param int $limit The maximum number of categories to return. |
||
| 562 | * @param bool $withCount Set to true to return the total count of categories. |
||
| 563 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 564 | * |
||
| 565 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 566 | */ |
||
| 567 | public function getCategoriesListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 568 | { |
||
| 569 | return $this->getFactory() |
||
| 570 | ->createAkeneoPimAdapterFactory() |
||
| 571 | ->createCategoryApiAdapter() |
||
| 572 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 573 | } |
||
| 574 | |||
| 575 | /** |
||
| 576 | * {@inheritdoc} |
||
| 577 | * |
||
| 578 | * @api |
||
| 579 | * |
||
| 580 | * @param int $limit The maximum number of channels to return. |
||
| 581 | * @param bool $withCount Set to true to return the total count of channels. |
||
| 582 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 583 | * |
||
| 584 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 585 | */ |
||
| 586 | public function getChannelsListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 587 | { |
||
| 588 | return $this->getFactory() |
||
| 589 | ->createAkeneoPimAdapterFactory() |
||
| 590 | ->createChannelApiAdapter() |
||
| 591 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 592 | } |
||
| 593 | |||
| 594 | /** |
||
| 595 | * {@inheritdoc} |
||
| 596 | * |
||
| 597 | * @api |
||
| 598 | * |
||
| 599 | * @param int $limit The maximum number of currencies to return. |
||
| 600 | * @param bool $withCount Set to true to return the total count of currencies. |
||
| 601 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 602 | * |
||
| 603 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 604 | */ |
||
| 605 | public function getCurrenciesListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 606 | { |
||
| 607 | return $this->getFactory() |
||
| 608 | ->createAkeneoPimAdapterFactory() |
||
| 609 | ->createCurrencyApiAdapter() |
||
| 610 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 611 | } |
||
| 612 | |||
| 613 | /** |
||
| 614 | * {@inheritdoc} |
||
| 615 | * |
||
| 616 | * @api |
||
| 617 | * |
||
| 618 | * @param int $limit The maximum number of locales to return. |
||
| 619 | * @param bool $withCount Set to true to return the total count of locales. |
||
| 620 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 621 | * |
||
| 622 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 623 | */ |
||
| 624 | public function getLocalesListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 625 | { |
||
| 626 | return $this->getFactory() |
||
| 627 | ->createAkeneoPimAdapterFactory() |
||
| 628 | ->createAttributeGroupApiAdapter() |
||
| 629 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 630 | } |
||
| 631 | |||
| 632 | /** |
||
| 633 | * {@inheritdoc} |
||
| 634 | * |
||
| 635 | * @api |
||
| 636 | * |
||
| 637 | * @param int $limit The maximum number of families to return. |
||
| 638 | * @param bool $withCount Set to true to return the total count of families. |
||
| 639 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 640 | * |
||
| 641 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 642 | */ |
||
| 643 | public function getFamiliesListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 644 | { |
||
| 645 | return $this->getFactory() |
||
| 646 | ->createAkeneoPimAdapterFactory() |
||
| 647 | ->createFamilyApiAdapter() |
||
| 648 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 649 | } |
||
| 650 | |||
| 651 | /** |
||
| 652 | * {@inheritdoc} |
||
| 653 | * |
||
| 654 | * @api |
||
| 655 | * |
||
| 656 | * @param string $familyCode Family code from which you want to get a list of family variants. |
||
| 657 | * @param int $limit The maximum number of family variants to return. |
||
| 658 | * @param bool $withCount Set to true to return the total count of family variants. |
||
| 659 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 660 | * |
||
| 661 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 662 | */ |
||
| 663 | public function getFamilyVariantsListPerPage($familyCode, $limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 664 | { |
||
| 665 | return $this->getFactory() |
||
| 666 | ->createAkeneoPimAdapterFactory() |
||
| 667 | ->createFamilyVariantApiAdapter() |
||
| 668 | ->listPerPage($familyCode, $limit, $withCount, $queryParameters); |
||
| 669 | } |
||
| 670 | |||
| 671 | /** |
||
| 672 | * {@inheritdoc} |
||
| 673 | * |
||
| 674 | * @api |
||
| 675 | * |
||
| 676 | * @param int $limit The maximum number of measure families to return. |
||
| 677 | * @param bool $withCount Set to true to return the total count of measure families. |
||
| 678 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 679 | * |
||
| 680 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 681 | */ |
||
| 682 | public function getMeasureFamilyListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 683 | { |
||
| 684 | return $this->getFactory() |
||
| 685 | ->createAkeneoPimAdapterFactory() |
||
| 686 | ->createMeasureFamilyApiAdapter() |
||
| 687 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 688 | } |
||
| 689 | |||
| 690 | /** |
||
| 691 | * {@inheritdoc} |
||
| 692 | * |
||
| 693 | * @api |
||
| 694 | * |
||
| 695 | * @param int $limit The maximum number of products to return. |
||
| 696 | * @param bool $withCount Set to true to return the total count of products. |
||
| 697 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 698 | * |
||
| 699 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 700 | */ |
||
| 701 | public function getProductsListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 702 | { |
||
| 703 | return $this->getFactory() |
||
| 704 | ->createAkeneoPimAdapterFactory() |
||
| 705 | ->createProductApiAdapter() |
||
| 706 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 707 | } |
||
| 708 | |||
| 709 | /** |
||
| 710 | * {@inheritdoc} |
||
| 711 | * |
||
| 712 | * @api |
||
| 713 | * |
||
| 714 | * @param int $limit The maximum number of product media files to return. |
||
| 715 | * @param bool $withCount Set to true to return the total count of product media files. |
||
| 716 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 717 | * |
||
| 718 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 719 | */ |
||
| 720 | public function getProductMediaFilesListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 721 | { |
||
| 722 | return $this->getFactory() |
||
| 723 | ->createAkeneoPimAdapterFactory() |
||
| 724 | ->createProductMediaFileApiAdapter() |
||
| 725 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 726 | } |
||
| 727 | |||
| 728 | /** |
||
| 729 | * {@inheritdoc} |
||
| 730 | * |
||
| 731 | * @api |
||
| 732 | * |
||
| 733 | * @param int $limit The maximum number of product models to return. |
||
| 734 | * @param bool $withCount Set to true to return the total count of product models. |
||
| 735 | * @param array $queryParameters Additional query parameters to pass in the request. |
||
| 736 | * |
||
| 737 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 738 | */ |
||
| 739 | public function getProductModelsListPerPage($limit = 10, $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 740 | { |
||
| 741 | return $this->getFactory() |
||
| 742 | ->createAkeneoPimAdapterFactory() |
||
| 743 | ->createProductModelApiAdapter() |
||
| 744 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 745 | } |
||
| 746 | |||
| 747 | /** |
||
| 748 | * {@inheritdoc} |
||
| 749 | * |
||
| 750 | * @api |
||
| 751 | * |
||
| 752 | * @param int $pageSize |
||
| 753 | * @param array $queryParameters |
||
| 754 | * |
||
| 755 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 756 | * |
||
| 757 | */ |
||
| 758 | public function getAllAssets(int $pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 759 | { |
||
| 760 | return $this->getFactory() |
||
| 761 | ->createAkeneoPimAdapterFactory() |
||
| 762 | ->createAssetApiAdapter() |
||
| 763 | ->all($pageSize, $queryParameters); |
||
| 764 | } |
||
| 765 | |||
| 766 | /** |
||
| 767 | * {@inheritdoc} |
||
| 768 | * |
||
| 769 | * @api |
||
| 770 | * |
||
| 771 | * @param string $code |
||
| 772 | * |
||
| 773 | * @return array |
||
| 774 | |||
| 775 | */ |
||
| 776 | public function getAsset(string $code): array |
||
| 777 | { |
||
| 778 | return $this->getFactory() |
||
| 779 | ->createAkeneoPimAdapterFactory() |
||
| 780 | ->createAssetApiAdapter() |
||
| 781 | ->get($code); |
||
| 782 | } |
||
| 783 | |||
| 784 | /** |
||
| 785 | * {@inheritdoc} |
||
| 786 | * |
||
| 787 | * @api |
||
| 788 | * |
||
| 789 | * @param int $limit |
||
| 790 | * @param bool $withCount |
||
| 791 | * @param array $queryParameters |
||
| 792 | * |
||
| 793 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 794 | */ |
||
| 795 | public function getAssetsListPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 801 | } |
||
| 802 | |||
| 803 | /** |
||
| 804 | * {@inheritdoc} |
||
| 805 | * |
||
| 806 | * @api |
||
| 807 | * |
||
| 808 | * @param int $pageSize |
||
| 809 | * @param array $queryParameters |
||
| 810 | * |
||
| 811 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 812 | */ |
||
| 813 | public function getAllAssetTags(int $pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 814 | { |
||
| 815 | return $this->getFactory() |
||
| 816 | ->createAkeneoPimAdapterFactory() |
||
| 817 | ->createAssetTagApiAdapter() |
||
| 818 | ->all($pageSize, $queryParameters); |
||
| 819 | } |
||
| 820 | |||
| 821 | /** |
||
| 822 | * {@inheritdoc} |
||
| 823 | * |
||
| 824 | * @api |
||
| 825 | * |
||
| 826 | * @param string $code |
||
| 827 | * |
||
| 828 | * @return array |
||
| 829 | */ |
||
| 830 | public function getAssetTag(string $code): array |
||
| 831 | { |
||
| 832 | return $this->getFactory() |
||
| 833 | ->createAkeneoPimAdapterFactory() |
||
| 834 | ->createAssetTagApiAdapter() |
||
| 835 | ->get($code); |
||
| 836 | } |
||
| 837 | |||
| 838 | /** |
||
| 839 | * {@inheritdoc} |
||
| 840 | * |
||
| 841 | * @api |
||
| 842 | * |
||
| 843 | * @param int $limit |
||
| 844 | * @param bool $withCount |
||
| 845 | * @param array $queryParameters |
||
| 846 | * |
||
| 847 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 848 | */ |
||
| 849 | public function getAssetTagsListPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 850 | { |
||
| 851 | return $this->getFactory() |
||
| 852 | ->createAkeneoPimAdapterFactory() |
||
| 853 | ->createAssetTagApiAdapter() |
||
| 854 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 855 | } |
||
| 856 | |||
| 857 | /** |
||
| 858 | * {@inheritdoc} |
||
| 859 | * |
||
| 860 | * @api |
||
| 861 | * |
||
| 862 | * @param int $pageSize |
||
| 863 | * @param array $queryParameters |
||
| 864 | * |
||
| 865 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 866 | * @api |
||
| 867 | * |
||
| 868 | */ |
||
| 869 | public function getAllAssetCategories(int $pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 870 | { |
||
| 871 | return $this->getFactory() |
||
| 872 | ->createAkeneoPimAdapterFactory() |
||
| 873 | ->createAssetCategoryApiAdapter() |
||
| 874 | ->all($pageSize, $queryParameters); |
||
| 875 | } |
||
| 876 | |||
| 877 | /** |
||
| 878 | * {@inheritdoc} |
||
| 879 | * |
||
| 880 | * @api |
||
| 881 | * |
||
| 882 | * @param string $code |
||
| 883 | * |
||
| 884 | * @return array |
||
| 885 | */ |
||
| 886 | public function getAssetCategory(string $code): array |
||
| 887 | { |
||
| 888 | return $this->getFactory() |
||
| 889 | ->createAkeneoPimAdapterFactory() |
||
| 890 | ->createAssetCategoryApiAdapter() |
||
| 891 | ->get($code); |
||
| 892 | } |
||
| 893 | |||
| 894 | /** |
||
| 895 | * {@inheritdoc} |
||
| 896 | * |
||
| 897 | * @api |
||
| 898 | * |
||
| 899 | * @param int $limit |
||
| 900 | * @param bool $withCount |
||
| 901 | * @param array $queryParameters |
||
| 902 | * |
||
| 903 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 904 | */ |
||
| 905 | public function getAssetCategoriesListPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 906 | { |
||
| 907 | return $this->getFactory() |
||
| 908 | ->createAkeneoPimAdapterFactory() |
||
| 909 | ->createAssetCategoryApiAdapter() |
||
| 910 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 911 | } |
||
| 912 | |||
| 913 | /** |
||
| 914 | * {@inheritdoc} |
||
| 915 | * |
||
| 916 | * @api |
||
| 917 | * |
||
| 918 | * @param string $code |
||
| 919 | * |
||
| 920 | * @return array |
||
| 921 | */ |
||
| 922 | public function getReferenceEntity(string $code): array |
||
| 923 | { |
||
| 924 | return $this->getFactory() |
||
| 925 | ->createAkeneoPimAdapterFactory() |
||
| 926 | ->createReferenceEntityApiAdapter() |
||
| 927 | ->get($code); |
||
| 928 | } |
||
| 929 | |||
| 930 | /** |
||
| 931 | * {@inheritdoc} |
||
| 932 | * |
||
| 933 | * @api |
||
| 934 | * |
||
| 935 | * @param array $queryParameters |
||
| 936 | * |
||
| 937 | * @return \Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface |
||
| 938 | */ |
||
| 939 | public function getAllReferenceEntities(array $queryParameters = []): ResourceCursorInterface |
||
| 940 | { |
||
| 941 | return $this->getFactory() |
||
| 942 | ->createAkeneoPimAdapterFactory() |
||
| 943 | ->createReferenceEntityApiAdapter() |
||
| 944 | ->all($queryParameters); |
||
| 945 | } |
||
| 946 | |||
| 947 | /** |
||
| 948 | * {@inheritdoc} |
||
| 949 | * |
||
| 950 | * @api |
||
| 951 | * |
||
| 952 | * @param string $referenceEntityCode |
||
| 953 | * @param string $recordCode |
||
| 954 | * |
||
| 955 | * @return array |
||
| 956 | */ |
||
| 957 | public function getReferenceEntityRecord(string $referenceEntityCode, string $recordCode): array |
||
| 958 | { |
||
| 959 | return $this->getFactory() |
||
| 960 | ->createAkeneoPimAdapterFactory() |
||
| 961 | ->createReferenceEntityRecordApiAdapter() |
||
| 962 | ->get($referenceEntityCode, $recordCode); |
||
| 963 | } |
||
| 964 | |||
| 965 | /** |
||
| 966 | * {@inheritdoc} |
||
| 967 | * |
||
| 968 | * @api |
||
| 969 | * |
||
| 970 | * @param string $referenceEntityCode |
||
| 971 | * @param array $queryParameters |
||
| 972 | * |
||
| 973 | * @return \Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface |
||
| 974 | */ |
||
| 975 | public function getReferenceEntityRecords(string $referenceEntityCode, array $queryParameters = []): ResourceCursorInterface |
||
| 976 | { |
||
| 977 | return $this->getFactory() |
||
| 978 | ->createAkeneoPimAdapterFactory() |
||
| 979 | ->createReferenceEntityRecordApiAdapter() |
||
| 980 | ->all($referenceEntityCode, $queryParameters); |
||
| 981 | } |
||
| 982 | |||
| 983 | /** |
||
| 984 | * {@inheritdoc} |
||
| 985 | * |
||
| 986 | * @api |
||
| 987 | * |
||
| 988 | * @param string $referenceEntityCode |
||
| 989 | * @param string $attributeCode |
||
| 990 | * |
||
| 991 | * @return array |
||
| 992 | */ |
||
| 993 | public function getReferenceEntityAttribute(string $referenceEntityCode, string $attributeCode): array |
||
| 994 | { |
||
| 995 | return $this->getFactory() |
||
| 996 | ->createAkeneoPimAdapterFactory() |
||
| 997 | ->createReferenceEntityAttributeApiAdapter() |
||
| 998 | ->get($referenceEntityCode, $attributeCode); |
||
| 999 | } |
||
| 1000 | |||
| 1001 | /** |
||
| 1002 | * {@inheritdoc} |
||
| 1003 | * |
||
| 1004 | * @api |
||
| 1005 | * |
||
| 1006 | * @param string $referenceEntityCode |
||
| 1007 | * @param array $queryParameters |
||
| 1008 | * |
||
| 1009 | * @return \Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface |
||
| 1010 | */ |
||
| 1011 | public function getReferenceEntityAttributes(string $referenceEntityCode, array $queryParameters = []): ResourceCursorInterface |
||
| 1012 | { |
||
| 1013 | return $this->getFactory() |
||
| 1014 | ->createAkeneoPimAdapterFactory() |
||
| 1015 | ->createReferenceEntityAttributeApiAdapter() |
||
| 1016 | ->all($referenceEntityCode, $queryParameters); |
||
| 1017 | } |
||
| 1018 | |||
| 1019 | /** |
||
| 1020 | * {@inheritdoc} |
||
| 1021 | * |
||
| 1022 | * @api |
||
| 1023 | * |
||
| 1024 | * @param string $referenceEntityCode |
||
| 1025 | * @param string $attributeCode |
||
| 1026 | * @param string $attributeOptionCode |
||
| 1027 | * |
||
| 1028 | * @return array |
||
| 1029 | */ |
||
| 1030 | public function getReferenceEntityAttributeOption(string $referenceEntityCode, string $attributeCode, string $attributeOptionCode): array |
||
| 1031 | { |
||
| 1032 | return $this->getFactory() |
||
| 1033 | ->createAkeneoPimAdapterFactory() |
||
| 1034 | ->createReferenceEntityAttributeOptionApiAdapter() |
||
| 1035 | ->get($referenceEntityCode, $attributeCode, $attributeOptionCode); |
||
| 1036 | } |
||
| 1037 | |||
| 1038 | /** |
||
| 1039 | * {@inheritdoc} |
||
| 1040 | * |
||
| 1041 | * @api |
||
| 1042 | * |
||
| 1043 | * @param string $referenceEntityCode |
||
| 1044 | * @param string $attributeCode |
||
| 1045 | * |
||
| 1046 | * @return array |
||
| 1047 | */ |
||
| 1048 | public function getReferenceEntityAttributeOptions(string $referenceEntityCode, string $attributeCode): array |
||
| 1054 | } |
||
| 1055 | |||
| 1056 | /** |
||
| 1057 | * {@inheritdoc} |
||
| 1058 | * |
||
| 1059 | * @api |
||
| 1060 | * |
||
| 1061 | * @param string $code |
||
| 1062 | * |
||
| 1063 | * @return array |
||
| 1064 | */ |
||
| 1065 | public function getPublishedProduct(string $code): array |
||
| 1066 | { |
||
| 1067 | return $this->getFactory() |
||
| 1068 | ->createAkeneoPimAdapterFactory() |
||
| 1069 | ->createPublishedProductApiAdapter() |
||
| 1070 | ->get($code); |
||
| 1071 | } |
||
| 1072 | |||
| 1073 | /** |
||
| 1074 | * {@inheritdoc} |
||
| 1075 | * |
||
| 1076 | * @api |
||
| 1077 | * |
||
| 1078 | * @param int $pageSize |
||
| 1079 | * @param array $queryParameters |
||
| 1080 | * |
||
| 1081 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourceCursorInterface |
||
| 1082 | */ |
||
| 1083 | public function getAllPublishedProducts(int $pageSize = 10, array $queryParameters = []): AkeneoResourceCursorInterface |
||
| 1084 | { |
||
| 1085 | return $this->getFactory() |
||
| 1086 | ->createAkeneoPimAdapterFactory() |
||
| 1087 | ->createPublishedProductApiAdapter() |
||
| 1088 | ->all($pageSize, $queryParameters); |
||
| 1089 | } |
||
| 1090 | |||
| 1091 | /** |
||
| 1092 | * {@inheritdoc} |
||
| 1093 | * |
||
| 1094 | * @api |
||
| 1095 | * |
||
| 1096 | * @param int $limit |
||
| 1097 | * @param bool $withCount |
||
| 1098 | * @param array $queryParameters |
||
| 1099 | * |
||
| 1100 | * @return \SprykerEco\Service\AkeneoPim\Dependencies\External\Api\Wrapper\AkeneoResourcePageInterface |
||
| 1101 | */ |
||
| 1102 | public function getPublishedProductsListPerPage(int $limit = 10, bool $withCount = false, array $queryParameters = []): AkeneoResourcePageInterface |
||
| 1103 | { |
||
| 1104 | return $this->getFactory() |
||
| 1105 | ->createAkeneoPimAdapterFactory() |
||
| 1106 | ->createPublishedProductApiAdapter() |
||
| 1107 | ->listPerPage($limit, $withCount, $queryParameters); |
||
| 1108 | } |
||
| 1109 | |||
| 1110 | /** |
||
| 1111 | * {@inheritdoc} |
||
| 1112 | * |
||
| 1113 | * @api |
||
| 1114 | * |
||
| 1115 | * @param string $code |
||
| 1116 | * |
||
| 1117 | * @return array |
||
| 1118 | */ |
||
| 1119 | public function getProductDraft(string $code): array |
||
| 1120 | { |
||
| 1121 | return $this->getFactory() |
||
| 1122 | ->createAkeneoPimAdapterFactory() |
||
| 1123 | ->createProductDraftApiAdapter() |
||
| 1124 | ->get($code); |
||
| 1125 | } |
||
| 1126 | |||
| 1127 | /** |
||
| 1128 | * {@inheritdoc} |
||
| 1129 | * |
||
| 1130 | * @api |
||
| 1131 | * |
||
| 1132 | * @param string $code |
||
| 1133 | * |
||
| 1134 | * @return array |
||
| 1135 | */ |
||
| 1136 | public function getProductModelDraft(string $code): array |
||
| 1142 | } |
||
| 1143 | |||
| 1144 | /** |
||
| 1145 | * {@inheritdoc} |
||
| 1146 | * |
||
| 1147 | * @api |
||
| 1148 | * |
||
| 1149 | * @param string $code |
||
| 1150 | * |
||
| 1151 | * @return \Psr\Http\Message\ResponseInterface |
||
| 1152 | */ |
||
| 1153 | public function downloadReferenceEntityMediaFile(string $code): ResponseInterface |
||
| 1154 | { |
||
| 1155 | return $this->getFactory() |
||
| 1156 | ->createAkeneoPimAdapterFactory() |
||
| 1157 | ->createReferenceEntityMediaFileApiAdapter() |
||
| 1158 | ->download($code); |
||
| 1159 | } |
||
| 1160 | |||
| 1161 | /** |
||
| 1162 | * {@inheritdoc} |
||
| 1163 | * |
||
| 1164 | * @api |
||
| 1165 | * |
||
| 1166 | * @param string $assetCode |
||
| 1167 | * @param string $localeCode |
||
| 1168 | * |
||
| 1169 | * @return array |
||
| 1170 | */ |
||
| 1171 | public function getAssetReferenceFileFromLocalizableAsset(string $assetCode, string $localeCode): array |
||
| 1172 | { |
||
| 1173 | return $this->getFactory() |
||
| 1174 | ->createAkeneoPimAdapterFactory() |
||
| 1175 | ->createAssetReferenceFileApiAdapter() |
||
| 1176 | ->getFromLocalizableAsset($assetCode, $localeCode); |
||
| 1177 | } |
||
| 1178 | |||
| 1179 | /** |
||
| 1180 | * {@inheritdoc} |
||
| 1181 | * |
||
| 1182 | * @api |
||
| 1183 | * |
||
| 1184 | * @param string $assetCode |
||
| 1185 | * |
||
| 1186 | * @return array |
||
| 1187 | */ |
||
| 1188 | public function getAssetReferenceFileFromNotLocalizableAsset(string $assetCode): array |
||
| 1189 | { |
||
| 1190 | return $this->getFactory() |
||
| 1191 | ->createAkeneoPimAdapterFactory() |
||
| 1192 | ->createAssetReferenceFileApiAdapter() |
||
| 1193 | ->getFromNotLocalizableAsset($assetCode); |
||
| 1194 | } |
||
| 1195 | |||
| 1196 | /** |
||
| 1197 | * {@inheritdoc} |
||
| 1198 | * |
||
| 1199 | * @api |
||
| 1200 | * |
||
| 1201 | * @param string $assetCode |
||
| 1202 | * @param string $localeCode |
||
| 1203 | * |
||
| 1204 | * @return \Psr\Http\Message\ResponseInterface |
||
| 1205 | */ |
||
| 1206 | public function downloadAssetReferenceFileFromLocalizableAsset(string $assetCode, string $localeCode): ResponseInterface |
||
| 1212 | } |
||
| 1213 | |||
| 1214 | /** |
||
| 1215 | * {@inheritdoc} |
||
| 1216 | * |
||
| 1217 | * @api |
||
| 1218 | * |
||
| 1219 | * @param string $assetCode |
||
| 1220 | * |
||
| 1221 | * @return \Psr\Http\Message\ResponseInterface |
||
| 1222 | */ |
||
| 1223 | public function downloadAssetReferenceFileFromNotLocalizableAsset(string $assetCode): ResponseInterface |
||
| 1224 | { |
||
| 1225 | return $this->getFactory() |
||
| 1226 | ->createAkeneoPimAdapterFactory() |
||
| 1227 | ->createAssetReferenceFileApiAdapter() |
||
| 1228 | ->downloadFromNotLocalizableAsset($assetCode); |
||
| 1229 | } |
||
| 1230 | |||
| 1231 | /** |
||
| 1232 | * {@inheritdoc} |
||
| 1233 | * |
||
| 1234 | * @api |
||
| 1235 | * |
||
| 1236 | * @param string $assetCode |
||
| 1237 | * @param string $channelCode |
||
| 1238 | * @param string $localeCode |
||
| 1239 | * |
||
| 1240 | * @return array |
||
| 1241 | */ |
||
| 1242 | public function getAssetVariationFileFromLocalizableAsset(string $assetCode, string $channelCode, string $localeCode): array |
||
| 1243 | { |
||
| 1244 | return $this->getFactory() |
||
| 1245 | ->createAkeneoPimAdapterFactory() |
||
| 1246 | ->createAssetVariationFileApiAdapter() |
||
| 1247 | ->getFromLocalizableAsset($assetCode, $channelCode, $localeCode); |
||
| 1248 | } |
||
| 1249 | |||
| 1250 | /** |
||
| 1251 | * {@inheritdoc} |
||
| 1252 | * |
||
| 1253 | * @api |
||
| 1254 | * |
||
| 1255 | * @param string $assetCode |
||
| 1256 | * @param string $channelCode |
||
| 1257 | * |
||
| 1258 | * @return array |
||
| 1259 | */ |
||
| 1260 | public function getAssetVariationFileFromNotLocalizableAsset(string $assetCode, string $channelCode): array |
||
| 1266 | } |
||
| 1267 | |||
| 1268 | /** |
||
| 1269 | * {@inheritdoc} |
||
| 1270 | * |
||
| 1271 | * @api |
||
| 1272 | * |
||
| 1273 | * @param string $assetCode |
||
| 1274 | * @param string $channelCode |
||
| 1275 | * @param string $localeCode |
||
| 1276 | * |
||
| 1277 | * @return \Psr\Http\Message\ResponseInterface |
||
| 1278 | */ |
||
| 1279 | public function downloadAssetVariationFileFromLocalizableAsset(string $assetCode, string $channelCode, string $localeCode): ResponseInterface |
||
| 1285 | } |
||
| 1286 | |||
| 1287 | /** |
||
| 1288 | * {@inheritdoc} |
||
| 1289 | * |
||
| 1290 | * @api |
||
| 1291 | * |
||
| 1292 | * @param string $assetCode |
||
| 1293 | * @param string $channelCode |
||
| 1294 | * |
||
| 1295 | * @return \Psr\Http\Message\ResponseInterface |
||
| 1296 | */ |
||
| 1297 | public function downloadAssetVariationFileFromNotLocalizableAsset(string $assetCode, string $channelCode): ResponseInterface |
||
| 1303 | } |
||
| 1304 | } |
||
| 1305 |