src/Sms.php
public function createMessage($sender='',$mobile='', $message='', $scheduledate='')
    {
        $url = $this->_setEnvironment.'wcf/Service.svc/rest/CreateMessage';

        $json = array(
            'UserName'      => $this->user,
            'Password'      => $this->password,
            'Sender'        => $sender,
            'Mobile'        => $mobile,
            'Text'          => $message,
            'ScheduleDate'  => $scheduledate,
        );

        try {
            $response = $this->client->post($url,[
                    'headers' => [ 'Content-Type' => 'application/json','Accept' => 'application/json' ],
                    'body' => json_encode($json)
                ]
            );

            $result = json_decode($response->getBody()->getContents(), true);
            $result['Status'] = $response->getStatusCode();
            $result =json_decode(json_encode($result));

        } catch (RequestException $e) {
            $result = $this->StatusCodeHandling($e);
        }

        return $result;
    }
public function createMessage($sender='',$mobile='', $message='', $scheduledate='')
    {
        $url = $this->_setEnvironment.'wcf/Service.svc/rest/CreateMessage';

        $json = array(
            'UserName'      => $this->user,
            'Password'      => $this->password,
            'Sender'        => $sender,
            'Mobile'        => $mobile,
            'Text'          => $message,
            'ScheduleDate'  => $scheduledate,
        );

        try {
            $response = $this->client->post($url,[
                    'headers' => [ 'Content-Type' => 'application/json','Accept' => 'application/json' ],
                    'body' => json_encode($json)
                ]
            );

            $result = json_decode($response->getBody()->getContents(), true);
            $result['Status'] = $response->getStatusCode();
            $result =json_decode(json_encode($result));

        } catch (RequestException $e) {
            $result = $this->StatusCodeHandling($e);
        }

        return $result;
    }
public function createMessage ( $ sender = '' , $ mobile = '' , $ message = '' , $ scheduledate = '' ) { $ url = $ this -> _setEnvironment . 'wcf/Service.svc/rest/CreateMessage' ; $ json = array ( 'UserName' => $ this -> user , 'Password' => $ this -> password , 'Sender' => $ sender , 'Mobile' => $ mobile , 'Text' => $ message , 'ScheduleDate' => $ scheduledate , ) ; try { $ response = $ this -> client -> post ( $ url , [ 'headers' => [ 'Content-Type' => 'application/json' , 'Accept' => 'application/json' ] , 'body' => json_encode ( $ json ) ] ) ; $ result = json_decode ( $ response -> getBody ( ) -> getContents ( ) , true ) ; $ result [ 'Status' ] = $ response -> getStatusCode ( ) ; $ result = json_decode ( json_encode ( $ result ) ) ; } catch ( RequestException $ e ) { $ result = $ this -> StatusCodeHandling ( $ e ) ; } return $ result ; }
This operation allows you to send 1 message on a single call.

@param string $sender Message sender. If informed, it must be a maximum of 11 characters. If not reported, the API will use the user-defined sender.
@param string $mobile Recipient of the message. Information is available in international (+34699999999,003469999999999,34699999999) or national (699999999) formats. It is recommended to use the international format 0034699999999.
@param string $message Message text. If the text length is greater than the character limit per SMS (160 for GSM-7 coded text messages, and 70 for Unicode coded messages)
@param string $scheduledate Optional. Date and time when you want the message to be delivered at destination.
@return object
This operation allows you to send 1 message on a single call .