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