<?php

namespace inpost_shipping\Model\Expander;

class InpostDeliveryServiceExpander
{
    /**
     * @param array $request
     *
     * @return array
     */
    public function transformRequest(array $request): array
    {
        if (!isset($request['cod'])) {
            $request['cod'] = 0;
        }

        if (!isset($request['weekendDelivery'])) {
            $request['weekendDelivery'] = 0;
        }

        if (!isset($request['sizeTemplate'])) {
            $request['sizeTemplate'] = '';
        }

        if (!isset($request['useProductDimensions'])) {
            $request['useProductDimensions'] = 0;
        }

        return $request;
    }
}