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