<commit_before><?php
/*
 * MagicTelecomAPILib
 *
 * This file was automatically generated by APIMATIC BETA v2.0 on 01/05/2016
 */

namespace MagicTelecomAPILib\Controllers;

use MagicTelecomAPILib\APIException;
use MagicTelecomAPILib\APIHelper;
use MagicTelecomAPILib\Configuration;
use MagicTelecomAPILib\CustomAuthUtility;
use Unirest\Unirest;
class CallerLocationsController {
    /**
     * Allow clients to get the list of caller locations for the specific account.
     * @param  string     $accountNumber      Required parameter: Number of the account
     * @return mixed response from the API call*/
    public function getCallerLocations (
                $accountNumber) 
    {
        //the base uri for api requests
        $queryBuilder = Configuration::$BASEURI;
        
        //prepare query string for API call
        $queryBuilder = $queryBuilder.'/accounts/{account_number}/caller_locations';

        //process optional query parameters
        APIHelper::appendUrlWithTemplateParameters($queryBuilder, array (
            'account_number' => $accountNumber,
            ));

        //validate and preprocess url
        $queryUrl = APIHelper::cleanUrl($queryBuilder);

        //prepare headers
        $headers = array (
            'user-agent'    => 'APIMATIC 2.0',
            'Accept'        => 'application/json'
        );

        //prepare API request
        $request = Unirest::get($queryUrl, $headers);

        //append custom auth authorization headers
        CustomAuthUtility::appendCustomAuthParams($request);

        //and invoke the API call request to fetch the response
        $response = Unirest::getResponse($request);

        //Error handling using HTTP status codes
        if ($response->code == 401) {
            throw new APIException('You are not authenticated', 401);
        }

        else if ($response->code == 403) {
            throw new APIException('This action needs a valid WSSE header', 403);
        }

        else if ($response->code == 404) {
            throw new APIException('Resource not found', 404);
        }

        else if (($response->code < 200) || ($response->code > 206)) { //[200,206] = HTTP OK
            throw new APIException("HTTP Response Not OK", $response->code);
        }

        return $response->body;
    }
        
    /**
     * Create a new caller location
     * @param  string             $accountNumber       Required parameter: Number of the account
     * @param  CallerLocation     $callerLocation      Required parameter: Caller Location Data
     * @return void response from the API call*/
    public function createCallerLocations (
                $accountNumber,
                $callerLocation) 
    {
        //the base uri for api requests
        $queryBuilder = Configuration::$BASEURI;
        
        //prepare query string for API call
        $queryBuilder = $queryBuilder.'/accounts/{account_number}/caller_locations';

        //process optional query parameters
        APIHelper::appendUrlWithTemplateParameters($queryBuilder, array (
            'account_number'  => $accountNumber,
            ));

        //validate and preprocess url
        $queryUrl = APIHelper::cleanUrl($queryBuilder);

        //prepare headers
        $headers = array (
            'user-agent'    => 'APIMATIC 2.0'
        );

        //prepare parameters
        $parameters = array (
            'caller_location' => json_encode($callerLocation)
        );

        //prepare API request
        $request = Unirest::post($queryUrl, $headers, $parameters);

        //append custom auth authorization headers
        CustomAuthUtility::appendCustomAuthParams($request);

        //and invoke the API call request to fetch the response
        $response = Unirest::getResponse($request);

        //Error handling using HTTP status codes
        if ($response->code == 401) {
            throw new APIException('You are not authenticated', 401);
        }

        else if ($response->code == 403) {
            throw new APIException('This action needs a valid WSSE header', 403);
        }

        else if ($response->code == 404) {
            throw new APIException('Resource not found', 404);
        }

        else if (($response->code < 200) || ($response->code > 206)) { //[200,206] = HTTP OK
            throw new APIException("HTTP Response Not OK", $response->code);
        }
    }
        
}<commit_msg>Updating caller controller post<commit_after><?php
/*
 * MagicTelecomAPILib
 *
 * This file was automatically generated by APIMATIC BETA v2.0 on 01/06/2016
 */

