Skip to content

Commit f592bc4

Browse files
committed
Add workflow_id support for Verify API
1 parent df1cd77 commit f592bc4

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/Verify/Verification.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,21 @@ public function setWaitTime($time)
266266
return $this->setRequestData('next_event_wait', $time);
267267
}
268268

269+
/**
270+
* Which workflow to use, default is 1 for SMS -> TTS -> TTS
271+
* @link https://developer.nexmo.com/verify/guides/workflows-and-events
272+
*
273+
* Can only be set before the verification is created.
274+
* @uses \Nexmo\Entity\RequestArrayTrait::setRequestData
275+
*
276+
* @param int $workflow_id Which workflow to use
277+
* @return $this
278+
*/
279+
public function setWorkflowId($workflow_id)
280+
{
281+
return $this->setRequestData('workflow_id', $workflow_id);
282+
}
283+
269284
/**
270285
* Get the verification request id, if available.
271286
*

src/Verify/VerificationInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ public function setLanguage($language);
1818
public function setRequireType($type);
1919
public function setPinExpiry($time);
2020
public function setWaitTime($time);
21+
public function setWorkflowId($workflow_id);
2122
}

0 commit comments

Comments
 (0)