diff --git a/src/Plivo/Resources/Message/MessageInterface.php b/src/Plivo/Resources/Message/MessageInterface.php index 6660b2f6..fc695274 100644 --- a/src/Plivo/Resources/Message/MessageInterface.php +++ b/src/Plivo/Resources/Message/MessageInterface.php @@ -55,8 +55,8 @@ public function get($messageUuid) $this->pathParams['authId'], $this->uri); } - - + + /** * Return a list of messages @@ -147,7 +147,7 @@ protected function getList($optionalArgs = []) * @throws PlivoValidationException,PlivoResponseException */ - public function create($src, array $dst, $text=null, + public function create($src, array $dst, $text, array $optionalArgs = [], $powerpackUUID = null) { $mandatoryArgs = [ @@ -173,11 +173,11 @@ public function create($src, array $dst, $text=null, $response = $this->client->update( $this->uri, - array_merge($mandatoryArgs, $optionalArgs, ['src' => $src, 'powerpack_uuid' => $powerpackUUID]) + array_merge($mandatoryArgs, $optionalArgs, ['src' => $src, 'powerpack_uuid' => $powerpackUUID, 'text' => $text]) ); $responseContents = $response->getContent(); - + if(!array_key_exists("error",$responseContents)){ if(array_key_exists("invalid_number", $responseContents)){ return new MessageCreateResponse( @@ -209,4 +209,4 @@ public function create($src, array $dst, $text=null, } } -} \ No newline at end of file +}