public function testUpdatePlatformAccount() { $client = new NextCallerPlatformClient(null, null, true); $data = json_decode(self::DATA); $result = $client->updatePlatformAccount(self::PLATFORM_ACCOUNT_ID, $data); $this->assertEquals($result, self::RESPONSE_STR); }
<?php require __DIR__ . '/vendor/autoload.php'; use NextCaller\NextCallerPlatformClient; $user = ""; $password = ""; $accountId = 'user1'; $sandbox = true; $data = array('email' => 'xxx'); $client = new NextCallerPlatformClient($user, $password, $sandbox); try { $client->updatePlatformAccount($accountId, $data); } 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') ) ); */