static function processSchema($schema, $params, $helper = NULL) {
    $built    = [];
    $errors   = [];

    (is_null($helper)) ? $helper = ['input' => $params] : $helper['input'] = $params;

    $schema['defaults'] = @$schema['defaults'] ?: [];

    if (isset($helper['override_defaults'])) $schema['defaults'] = array_merge($schema['defaults'], $helper['override_defaults']);

    try {
      foreach ($schema['properties'] as $k => $v) {
        $built = self::addProperty($built, $schema['properties'][$k], $k, @$params[$k], $schema['defaults'], $helper);
      }
    
    } catch (\RoyalMail\Exception\ValidatorException $e) {
      $errors[$k] = $k . ': ' . $e->getMessage(); 

    } catch (\RoyalMail\Exception\RequestException $re) {
      foreach ($re->getErrors() as $k_nested => $v) $errors[$k . ':' . $k_nested] = $v;
    }

    if (! empty($errors)) throw (new \RoyalMail\Exception\RequestException())->withErrors($errors);

    if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION > 5) $built = self::derefArray($built);

    return $built;
  }