<?php

namespace Alsendo\AlsendoWrapper\Api\Zaslat\Model\Order\Valuation;

use Alsendo\AlsendoWrapper\Json;
use Alsendo\AlsendoWrapper\Model\Order\Valuation\OrderValuation;
use Alsendo\AlsendoWrapper\Model\Order\Valuation\PriceTableItem;

class ZaslatOrderValuation extends OrderValuation
{
    public static function getPropertyTypeMap(): array
    {
        return [
            'service_id' => ['mappedTo' => 'serviceId'],
            'pickup_date' => ['mappedTo' => 'pickupDate', 'convert' => Json::DATE_TIME],
            'delivery_date' => ['mappedTo' => 'deliveryDate', 'convert' => Json::DATE_TIME],
            'priceTable' => ['mappedTo' => 'priceTable', 'type' => PriceTableItem::class, 'mapFields' => [
                'price' => 'price',
                'priceGross' => 'priceGross',
                'currency' => 'currency'
            ]],
        ];
    }
}