private function prepareDetailsForAPI(array $details)
    {
        foreach ($details as $key => &$detailValues) {
            if (is_array($detailValues)) {
                $this->prepareDetailsForAPI($detailValues);
            }

            if ('contactSource_id' === $key) {
                // Don't include this as it should be included in parent as contactId
                unset($details[$key]);
                continue;
            }

            if (strstr($key, '_')) {
                $newKey           = lcfirst(str_replace('_', '', ucwords($key, '_')));
                $details[$newKey] = $details[$key];
                unset($details[$key]);
            }
        }

        return $details;
    }
private function prepareDetailsForAPI(array $details)
    {
        foreach ($details as $key => &$detailValues) {
            if (is_array($detailValues)) {
                $this->prepareDetailsForAPI($detailValues);
            }

            if ('contactSource_id' === $key) {
                // Don't include this as it should be included in parent as contactId
                unset($details[$key]);
                continue;
            }

            if (strstr($key, '_')) {
                $newKey           = lcfirst(str_replace('_', '', ucwords($key, '_')));
                $details[$newKey] = $details[$key];
                unset($details[$key]);
            }
        }

        return $details;
    }
private function prepareDetailsForAPI ( array $ details ) { foreach ( $ details as $ key => & $ detailValues ) { if ( is_array ( $ detailValues ) ) { $ this -> prepareDetailsForAPI ( $ detailValues ) ; } if ( 'contactSource_id' === $ key ) { // Don't include this as it should be included in parent as contactId unset ( $ details [ $ key ] ) ; continue ; } if ( strstr ( $ key , '_' ) ) { $ newKey = lcfirst ( str_replace ( '_' , '' , ucwords ( $ key , '_' ) ) ) ; $ details [ $ newKey ] = $ details [ $ key ] ; unset ( $ details [ $ key ] ) ; } } return $ details ; }
Convert all snake case keys o camel case for API congruency.

@param array $details

@return array
Convert all snake case keys o camel case for API congruency .