public function testProfileArray()
 {
     $client = new NextCallerPlatformClient(null, null, true);
     $data = json_decode(self::JSON_DATA, true);
     $response = $client->updateByProfileId(self::PROFILE_ID, $data, self::PLATFORM_ACCOUNT_ID);
     $this->assertEquals($response, null);
 }
<?php

require __DIR__ . '/vendor/autoload.php';
use NextCaller\NextCallerPlatformClient;
$user = "";
$password = "";
$id = "c7c17736128033c92771b7f33fead7";
$sandbox = true;
$data = array("email" => 'xxx');
$accountId = 'user1';
$client = new NextCallerPlatformClient($user, $password, $sandbox);
try {
    $client->updateByProfileId($id, $data, $accountId);
} catch (\NextCaller\Exception\RateLimitException $e) {
    var_dump($e->getRateLimit());
    var_dump($e->getResetTime());
} catch (\NextCaller\Exception\BadResponseException $e) {
    // Example
    // 422
    var_dump($e->getCode());
    // Validation Error
    var_dump($e->getMessage());
    /*
     array(
        'message' => 'Validation Error',
        'code' => '422',
        'type' => 'Unprocessable Entity',
        'description' => array(
            'email' => array('Invalid email address')
        )
    );