public function requestCode($username, $type = 'sms', $debug = false)
	{
		// Create a instance of Registration class.
		$registration = new Registration($username, $debug);

		switch ($type) {
			case 'sms':
				$registration->codeRequest('sms');
				break;
			case 'voice':
				$registration->codeRequest('voice');
				break;
			default:
				throw new Exception('Invalid registration type');
		}
		return $registration;
	}