GroupManagementInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Customer\Api;
  8. /**
  9. * Interface for managing customer groups.
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface GroupManagementInterface
  14. {
  15. /**
  16. * Check if customer group can be deleted.
  17. *
  18. * @param int $id
  19. * @return bool
  20. * @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found
  21. * @throws \Magento\Framework\Exception\LocalizedException
  22. */
  23. public function isReadonly($id);
  24. /**
  25. * Get default customer group.
  26. *
  27. * @param int $storeId
  28. * @return \Magento\Customer\Api\Data\GroupInterface
  29. * @throws \Magento\Framework\Exception\NoSuchEntityException
  30. * @throws \Magento\Framework\Exception\LocalizedException
  31. */
  32. public function getDefaultGroup($storeId = null);
  33. /**
  34. * Get customer group representing customers not logged in.
  35. *
  36. * @return \Magento\Customer\Api\Data\GroupInterface
  37. * @throws \Magento\Framework\Exception\NoSuchEntityException
  38. * @throws \Magento\Framework\Exception\LocalizedException
  39. */
  40. public function getNotLoggedInGroup();
  41. /**
  42. * Get all customer groups except group representing customers not logged in.
  43. *
  44. * @return \Magento\Customer\Api\Data\GroupInterface[]
  45. * @throws \Magento\Framework\Exception\LocalizedException
  46. */
  47. public function getLoggedInGroups();
  48. /**
  49. * Get customer group representing all customers.
  50. *
  51. * @return \Magento\Customer\Api\Data\GroupInterface
  52. * @throws \Magento\Framework\Exception\LocalizedException
  53. */
  54. public function getAllCustomersGroup();
  55. }