Skip to content

Commit

Permalink
changed apiId, message position in constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixon Samuel committed Jul 5, 2018
1 parent 36c59ef commit 6de145e
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Plivo/Resources/Call/CallRecording.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class CallRecording extends ResponseUpdate
* @param string $url
* @param string $recordingId
*/
public function __construct($url, $message, $recordingId, $apiID)
public function __construct($url, $apiID, $recordingId, $message)
{
parent::__construct($message, $apiID);
parent::__construct($apiID, $message);

$this->url = $url;
$this->recordingId = $recordingId;
Expand Down
5 changes: 3 additions & 2 deletions src/Plivo/Resources/Conference/ConferenceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,11 @@ public function startRecording($conferenceName, $optionalArgs = [])
$responseContents = $response->getContent();

return new ConferenceRecording(
$responseContents['api_id'],
$responseContents['message'],
$responseContents['url'],
$responseContents['recording_id'],
$responseContents['api_id']);
$responseContents['url']
);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Plivo/Resources/Conference/ConferenceRecording.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class ConferenceRecording extends ResponseUpdate
* @param $url
* @param $recordingId
*/
public function __construct($message, $url, $recordingId, $apiID)
public function __construct($apiId, $message, $recordingId, $url)
{
parent::__construct($message, $apiID);
parent::__construct($apiId, $message);

$this->url = $url;
$this->recordingId = $recordingId;
Expand Down
4 changes: 2 additions & 2 deletions src/Plivo/Resources/Endpoint/EndpointCreateReponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class EndpointCreateReponse extends ResponseUpdate
* @param string $alias
* @param string $endpointId
*/
public function __construct($message, $username, $alias, $endpointId, $apiID)
public function __construct($username, $alias, $message, $endpointId, $apiID)
{
parent::__construct($message, $apiID);
parent::__construct($apiID, $message);
$this->username = $username;
$this->alias = $alias;
$this->endpointId = $endpointId;
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Resources/Endpoint/EndpointInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public function create($username, $password, $alias, $appId = null)
$responseContents = $response->getContent();

return new EndpointCreateReponse(
$responseContents['message'],
$responseContents['username'],
$responseContents['alias'],
$responseContents['message'],
$responseContents['endpoint_id'],
$responseContents['api_id']);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Plivo/Resources/Message/MessageCreateResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class MessageCreateResponse extends ResponseUpdate
* @param $message
* @param array $messageUuid
*/
public function __construct($message, $apiID, array $messageUuid)
public function __construct($message, array $messageUuid, $apiId)
{
parent::__construct($message, $apiID);
parent::__construct($apiId, $message);
$this->messageUuid = $messageUuid;
}

Expand Down
5 changes: 3 additions & 2 deletions src/Plivo/Resources/Message/MessageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ public function create($src, array $dst, $text,
$responseContents = $response->getContent();

return new MessageCreateResponse(
$responseContents['api_id'],
$responseContents['message'],
$responseContents['message_uuid']);
$responseContents['message_uuid'],
$responseContents['api_id']
);
}

}
4 changes: 2 additions & 2 deletions src/Plivo/Resources/PhoneNumber/PhoneNumberBuyResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class PhoneNumberBuyResponse extends ResponseUpdate
* @param $numberStatus
* @param $status
*/
public function __construct($message, $apiID, $number, $numberStatus, $status)
public function __construct($apiID, $message, $number, $numberStatus, $status)
{
parent::__construct($message, $apiID);
parent::__construct($apiID, $message);

$this->number = $number;
$this->numberStatus = $numberStatus;
Expand Down

0 comments on commit 6de145e

Please sign in to comment.