SalesChannelInterface.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\InventorySalesApi\Api\Data;
  8. /**
  9. * Represents sales channels (which are a linkage between stocks and websites, customer groups, etc.)
  10. *
  11. * Used fully qualified namespaces in annotations for proper work of WebApi request parser
  12. *
  13. * @api
  14. */
  15. interface SalesChannelInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  16. {
  17. /**
  18. * Constants for keys of data array. Identical to the name of the getter in snake case
  19. */
  20. const TYPE = 'type';
  21. const CODE = 'code';
  22. /**#@-*/
  23. /**
  24. * Default sales channel type
  25. */
  26. const TYPE_WEBSITE = 'website';
  27. /**
  28. * Get sales channel type
  29. *
  30. * @return string|null
  31. */
  32. public function getType(): ?string;
  33. /**
  34. * Set sales channel type
  35. *
  36. * @param string $type
  37. * @return void
  38. */
  39. public function setType(string $type): void;
  40. /**
  41. * Get sales channel code
  42. *
  43. * @return string|null
  44. */
  45. public function getCode(): ?string;
  46. /**
  47. * Set sales channel code
  48. *
  49. * @param string $code
  50. * @return void
  51. */
  52. public function setCode(string $code): void;
  53. /**
  54. * Retrieve existing extension attributes object
  55. *
  56. * @return \Magento\InventorySalesApi\Api\Data\SalesChannelExtensionInterface|null
  57. */
  58. public function getExtensionAttributes(): ?\Magento\InventorySalesApi\Api\Data\SalesChannelExtensionInterface;
  59. /**
  60. * Set an extension attributes object
  61. *
  62. * @param \Magento\InventorySalesApi\Api\Data\SalesChannelExtensionInterface $extensionAttributes
  63. * @return void
  64. */
  65. public function setExtensionAttributes(
  66. \Magento\InventorySalesApi\Api\Data\SalesChannelExtensionInterface $extensionAttributes
  67. ): void;
  68. }