|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* MIT License |
|
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\ArvatoRss\Business\Api\Converter; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\ArvatoRssStoreOrderRequestTransfer; |
|
|
|
|
|
|
11
|
|
|
use SprykerEco\Zed\ArvatoRss\Business\Api\ArvatoRssRequestApiConfig; |
|
12
|
|
|
|
|
13
|
|
|
class StoreOrderRequestConverter implements StoreOrderRequestConverterInterface |
|
14
|
|
|
{ |
|
15
|
|
|
/** |
|
16
|
|
|
* @param \Generated\Shared\Transfer\ArvatoRssStoreOrderRequestTransfer $arvatoRssStoreOrderRequestTransfer |
|
17
|
|
|
* |
|
18
|
|
|
* @return array |
|
19
|
|
|
*/ |
|
20
|
|
|
public function convert(ArvatoRssStoreOrderRequestTransfer $arvatoRssStoreOrderRequestTransfer) |
|
21
|
|
|
{ |
|
22
|
|
|
return $this->convertOrder($arvatoRssStoreOrderRequestTransfer); |
|
23
|
|
|
} |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* @param \Generated\Shared\Transfer\ArvatoRssStoreOrderRequestTransfer $arvatoRssStoreOrderRequestTransfer |
|
27
|
|
|
* |
|
28
|
|
|
* @return array |
|
29
|
|
|
*/ |
|
30
|
|
|
protected function convertOrder(ArvatoRssStoreOrderRequestTransfer $arvatoRssStoreOrderRequestTransfer) |
|
31
|
|
|
{ |
|
32
|
|
|
$result = []; |
|
33
|
|
|
$order = $arvatoRssStoreOrderRequestTransfer->getOrder(); |
|
34
|
|
|
|
|
35
|
|
|
$result[ArvatoRssRequestApiConfig::ARVATORSS_API_ORDER] = [ |
|
36
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_REGISTEREDORDER => $order->getRegisteredOrder(), |
|
37
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_ORDER_NUMBER => $order->getOrderNumber(), |
|
38
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_DEBITOR_NUMBER => $order->getDebitorNumber(), |
|
39
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_PAYMENT_TYPE => $order->getPaymentType(), |
|
40
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_CURRENCY => $order->getCurrency(), |
|
41
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_GROSSTOTALBILL => $order->getGrossTotalBill(), |
|
42
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_TOTALORDERVALUE => $order->getTotalOrderValue(), |
|
43
|
|
|
]; |
|
44
|
|
|
$result[ArvatoRssRequestApiConfig::ARVATORSS_API_ORDER][ArvatoRssRequestApiConfig::ARVATORSS_API_ITEM] = []; |
|
45
|
|
|
|
|
46
|
|
|
foreach ($order->getItems() as $item) { |
|
47
|
|
|
$result[ArvatoRssRequestApiConfig::ARVATORSS_API_ORDER][ArvatoRssRequestApiConfig::ARVATORSS_API_ITEM][] = [ |
|
48
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_PRODUCTNUMBER => $item->getProductNumber(), |
|
49
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_PRODUCTGROUPID => $item->getProductGroupId(), |
|
50
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_UNITPRICE => $item->getUnitPrice(), |
|
51
|
|
|
ArvatoRssRequestApiConfig::ARVATORSS_API_UNITCOUNT => $item->getUnitCount(), |
|
52
|
|
|
]; |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
return $result; |
|
56
|
|
|
} |
|
57
|
|
|
} |
|
58
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths