ShippingAssignmentInterface.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Api\Data;
  7. use Magento\Framework\Api\ExtensibleDataInterface;
  8. /**
  9. * Interface ShippingAssignmentInterface
  10. * @api
  11. * @since 100.0.4
  12. */
  13. interface ShippingAssignmentInterface extends ExtensibleDataInterface
  14. {
  15. /**#@+
  16. * Shipping assignment object data keys
  17. */
  18. const KEY_SHIPPING = 'shipping';
  19. const KEY_ITEMS = 'items';
  20. const KEY_STOCK_ID = 'stock_id';
  21. /**#@-*/
  22. /**
  23. * Gets shipping object
  24. *
  25. * @return \Magento\Sales\Api\Data\ShippingInterface
  26. * @since 100.0.4
  27. */
  28. public function getShipping();
  29. /**
  30. * Gets order items of shipping assignment
  31. *
  32. * @return \Magento\Sales\Api\Data\OrderItemInterface[]
  33. * @since 100.0.4
  34. */
  35. public function getItems();
  36. /**
  37. * Gets stock id
  38. *
  39. * @return int|null
  40. * @since 100.0.4
  41. */
  42. public function getStockId();
  43. /**
  44. * Sets shipping
  45. *
  46. * @param \Magento\Sales\Api\Data\ShippingInterface $shipping
  47. * @return $this
  48. * @since 100.0.4
  49. */
  50. public function setShipping(\Magento\Sales\Api\Data\ShippingInterface $shipping);
  51. /**
  52. * Sets order items to shipping assignment
  53. *
  54. * @param \Magento\Sales\Api\Data\OrderItemInterface[] $items
  55. * @return $this
  56. * @since 100.0.4
  57. */
  58. public function setItems(array $items);
  59. /**
  60. * Sets stock id
  61. *
  62. * @param int|null $stockId
  63. * @return $this
  64. * @since 100.0.4
  65. */
  66. public function setStockId($stockId = null);
  67. /**
  68. * Retrieve existing extension attributes object or create a new one.
  69. *
  70. * @return \Magento\Sales\Api\Data\ShippingAssignmentExtensionInterface|null
  71. * @since 100.0.4
  72. */
  73. public function getExtensionAttributes();
  74. /**
  75. * Set an extension attributes object.
  76. *
  77. * @param \Magento\Sales\Api\Data\ShippingAssignmentExtensionInterface $extensionAttributes
  78. * @return $this
  79. * @since 100.0.4
  80. */
  81. public function setExtensionAttributes(
  82. \Magento\Sales\Api\Data\ShippingAssignmentExtensionInterface $extensionAttributes
  83. );
  84. }