public static function getReceivedMessages($perPage,$pageNumber,$formDate,$toDate)
	{
		$client = new Client();
		$result = $client->get("http://restfulsms.com/api/ReceiveMessage?Shamsi_FromDate={$formDate}&Shamsi_ToDate={$toDate}&RowsPerPage={$perPage}&RequestedPageNumber={$pageNumber}",['headers'=>['x-sms-ir-secure-token'=>self::getToken()],'connect_timeout'=>30]);

		return json_decode($result->getBody()->getContents())->Messages;
	}
public static function getReceivedMessages($perPage,$pageNumber,$formDate,$toDate)
	{
		$client = new Client();
		$result = $client->get("http://restfulsms.com/api/ReceiveMessage?Shamsi_FromDate={$formDate}&Shamsi_ToDate={$toDate}&RowsPerPage={$perPage}&RequestedPageNumber={$pageNumber}",['headers'=>['x-sms-ir-secure-token'=>self::getToken()],'connect_timeout'=>30]);

		return json_decode($result->getBody()->getContents())->Messages;
	}
public static function getReceivedMessages ( $ perPage , $ pageNumber , $ formDate , $ toDate ) { $ client = new Client ( ) ; $ result = $ client -> get ( "http://restfulsms.com/api/ReceiveMessage?Shamsi_FromDate={$formDate}&Shamsi_ToDate={$toDate}&RowsPerPage={$perPage}&RequestedPageNumber={$pageNumber}" , [ 'headers' => [ 'x-sms-ir-secure-token' => self :: getToken ( ) ] , 'connect_timeout' => 30 ] ) ; return json_decode ( $ result -> getBody ( ) -> getContents ( ) ) -> Messages ; }
this method used for fetch received messages

@param $perPage
@param $pageNumber
@param $formDate
@param $toDate

@return mixed
this method used for fetch received messages