private function validatePostData($data)
    {
        $required = ['items', 'currency'];

        foreach ($required as $field) {
            if (!isset($data[$field]) && !is_null($data[$field])) {
                throw new PriceCalculationException($field . ' is required but not set properly');
            }
        }
    }