public function getSubmitParams($params) {

    $submitParams = array();
    foreach ($this->paramFields as $k => $mandatory) {
      if (isset($params[$k]) && strlen($params[$k]) > 0) {
        $submitParams[$k] = $params[$k];
      }
      elseif ((!isset($params[$k]) || strlen($params[$k]) == 0) && $mandatory) {
        throw new \Exception('mandatory field ' . $k . ' is unset or empty');
      }
    }

    return $submitParams;
  }
public function getSubmitParams($params) {

    $submitParams = array();
    foreach ($this->paramFields as $k => $mandatory) {
      if (isset($params[$k]) && strlen($params[$k]) > 0) {
        $submitParams[$k] = $params[$k];
      }
      elseif ((!isset($params[$k]) || strlen($params[$k]) == 0) && $mandatory) {
        throw new \Exception('mandatory field ' . $k . ' is unset or empty');
      }
    }

    return $submitParams;
  }
public function getSubmitParams ( $ params ) { $ submitParams = array ( ) ; foreach ( $ this -> paramFields as $ k => $ mandatory ) { if ( isset ( $ params [ $ k ] ) && strlen ( $ params [ $ k ] ) > 0 ) { $ submitParams [ $ k ] = $ params [ $ k ] ; } elseif ( ( ! isset ( $ params [ $ k ] ) || strlen ( $ params [ $ k ] ) == 0 ) && $ mandatory ) { throw new \ Exception ( 'mandatory field ' . $ k . ' is unset or empty' ) ; } } return $ submitParams ; }
Returns all API call param fields in the correct order.
Complains if a mandatory field is not present or empty.

@param mixed[] $params
@return mixed[] $submitParams
@throws \Exception if one of the mandatory fields is not set
Returns all API call param fields in the correct order . Complains if a mandatory field is not present or empty .