diff --git a/src/MessageBird/Client.php b/src/MessageBird/Client.php index 91aff4cc..5f97416d 100644 --- a/src/MessageBird/Client.php +++ b/src/MessageBird/Client.php @@ -12,7 +12,7 @@ class Client const ENDPOINT = 'https://rest.messagebird.com'; const CHATAPI_ENDPOINT = 'https://chat.messagebird.com/1'; - const CLIENT_VERSION = '1.6.5'; + const CLIENT_VERSION = '1.6.6'; /** * @var string diff --git a/src/MessageBird/Objects/VoiceMessage.php b/src/MessageBird/Objects/VoiceMessage.php index 7381ebbb..bb72c7ff 100644 --- a/src/MessageBird/Objects/VoiceMessage.php +++ b/src/MessageBird/Objects/VoiceMessage.php @@ -81,6 +81,14 @@ class VoiceMessage extends Base */ public $ifMachine = 'continue'; + /** + * The time (in milliseconds) to analyze if a machine has picked up the phone. Used in combination with the delay + * and hangup values of the ifMachine attribute. Minimum: 400, maximum: 10000. + * + * @var int + */ + public $machineTimeout = 7000; + /** * The scheduled date and time of the message in RFC3339 format (Y-m-d\TH:i:sP) * diff --git a/tests/integration/voicemessages/VoiceMessagesTest.php b/tests/integration/voicemessages/VoiceMessagesTest.php index e4f3bb31..c9d858f7 100644 --- a/tests/integration/voicemessages/VoiceMessagesTest.php +++ b/tests/integration/voicemessages/VoiceMessagesTest.php @@ -18,7 +18,7 @@ public function testVoiceMessageCreate() $Message->body = 'This is a test message.'; $Message->language = "nl"; $Message->voice = "male"; - $this->mockClient->expects($this->once())->method('performHttpRequest')->with("POST", 'voicemessages', null, '{"originator":"MessageBird","body":"This is a test message.","reference":null,"language":"nl","voice":"male","repeat":1,"ifMachine":"continue","scheduledDatetime":null,"recipients":[31612345678],"reportUrl":null}'); + $this->mockClient->expects($this->once())->method('performHttpRequest')->with("POST", 'voicemessages', null, '{"originator":"MessageBird","body":"This is a test message.","reference":null,"language":"nl","voice":"male","repeat":1,"ifMachine":"continue","machineTimeout":7000,"scheduledDatetime":null,"recipients":[31612345678],"reportUrl":null}'); $this->client->voicemessages->create($Message); }