/** * init a new call with the given params but specially here, * you can define a set of numbers to be called if the first number * isnt reachable (ie: bNumber = +4930-111111,+4930-222222,+4930-333333) * * @throws Zend_Service_DeveloperGarden_Client_Exception * @param string $aNumber * @param array $bNumber * @param integer $expiration * @param integer $maxDuration * @param integer $maxWait * @param integer $account * @param boolean $privacyA * @param boolean $privacyB * @param string $greeter * @return Zend_Service_DeveloperGarden_Response_VoiceButler_NewCallSequencedResponse */ public function newCallSequenced($aNumber, $bNumber, $expiration, $maxDuration, $maxWait, $account = null, $privacyA = null, $privacyB = null, $greeter = null) { $request = new Zend_Service_DeveloperGarden_Request_VoiceButler_NewCallSequenced($this->getEnvironment()); $request->setANumber($aNumber)->setBNumber($bNumber)->setPrivacyA($privacyA)->setPrivacyB($privacyB)->setExpiration($expiration)->setMaxDuration($maxDuration)->setMaxWait($maxWait)->setGreeter($greeter)->setAccount($account); $result = $this->getSoapClient()->newCallSequenced(array('request' => $request)); return $result->parse(); }
public function testNewCallSequencedRequest() { $request = new Zend_Service_DeveloperGarden_Request_VoiceButler_NewCallSequenced(Zend_Service_DeveloperGarden_VoiceCall_Mock::ENV_SANDBOX); $this->assertEquals(Zend_Service_DeveloperGarden_VoiceCall_Mock::ENV_SANDBOX, $request->getEnvironment()); $this->assertInstanceOf('Zend_Service_DeveloperGarden_Request_VoiceButler_NewCallSequenced', $request->setBNumber(array('+49-654321', '+49-123456'))); $this->assertEquals(array('+49-654321', '+49-123456'), $request->getBNumber()); $this->assertEquals(2, count($request->getBNumber())); $this->assertArrayHasKey(0, array('+49-654321', '+49-123456')); $this->assertArrayHasKey(1, array('+49-654321', '+49-123456')); $this->assertInstanceOf('Zend_Service_DeveloperGarden_Request_VoiceButler_NewCallSequenced', $request->setMaxWait(9)); $this->assertEquals(9, $request->getMaxWait()); }