| @@ 78-98 (lines=21) @@ | ||
| 75 | return $this->serializer->deserialize(GetICBufferStatusResponse::class, $result); |
|
| 76 | } |
|
| 77 | ||
| 78 | public function getICsFromOrder( |
|
| 79 | Extension $extension, |
|
| 80 | string $token, |
|
| 81 | string $omsId, |
|
| 82 | string $orderId, |
|
| 83 | string $gtin, |
|
| 84 | int $quantity, |
|
| 85 | string $lastBlockId = '0' |
|
| 86 | ): GetICsFromOrderResponse { |
|
| 87 | $url = sprintf('/api/v2/%s/codes', (string)$extension); |
|
| 88 | $result = $this->request($token, 'GET', $url, [ |
|
| 89 | 'omsId' => $omsId, |
|
| 90 | 'orderId' => $orderId, |
|
| 91 | 'gtin' => $gtin, |
|
| 92 | 'quantity' => $quantity, |
|
| 93 | 'lastBlockId' => $lastBlockId, |
|
| 94 | ]); |
|
| 95 | ||
| 96 | /* @noinspection PhpIncompatibleReturnTypeInspection */ |
|
| 97 | return $this->serializer->deserialize(GetICsFromOrderResponse::class, $result); |
|
| 98 | } |
|
| 99 | ||
| 100 | public function closeICArray( |
|
| 101 | Extension $extension, |
|
| @@ 100-118 (lines=19) @@ | ||
| 97 | return $this->serializer->deserialize(GetICsFromOrderResponse::class, $result); |
|
| 98 | } |
|
| 99 | ||
| 100 | public function closeICArray( |
|
| 101 | Extension $extension, |
|
| 102 | string $token, |
|
| 103 | string $omsId, |
|
| 104 | string $orderId, |
|
| 105 | string $gtin, |
|
| 106 | string $lastBlockId |
|
| 107 | ): CloseICArrayResponse { |
|
| 108 | $url = sprintf('/api/v2/%s/buffer/close', (string)$extension); |
|
| 109 | $result = $this->request($token, 'POST', $url, [ |
|
| 110 | 'omsId' => $omsId, |
|
| 111 | 'orderId' => $orderId, |
|
| 112 | 'gtin' => $gtin, |
|
| 113 | 'lastBlockId' => $lastBlockId, |
|
| 114 | ]); |
|
| 115 | ||
| 116 | /* @noinspection PhpIncompatibleReturnTypeInspection */ |
|
| 117 | return $this->serializer->deserialize(CloseICArrayResponse::class, $result); |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|
| 121 | * @throws OmsRequestErrorException |
|