SourceCarrierLinkInterface.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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\InventoryApi\Api\Data;
  8. /**
  9. * Represents relation between some physical storage and shipping method
  10. *
  11. * Used fully qualified namespaces in annotations for proper work of WebApi request parser
  12. *
  13. * @api
  14. */
  15. interface SourceCarrierLinkInterface 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 CARRIER_CODE = 'carrier_code';
  21. const POSITION = 'position';
  22. const SOURCE_CODE = 'source_code';
  23. /**#@-*/
  24. /**
  25. * Get carrier code
  26. *
  27. * @return string|null
  28. */
  29. public function getCarrierCode(): ?string;
  30. /**
  31. * Set carrier code
  32. *
  33. * @param string|null $carrierCode
  34. * @return void
  35. */
  36. public function setCarrierCode(?string $carrierCode): void;
  37. /**
  38. * Get position
  39. *
  40. * @return int|null
  41. */
  42. public function getPosition(): ?int;
  43. /**
  44. * Set position
  45. *
  46. * @param int|null $position
  47. * @return void
  48. */
  49. public function setPosition(?int $position): void;
  50. /**
  51. * Retrieve existing extension attributes object
  52. *
  53. * @return \Magento\InventoryApi\Api\Data\SourceCarrierLinkExtensionInterface|null
  54. */
  55. public function getExtensionAttributes(): ?\Magento\InventoryApi\Api\Data\SourceCarrierLinkExtensionInterface;
  56. /**
  57. * Set an extension attributes object
  58. *
  59. * @param \Magento\InventoryApi\Api\Data\SourceCarrierLinkExtensionInterface $extensionAttributes
  60. * @return void
  61. */
  62. public function setExtensionAttributes(
  63. \Magento\InventoryApi\Api\Data\SourceCarrierLinkExtensionInterface $extensionAttributes
  64. ): void;
  65. }