/** * Number - Buy * Purchase a given inbound number. * * @param string * @param string * return json or xml */ public function get_number_buy($country_code = 'TW', $msisdn = null) { if (!isset($msisdn)) { echo 'msisdn must be required'; exit; } $options = array(CURLOPT_HTTPHEADER => array("Accept: application/" . $this->_format), CURLOPT_POST => TRUE); self::$buy_url = self::$buy_url . '/' . $country_code . '/' . $msisdn; return $this->request('post', self::$buy_url, null, $options); }