public function testGetPlatformAccount() { $client = new NextCallerPlatformClient(null, null, true); $data = $client->getPlatformAccount(self::PLATFORM_ACCOUNT_ID); $this->assertTrue(!empty($data)); }
<?php require __DIR__ . '/vendor/autoload.php'; use NextCaller\NextCallerPlatformClient; $user = ""; $password = ""; $accountId = 'user1'; $sandbox = true; $client = new NextCallerPlatformClient($user, $password, $sandbox); try { $platformUser = $client->getPlatformAccount($accountId); /* array( 'username' => 'user1', 'first_name' => 'user1_fname', 'last_name' => 'user1_lname', 'company_name' => 'company1_name', 'email' => '*****@*****.**', 'number_of_operations' => '15', 'total_operations' => array('2014 - 11' => '15'), 'billed_operations' => array('2014 - 11' => '15'), 'resource_uri' => '/v2/platform_users/user1/' ); */ var_dump($platformUser); } catch (\NextCaller\Exception\RateLimitException $e) { var_dump($e->getRateLimit()); var_dump($e->getResetTime()); } catch (\NextCaller\Exception\BadResponseException $e) { // Example // 558