Total Complexity | 2 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
30 | class InventoryCreateRequestEntity extends RequestEntity |
||
31 | { |
||
32 | const UNDERSCORE_ON_SERIALIZATION = false; |
||
33 | |||
34 | /** |
||
35 | * Subscription external id. |
||
36 | * Required for all requests. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $externalId; |
||
41 | |||
42 | /** |
||
43 | * Target product SKU |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $sku; |
||
48 | |||
49 | /** |
||
50 | * Initial qty of a product. |
||
51 | * Only first request will actually create an inventory record on payever side. |
||
52 | * All further create requests will be ignored. |
||
53 | * |
||
54 | * @var int |
||
55 | */ |
||
56 | protected $stock; |
||
57 | |||
58 | /** |
||
59 | * @param string $sku |
||
60 | * @return static |
||
61 | */ |
||
62 | public function setSku($sku) |
||
63 | { |
||
64 | $this->sku = (string) $sku; |
||
65 | |||
66 | return $this; |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * @return array |
||
71 | */ |
||
72 | public function getRequired() |
||
78 | ); |
||
79 | } |
||
81 |