123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\TestModuleDefaultHydrator\Api;
- /**
- * Customer CRUD interface
- */
- interface CustomerPersistenceInterface
- {
- /**
- * Create customer
- *
- * @api
- * @param \Magento\Customer\Api\Data\CustomerInterface $customer
- * @param string $passwordHash
- * @return \Magento\Customer\Api\Data\CustomerInterface
- * @throws \Magento\Framework\Exception\InputException If bad input is provided
- * @throws \Magento\Framework\Exception\State\InputMismatchException If the provided email is already used
- * @throws \Magento\Framework\Exception\LocalizedException
- */
- public function save(\Magento\Customer\Api\Data\CustomerInterface $customer);
- /**
- * Retrieve customer by email
- *
- * @api
- * @param string $email
- * @param int|null $websiteId
- * @return \Magento\Customer\Api\Data\CustomerInterface
- * @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified email does not exist
- * @throws \Magento\Framework\Exception\LocalizedException
- */
- public function get($email, $websiteId = null);
- /**
- * Retrieve customer by id
- *
- * @api
- * @param int $id
- * @param int|null $websiteId
- * @return \Magento\Customer\Api\Data\CustomerInterface
- * @throws \Magento\Framework\Exception\NoSuchEntityException
- * @throws \Magento\Framework\Exception\LocalizedException
- */
- public function getById($id, $websiteId = null);
- /**
- * Delete customer by id
- *
- * @api
- * @param int $id
- * @return bool
- * @throws \Magento\Framework\Exception\NoSuchEntityException
- * @throws \Magento\Framework\Exception\LocalizedException
- */
- public function delete($id);
- }
|