<?php require __DIR__ . '/vendor/autoload.php'; use NextCaller\NextCallerPlatformClient; $user = ""; $password = ""; $phoneNumber = "6925558386"; $accountId = 'user1'; $sandbox = true; $client = new NextCallerPlatformClient($user, $password, $sandbox); try { $records = $client->getByPhone($phoneNumber, $accountId); /* array( 'records' => array( array( 'id' => 'e79ba4dab9cdd3da41c95ef734ec5b', 'first_name' => 'Miguel', 'middle_name' => '', 'last_name' => 'Meneses', 'name' => 'Miguel Meneses', 'language' => 'English', 'phone' => array( array( 'number' => '6925558386', 'resource_uri' => '/v2/records/6925558386/' ) ), 'carrier' => 'AT & T', 'address' => array( array(
public function testGetByPhone() { $client = new NextCallerPlatformClient(null, null, true); $profiles = $client->getByPhone(self::PROFILE_PHONE, self::PLATFORM_ACCOUNT_ID); $this->assertEquals($profiles, json_decode(self::JSON_RESPONSE, true)); }