Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
DTMF -> sendDtmf
Browse files Browse the repository at this point in the history
  • Loading branch information
avbel committed May 3, 2018
1 parent cec4332 commit 1274aaf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/api.md
Expand Up @@ -3365,7 +3365,7 @@ client.Recording.getTranscriptions(recordingId, function(err, transcriptions){})
* [.phoneNumber(phoneNumber)](#BXMLResponse+phoneNumber) ⇒ <code>[BXMLResponse](#BXMLResponse)</code>
* [.transfer(params, callback)](#BXMLResponse+transfer) ⇒ <code>[BXMLResponse](#BXMLResponse)</code>
* [.pause(params)](#BXMLResponse+pause) ⇒ <code>[BXMLResponse](#BXMLResponse)</code>
* [.dtmf(value)](#BXMLResponse+dtmf) ⇒ <code>[BXMLResponse](#BXMLResponse)</code>
* [.sendDtmf(value)](#BXMLResponse+sendDtmf) ⇒ <code>[BXMLResponse](#BXMLResponse)</code>

<a name="new_BXMLResponse_new"></a>

Expand Down Expand Up @@ -3685,9 +3685,9 @@ var r = new Bandwidth.BXMLResponse();
r.pause({length: 5})
console.log(r.toString());
```
<a name="BXMLResponse+dtmf"></a>
<a name="BXMLResponse+sendDtmf"></a>

### bxmlResponse.dtmf(value) ⇒ <code>[BXMLResponse](#BXMLResponse)</code>
### bxmlResponse.sendDtmf(value) ⇒ <code>[BXMLResponse](#BXMLResponse)</code>
Send digits on a live call

**Kind**: instance method of <code>[BXMLResponse](#BXMLResponse)</code>
Expand Down
4 changes: 2 additions & 2 deletions lib/xml.js
Expand Up @@ -322,8 +322,8 @@ console.log(myApp.toString());
* r.dtmf('1');
* console.log(r.toString());
*/
this.dtmf = function (value) {
this.xml = this.xml.ele("DTMF", {}, value).up();
this.sendDtmf = function (value) {
this.xml = this.xml.ele("SendDtmf", {}, value).up();
return this;
};
};
Expand Down
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<DTMF>5</DTMF>
<SendDtmf>5</SendDtmf>
</Response>
6 changes: 3 additions & 3 deletions test/xml-test.js
Expand Up @@ -14,7 +14,7 @@ var nestingResponse = fs.readFileSync("./test/bxml-responses/nesting.xml", "utf8
var chainingResponse = fs.readFileSync("./test/bxml-responses/chaining.xml", "utf8");
var multiTransferResponse = fs.readFileSync("./test/bxml-responses/multiTransfer.xml", "utf8");
var pauseResponse = fs.readFileSync("./test/bxml-responses/pause.xml", "utf8");
var dtmfResponse = fs.readFileSync("./test/bxml-responses/dtmf.xml", "utf8");
var dtmfResponse = fs.readFileSync("./test/bxml-responses/sendDtmf.xml", "utf8");

describe("Builder", function () {

Expand Down Expand Up @@ -148,11 +148,11 @@ describe("Builder", function () {
myApp.toString().should.equal(pauseResponse.trim());
});
});
describe("Individual verb - dtmf", function () {
describe("Individual verb - sendDtmf", function () {
var myApp;
before(function () {
myApp = new BXMLResponse();
myApp.dtmf("5");
myApp.sendDtmf("5");
});
it("Should generate correct BXML", function () {
myApp.toString().should.equal(dtmfResponse.trim());
Expand Down

0 comments on commit 1274aaf

Please sign in to comment.