namespace MagicTelecomAPILib\Controllers;

use MagicTelecomAPILib\APIException;
use MagicTelecomAPILib\APIHelper;
use MagicTelecomAPILib\Configuration;
use MagicTelecomAPILib\CustomAuthUtility;
use Unirest\Unirest;
class CallerLocationsController {
    /**
     * Allow clients to get the list of caller locations for the specific account.
     * @param  string     $accountNumber      Required parameter: Number of the account
     * @return mixed response from the API call*/
    public function getCallerLocations (
                $accountNumber) 
    {
        //the base uri for api requests
        $queryBuilder = Configuration::$BASEURI;
        
        //prepare query string for API call
        $queryBuilder = $queryBuilder.'/accounts/{account_number}/caller_locations';

        //process optional query parameters
        APIHelper::appendUrlWithTemplateParameters($queryBuilder, array (
            'account_number' => $accountNumber,
            ));

        //validate and preprocess url
        $queryUrl = APIHelper::cleanUrl($queryBuilder);

        //prepare headers
        $headers = array (
            'user-agent'    => 'APIMATIC 2.0',
            'Accept'        => 'application/json'
        );

        //prepare API request
        $request = Unirest::get($queryUrl, $headers);

        //append custom auth authorization headers
        CustomAuthUtility::appendCustomAuthParams($request);

        //and invoke the API call request to fetch the response
        $response = Unirest::getResponse($request);

        //Error handling using HTTP status codes
        if ($response->code == 401) {
            throw new APIException('You are not authenticated', 401, $response->body);
        }

        else if ($response->code == 403) {
            throw new APIException('This action needs a valid WSSE header', 403, $response->body);
        }

        else if ($response->code == 404) {
            throw new APIException('Resource not found', 404, $response->body);
        }

        else if (($response->code < 200) || ($response->code > 206)) { //[200,206] = HTTP OK
            throw new APIException("HTTP Response Not OK", $response->code, $response->body);
        }

        return $response->body;
    }
        
    /**
     * Create a new caller location
     * @param  string             $accountNumber       Required parameter: Number of the account
     * @param  CallerLocation     $callerLocation      Required parameter: Caller Location Data
     * @return mixed response from the API call*/
    public function createCallerLocations (
                $accountNumber,
                $callerLocation) 
    {
        //the base uri for api requests
        $queryBuilder = Configuration::$BASEURI;
        
        //prepare query string for API call
        $queryBuilder = $queryBuilder.'/accounts/{account_number}/caller_locations';

        //process optional query parameters
        APIHelper::appendUrlWithTemplateParameters($queryBuilder, array (
            'account_number'  => $accountNumber,
            ));

        //validate and preprocess url
        $queryUrl = APIHelper::cleanUrl($queryBuilder);

        //prepare headers
        $headers = array (
            'user-agent'    => 'APIMATIC 2.0',
            'Accept'        => 'application/json',
            'content-type'  => 'application/json; charset=utf-8'
        );

        //prepare API request
        $request = Unirest::post($queryUrl, $headers, json_encode($callerLocation));

        //append custom auth authorization headers
        CustomAuthUtility::appendCustomAuthParams($request);

        //and invoke the API call request to fetch the response
        $response = Unirest::getResponse($request);

        //Error handling using HTTP status codes
        if ($response->code == 401) {
            throw new APIException('You are not authenticated', 401, $response->body);
        }

        else if ($response->code == 403) {
            throw new APIException('This action needs a valid WSSE header', 403, $response->body);
        }

        else if ($response->code == 404) {
            throw new APIException('Resource not found', 404, $response->body);
        }

        else if (($response->code < 200) || ($response->code > 206)) { //[200,206] = HTTP OK
            throw new APIException("HTTP Response Not OK", $response->code, $response->body);
        }

        return $response->body;
    }
        
}
{'fraction_non_alphanumeric': 0.10339114105821275, 'fraction_numerical': 0.016458632497514634, 'mean_word_length': 2.256834532374101, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2757873', 'n_tokens_mistral': 2439, 'n_tokens_neox': 2252, 'n_words': 690}