Skip to content

Commit a97b7fd

Browse files
author
marcel corso gonzalez
authored
Merge pull request #78 from surik/depricate-callflow-title
Deprecate CallFlow Title usage
2 parents 7c95802 + bcc8dcc commit a97b7fd

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

lib/messagebird/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,13 +460,13 @@ def number_cancel(number)
460460
number_request(:delete, "phone-numbers/#{number}")
461461
end
462462

463-
def call_flow_create(title, steps, default, record, params = {})
463+
def call_flow_create(steps, default, record, params = {})
464464
params = params.merge(
465-
title: title,
466465
steps: steps,
467466
default: default,
468467
record: record
469468
)
469+
470470
CallFlow.new(voice_request(:post, 'call-flows', params))
471471
end
472472

spec/call_flow_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
}
4343
expect(voice_client)
4444
.to receive(:request)
45-
.with(:post, 'call-flows', { title: title, steps: steps, default: default, record: record })
45+
.with(:post, 'call-flows', { steps: steps, default: default, record: record })
4646
.and_return(mock_data.to_json)
4747

48-
call_flow = client.call_flow_create(title, steps, default, record)
48+
call_flow = client.call_flow_create(steps, default, record)
4949
expect(call_flow.id).to eq call_flow_id
5050
end
5151

spec/call_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
let(:webhook) { { url: 'https://example.com', token: 'token_to_sign_the_call_events_with' } }
1717
let(:call_flow) do
1818
{
19-
title: 'Say message',
2019
steps: [
2120
{
2221
action: 'say',

0 commit comments

Comments
 (0)