1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- /**
- *
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\ConfigurableProduct\Api;
- /**
- * Manage options of configurable product
- *
- * @api
- * @since 100.0.2
- */
- interface OptionRepositoryInterface
- {
- /**
- * Get option for configurable product
- *
- * @param string $sku
- * @param int $id
- * @return \Magento\ConfigurableProduct\Api\Data\OptionInterface
- * @throws \Magento\Framework\Exception\NoSuchEntityException
- * @throws \Magento\Framework\Exception\InputException
- */
- public function get($sku, $id);
- /**
- * Get all options for configurable product
- *
- * @param string $sku
- * @return \Magento\ConfigurableProduct\Api\Data\OptionInterface[]
- * @throws \Magento\Framework\Exception\NoSuchEntityException
- * @throws \Magento\Framework\Exception\InputException
- */
- public function getList($sku);
- /**
- * Remove option from configurable product
- *
- * @param \Magento\ConfigurableProduct\Api\Data\OptionInterface $option
- * @return bool
- */
- public function delete(\Magento\ConfigurableProduct\Api\Data\OptionInterface $option);
- /**
- * Remove option from configurable product
- *
- * @param string $sku
- * @param int $id
- * @return bool
- * @throws \Magento\Framework\Exception\NoSuchEntityException
- * @throws \Magento\Framework\Exception\InputException
- */
- public function deleteById($sku, $id);
- /**
- * Save option
- *
- * @param string $sku
- * @param \Magento\ConfigurableProduct\Api\Data\OptionInterface $option
- * @return int
- * @throws \Magento\Framework\Exception\NoSuchEntityException
- * @throws \Magento\Framework\Exception\CouldNotSaveException
- * @throws \InvalidArgumentException
- */
- public function save($sku, \Magento\ConfigurableProduct\Api\Data\OptionInterface $option);
- }
|