bandwidth-sdk 18.2.0 → 18.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +20 -20
- data/bandwidth.yml +2 -2
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +208 -27
- data/coverage/index.html +4402 -2424
- data/custom_templates/gem.mustache +1 -0
- data/docs/MediaApi.md +6 -6
- data/lib/bandwidth-sdk/api/media_api.rb +6 -6
- data/lib/bandwidth-sdk/models/bxml/verbs/connect.rb +23 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/endpoint.rb +11 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/forward.rb +2 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/gather.rb +22 -14
- data/lib/bandwidth-sdk/models/bxml/verbs/record.rb +2 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/start_recording.rb +2 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb +2 -2
- data/lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb +2 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/transfer.rb +1 -0
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +2 -0
- data/spec/smoke/media_api_spec.rb +2 -2
- data/spec/smoke/messages_api_spec.rb +2 -2
- data/spec/unit/models/bxml/verbs/connect_spec.rb +62 -0
- data/spec/unit/models/bxml/verbs/endpoint_spec.rb +16 -0
- data/spec/unit/models/bxml/verbs/forward_spec.rb +6 -2
- data/spec/unit/models/bxml/verbs/gather_spec.rb +23 -7
- data/spec/unit/models/bxml/verbs/record_spec.rb +8 -4
- data/spec/unit/models/bxml/verbs/start_recording_spec.rb +8 -4
- data/spec/unit/models/bxml/verbs/start_stream_spec.rb +5 -5
- data/spec/unit/models/bxml/verbs/start_transcription_spec.rb +11 -7
- data/spec/unit/models/bxml/verbs/transfer_spec.rb +7 -5
- metadata +8 -2
|
@@ -5,13 +5,15 @@ describe 'Bandwidth::Bxml::StartRecording' do
|
|
|
5
5
|
recording_available_url: 'https://initial.com',
|
|
6
6
|
recording_available_method: 'POST',
|
|
7
7
|
transcribe: true,
|
|
8
|
+
detect_language: true,
|
|
8
9
|
transcription_available_url: 'https://initial.com',
|
|
9
10
|
transcription_available_method: 'POST',
|
|
10
11
|
username: 'initial_username',
|
|
11
12
|
password: 'initial_password',
|
|
12
13
|
tag: 'initial_tag',
|
|
13
14
|
file_format: 'wav',
|
|
14
|
-
multi_channel: true
|
|
15
|
+
multi_channel: true,
|
|
16
|
+
recording_name: 'initial_recording_name'
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -20,13 +22,15 @@ describe 'Bandwidth::Bxml::StartRecording' do
|
|
|
20
22
|
recording_available_url: 'https://new.com',
|
|
21
23
|
recording_available_method: 'GET',
|
|
22
24
|
transcribe: false,
|
|
25
|
+
detect_language: false,
|
|
23
26
|
transcription_available_url: 'https://new.com',
|
|
24
27
|
transcription_available_method: 'GET',
|
|
25
28
|
username: 'new_username',
|
|
26
29
|
password: 'new_password',
|
|
27
30
|
tag: 'new_tag',
|
|
28
31
|
file_format: 'mp3',
|
|
29
|
-
multi_channel: false
|
|
32
|
+
multi_channel: false,
|
|
33
|
+
recording_name: 'new_recording_name'
|
|
30
34
|
}
|
|
31
35
|
}
|
|
32
36
|
|
|
@@ -39,13 +43,13 @@ describe 'Bandwidth::Bxml::StartRecording' do
|
|
|
39
43
|
end
|
|
40
44
|
|
|
41
45
|
it 'tests the to_bxml method of the StartRecording instance' do
|
|
42
|
-
expected = "\n<StartRecording recordingAvailableUrl=\"https://initial.com\" recordingAvailableMethod=\"POST\" transcribe=\"true\" transcriptionAvailableUrl=\"https://initial.com\" transcriptionAvailableMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" tag=\"initial_tag\" fileFormat=\"wav\" multiChannel=\"true\"/>\n"
|
|
46
|
+
expected = "\n<StartRecording recordingAvailableUrl=\"https://initial.com\" recordingAvailableMethod=\"POST\" transcribe=\"true\" detectLanguage=\"true\" transcriptionAvailableUrl=\"https://initial.com\" transcriptionAvailableMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" tag=\"initial_tag\" fileFormat=\"wav\" multiChannel=\"true\" recordingName=\"initial_recording_name\"/>\n"
|
|
43
47
|
expect(instance.to_bxml).to eq(expected)
|
|
44
48
|
end
|
|
45
49
|
|
|
46
50
|
it 'tests the set_attributes method of the StartRecording instance' do
|
|
47
51
|
instance.set_attributes(new_attributes)
|
|
48
|
-
expected = "\n<StartRecording recordingAvailableUrl=\"https://new.com\" recordingAvailableMethod=\"GET\" transcribe=\"false\" transcriptionAvailableUrl=\"https://new.com\" transcriptionAvailableMethod=\"GET\" username=\"new_username\" password=\"new_password\" tag=\"new_tag\" fileFormat=\"mp3\" multiChannel=\"false\"/>\n"
|
|
52
|
+
expected = "\n<StartRecording recordingAvailableUrl=\"https://new.com\" recordingAvailableMethod=\"GET\" transcribe=\"false\" detectLanguage=\"false\" transcriptionAvailableUrl=\"https://new.com\" transcriptionAvailableMethod=\"GET\" username=\"new_username\" password=\"new_password\" tag=\"new_tag\" fileFormat=\"mp3\" multiChannel=\"false\" recordingName=\"new_recording_name\"/>\n"
|
|
49
53
|
expect(instance.to_bxml).to eq(expected)
|
|
50
54
|
end
|
|
51
55
|
end
|
|
@@ -43,13 +43,13 @@ describe 'Bandwidth::Bxml::StartStream' do
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
it 'tests the to_bxml method of the StartStream instance' do
|
|
46
|
-
expected = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\"
|
|
46
|
+
expected = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" destinationUsername=\"initial_destination_username\" destinationPassword=\"initial_destination_password\" streamEventUrl=\"https://initial.com\" streamEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\"/>\n"
|
|
47
47
|
expect(instance.to_bxml).to eq(expected)
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
it 'tests the set_attributes method of the StartStream instance' do
|
|
51
51
|
instance.set_attributes(new_attributes)
|
|
52
|
-
expected = "\n<StartStream name=\"new_name\" mode=\"bidirectional\" tracks=\"outbound\" destination=\"https://new.com\"
|
|
52
|
+
expected = "\n<StartStream name=\"new_name\" mode=\"bidirectional\" tracks=\"outbound\" destination=\"https://new.com\" destinationUsername=\"new_destination_username\" destinationPassword=\"new_destination_password\" streamEventUrl=\"https://new.com\" streamEventMethod=\"GET\" username=\"new_username\" password=\"new_password\"/>\n"
|
|
53
53
|
expect(instance.to_bxml).to eq(expected)
|
|
54
54
|
end
|
|
55
55
|
end
|
|
@@ -61,16 +61,16 @@ describe 'Bandwidth::Bxml::StartStream' do
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
it 'tests the to_bxml method of the nested StartStream instance' do
|
|
64
|
-
expected = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\"
|
|
64
|
+
expected = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" destinationUsername=\"initial_destination_username\" destinationPassword=\"initial_destination_password\" streamEventUrl=\"https://initial.com\" streamEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\">\n <StreamParam name=\"stream_param_name_1\" value=\"stream_param_value_1\"/>\n</StartStream>\n"
|
|
65
65
|
expect(instance_nested.to_bxml).to eq(expected)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
it 'tests the add_stream_param method of the nested StartStream instance' do
|
|
69
|
-
expected_single = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\"
|
|
69
|
+
expected_single = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" destinationUsername=\"initial_destination_username\" destinationPassword=\"initial_destination_password\" streamEventUrl=\"https://initial.com\" streamEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\">\n <StreamParam name=\"stream_param_name_1\" value=\"stream_param_value_1\"/>\n <StreamParam name=\"stream_param_name_2\" value=\"stream_param_value_2\"/>\n</StartStream>\n"
|
|
70
70
|
instance_nested.add_stream_params(stream_param_2)
|
|
71
71
|
expect(instance_nested.to_bxml).to eq(expected_single)
|
|
72
72
|
|
|
73
|
-
expected_multiple = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\"
|
|
73
|
+
expected_multiple = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" destinationUsername=\"initial_destination_username\" destinationPassword=\"initial_destination_password\" streamEventUrl=\"https://initial.com\" streamEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\">\n <StreamParam name=\"stream_param_name_1\" value=\"stream_param_value_1\"/>\n <StreamParam name=\"stream_param_name_2\" value=\"stream_param_value_2\"/>\n <StreamParam name=\"stream_param_name_2\" value=\"stream_param_value_2\"/>\n <StreamParam name=\"stream_param_name_2\" value=\"stream_param_value_2\"/>\n</StartStream>\n"
|
|
74
74
|
instance_nested.add_stream_params([stream_param_2, stream_param_2])
|
|
75
75
|
expect(instance_nested.to_bxml).to eq(expected_multiple)
|
|
76
76
|
end
|
|
@@ -9,7 +9,9 @@ describe 'Bandwidth::Bxml::StartTranscription' do
|
|
|
9
9
|
username: 'initial_username',
|
|
10
10
|
password: 'initial_password',
|
|
11
11
|
destination: 'https://initial.com',
|
|
12
|
-
stabilized: true
|
|
12
|
+
stabilized: true,
|
|
13
|
+
detect_language: false,
|
|
14
|
+
preferred_languages: 'en-US'
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -22,7 +24,9 @@ describe 'Bandwidth::Bxml::StartTranscription' do
|
|
|
22
24
|
username: 'new_username',
|
|
23
25
|
password: 'new_password',
|
|
24
26
|
destination: 'https://new.com',
|
|
25
|
-
stabilized: false
|
|
27
|
+
stabilized: false,
|
|
28
|
+
detect_language: true,
|
|
29
|
+
preferred_languages: 'es-US'
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
|
|
@@ -39,13 +43,13 @@ describe 'Bandwidth::Bxml::StartTranscription' do
|
|
|
39
43
|
end
|
|
40
44
|
|
|
41
45
|
it 'tests the to_bxml method of the StartTranscription instance' do
|
|
42
|
-
expected = "\n<StartTranscription name=\"initial_name\" tracks=\"inbound\" transcriptionEventUrl=\"https://initial.com\" transcriptionEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" destination=\"https://initial.com\" stabilized=\"true\"/>\n"
|
|
46
|
+
expected = "\n<StartTranscription name=\"initial_name\" tracks=\"inbound\" transcriptionEventUrl=\"https://initial.com\" transcriptionEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" destination=\"https://initial.com\" stabilized=\"true\" detectLanguage=\"false\" preferredLanguages=\"en-US\"/>\n"
|
|
43
47
|
expect(instance.to_bxml).to eq(expected)
|
|
44
48
|
end
|
|
45
49
|
|
|
46
50
|
it 'tests the set_attributes method of the StartTranscription instance' do
|
|
47
51
|
instance.set_attributes(new_attributes)
|
|
48
|
-
expected = "\n<StartTranscription name=\"new_name\" tracks=\"outbound\" transcriptionEventUrl=\"https://new.com\" transcriptionEventMethod=\"GET\" username=\"new_username\" password=\"new_password\" destination=\"https://new.com\" stabilized=\"false\"/>\n"
|
|
52
|
+
expected = "\n<StartTranscription name=\"new_name\" tracks=\"outbound\" transcriptionEventUrl=\"https://new.com\" transcriptionEventMethod=\"GET\" username=\"new_username\" password=\"new_password\" destination=\"https://new.com\" stabilized=\"false\" detectLanguage=\"true\" preferredLanguages=\"es-US\"/>\n"
|
|
49
53
|
expect(instance.to_bxml).to eq(expected)
|
|
50
54
|
end
|
|
51
55
|
end
|
|
@@ -57,16 +61,16 @@ describe 'Bandwidth::Bxml::StartTranscription' do
|
|
|
57
61
|
end
|
|
58
62
|
|
|
59
63
|
it 'tests the to_bxml method of the nested StartTranscription instance' do
|
|
60
|
-
expected = "\n<StartTranscription name=\"initial_name\" tracks=\"inbound\" transcriptionEventUrl=\"https://initial.com\" transcriptionEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" destination=\"https://initial.com\" stabilized=\"true\">\n <CustomParam name=\"custom_param_name_1\" value=\"custom_param_value_1\"/>\n</StartTranscription>\n"
|
|
64
|
+
expected = "\n<StartTranscription name=\"initial_name\" tracks=\"inbound\" transcriptionEventUrl=\"https://initial.com\" transcriptionEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" destination=\"https://initial.com\" stabilized=\"true\" detectLanguage=\"false\" preferredLanguages=\"en-US\">\n <CustomParam name=\"custom_param_name_1\" value=\"custom_param_value_1\"/>\n</StartTranscription>\n"
|
|
61
65
|
expect(instance_nested.to_bxml).to eq(expected)
|
|
62
66
|
end
|
|
63
67
|
|
|
64
68
|
it 'tests the add_custom_param method of the nested StartTranscription instance' do
|
|
65
|
-
expected_single = "\n<StartTranscription name=\"initial_name\" tracks=\"inbound\" transcriptionEventUrl=\"https://initial.com\" transcriptionEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" destination=\"https://initial.com\" stabilized=\"true\">\n <CustomParam name=\"custom_param_name_1\" value=\"custom_param_value_1\"/>\n <CustomParam name=\"custom_param_name_2\" value=\"custom_param_value_2\"/>\n</StartTranscription>\n"
|
|
69
|
+
expected_single = "\n<StartTranscription name=\"initial_name\" tracks=\"inbound\" transcriptionEventUrl=\"https://initial.com\" transcriptionEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" destination=\"https://initial.com\" stabilized=\"true\" detectLanguage=\"false\" preferredLanguages=\"en-US\">\n <CustomParam name=\"custom_param_name_1\" value=\"custom_param_value_1\"/>\n <CustomParam name=\"custom_param_name_2\" value=\"custom_param_value_2\"/>\n</StartTranscription>\n"
|
|
66
70
|
instance_nested.add_custom_params(custom_param_2)
|
|
67
71
|
expect(instance_nested.to_bxml).to eq(expected_single)
|
|
68
72
|
|
|
69
|
-
expected_multiple = "\n<StartTranscription name=\"initial_name\" tracks=\"inbound\" transcriptionEventUrl=\"https://initial.com\" transcriptionEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" destination=\"https://initial.com\" stabilized=\"true\">\n <CustomParam name=\"custom_param_name_1\" value=\"custom_param_value_1\"/>\n <CustomParam name=\"custom_param_name_2\" value=\"custom_param_value_2\"/>\n <CustomParam name=\"custom_param_name_2\" value=\"custom_param_value_2\"/>\n <CustomParam name=\"custom_param_name_2\" value=\"custom_param_value_2\"/>\n</StartTranscription>\n"
|
|
73
|
+
expected_multiple = "\n<StartTranscription name=\"initial_name\" tracks=\"inbound\" transcriptionEventUrl=\"https://initial.com\" transcriptionEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" destination=\"https://initial.com\" stabilized=\"true\" detectLanguage=\"false\" preferredLanguages=\"en-US\">\n <CustomParam name=\"custom_param_name_1\" value=\"custom_param_value_1\"/>\n <CustomParam name=\"custom_param_name_2\" value=\"custom_param_value_2\"/>\n <CustomParam name=\"custom_param_name_2\" value=\"custom_param_value_2\"/>\n <CustomParam name=\"custom_param_name_2\" value=\"custom_param_value_2\"/>\n</StartTranscription>\n"
|
|
70
74
|
instance_nested.add_custom_params([custom_param_2, custom_param_2])
|
|
71
75
|
expect(instance_nested.to_bxml).to eq(expected_multiple)
|
|
72
76
|
end
|
|
@@ -3,6 +3,7 @@ describe 'Bandwidth::Bxml::Transfer' do
|
|
|
3
3
|
let(:initial_attributes) {
|
|
4
4
|
{
|
|
5
5
|
transfer_caller_id: '+19195551234',
|
|
6
|
+
privacy: true,
|
|
6
7
|
transfer_caller_display_name: 'initial_caller',
|
|
7
8
|
call_timeout: 5,
|
|
8
9
|
transfer_complete_url: 'https://initial.com',
|
|
@@ -22,6 +23,7 @@ describe 'Bandwidth::Bxml::Transfer' do
|
|
|
22
23
|
let(:new_attributes) {
|
|
23
24
|
{
|
|
24
25
|
transfer_caller_id: '+19195554321',
|
|
26
|
+
privacy: false,
|
|
25
27
|
transfer_caller_display_name: 'new_caller',
|
|
26
28
|
call_timeout: 10,
|
|
27
29
|
transfer_complete_url: 'https://new.com',
|
|
@@ -51,13 +53,13 @@ describe 'Bandwidth::Bxml::Transfer' do
|
|
|
51
53
|
end
|
|
52
54
|
|
|
53
55
|
it 'tests the to_bxml method of the Transfer instance' do
|
|
54
|
-
expected = "\n<Transfer transferCallerId=\"+19195551234\" transferCallerDisplayName=\"initial_caller\" callTimeout=\"5\" transferCompleteUrl=\"https://initial.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://initial.com\" transferCompleteFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\"/>\n"
|
|
56
|
+
expected = "\n<Transfer transferCallerId=\"+19195551234\" privacy=\"true\" transferCallerDisplayName=\"initial_caller\" callTimeout=\"5\" transferCompleteUrl=\"https://initial.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://initial.com\" transferCompleteFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\"/>\n"
|
|
55
57
|
expect(instance.to_bxml).to eq(expected)
|
|
56
58
|
end
|
|
57
59
|
|
|
58
60
|
it 'tests the set_attributes method of the Transfer instance' do
|
|
59
61
|
instance.set_attributes(new_attributes)
|
|
60
|
-
expected = "\n<Transfer transferCallerId=\"+19195554321\" transferCallerDisplayName=\"new_caller\" callTimeout=\"10\" transferCompleteUrl=\"https://new.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://new.com\" transferCompleteFallbackMethod=\"POST\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\" diversionTreatment=\"stack\" diversionReason=\"no-answer\"/>\n"
|
|
62
|
+
expected = "\n<Transfer transferCallerId=\"+19195554321\" privacy=\"false\" transferCallerDisplayName=\"new_caller\" callTimeout=\"10\" transferCompleteUrl=\"https://new.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://new.com\" transferCompleteFallbackMethod=\"POST\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\" diversionTreatment=\"stack\" diversionReason=\"no-answer\"/>\n"
|
|
61
63
|
expect(instance.to_bxml).to eq(expected)
|
|
62
64
|
end
|
|
63
65
|
end
|
|
@@ -69,16 +71,16 @@ describe 'Bandwidth::Bxml::Transfer' do
|
|
|
69
71
|
end
|
|
70
72
|
|
|
71
73
|
it 'tests the to_bxml method of the nested Transfer instance' do
|
|
72
|
-
expected = "\n<Transfer transferCallerId=\"+19195551234\" transferCallerDisplayName=\"initial_caller\" callTimeout=\"5\" transferCompleteUrl=\"https://initial.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://initial.com\" transferCompleteFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\">\n <PhoneNumber>+19195551234</PhoneNumber>\n</Transfer>\n"
|
|
74
|
+
expected = "\n<Transfer transferCallerId=\"+19195551234\" privacy=\"true\" transferCallerDisplayName=\"initial_caller\" callTimeout=\"5\" transferCompleteUrl=\"https://initial.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://initial.com\" transferCompleteFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\">\n <PhoneNumber>+19195551234</PhoneNumber>\n</Transfer>\n"
|
|
73
75
|
expect(instance_nested.to_bxml).to eq(expected)
|
|
74
76
|
end
|
|
75
77
|
|
|
76
78
|
it 'tests the add_verb method of the nested Transfer instance' do
|
|
77
|
-
expected_single = "\n<Transfer transferCallerId=\"+19195551234\" transferCallerDisplayName=\"initial_caller\" callTimeout=\"5\" transferCompleteUrl=\"https://initial.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://initial.com\" transferCompleteFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\">\n <PhoneNumber>+19195551234</PhoneNumber>\n <SipUri>sip:1-999-123-4567@voip-provider.example.net</SipUri>\n</Transfer>\n"
|
|
79
|
+
expected_single = "\n<Transfer transferCallerId=\"+19195551234\" privacy=\"true\" transferCallerDisplayName=\"initial_caller\" callTimeout=\"5\" transferCompleteUrl=\"https://initial.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://initial.com\" transferCompleteFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\">\n <PhoneNumber>+19195551234</PhoneNumber>\n <SipUri>sip:1-999-123-4567@voip-provider.example.net</SipUri>\n</Transfer>\n"
|
|
78
80
|
instance_nested.add_transfer_recipients(sip_uri)
|
|
79
81
|
expect(instance_nested.to_bxml).to eq(expected_single)
|
|
80
82
|
|
|
81
|
-
expected_multiple = "\n<Transfer transferCallerId=\"+19195551234\" transferCallerDisplayName=\"initial_caller\" callTimeout=\"5\" transferCompleteUrl=\"https://initial.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://initial.com\" transferCompleteFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\">\n <PhoneNumber>+19195551234</PhoneNumber>\n <SipUri>sip:1-999-123-4567@voip-provider.example.net</SipUri>\n <SipUri>sip:1-999-123-4567@voip-provider.example.net</SipUri>\n <PhoneNumber>+19195551234</PhoneNumber>\n</Transfer>\n"
|
|
83
|
+
expected_multiple = "\n<Transfer transferCallerId=\"+19195551234\" privacy=\"true\" transferCallerDisplayName=\"initial_caller\" callTimeout=\"5\" transferCompleteUrl=\"https://initial.com\" transferCompleteMethod=\"POST\" transferCompleteFallbackUrl=\"https://initial.com\" transferCompleteFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\">\n <PhoneNumber>+19195551234</PhoneNumber>\n <SipUri>sip:1-999-123-4567@voip-provider.example.net</SipUri>\n <SipUri>sip:1-999-123-4567@voip-provider.example.net</SipUri>\n <PhoneNumber>+19195551234</PhoneNumber>\n</Transfer>\n"
|
|
82
84
|
instance_nested.add_transfer_recipients([sip_uri, phone_number])
|
|
83
85
|
expect(instance_nested.to_bxml).to eq(expected_multiple)
|
|
84
86
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bandwidth-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 18.
|
|
4
|
+
version: 18.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bandwidth
|
|
@@ -406,7 +406,9 @@ files:
|
|
|
406
406
|
- lib/bandwidth-sdk/models/bxml/verb.rb
|
|
407
407
|
- lib/bandwidth-sdk/models/bxml/verbs/bridge.rb
|
|
408
408
|
- lib/bandwidth-sdk/models/bxml/verbs/conference.rb
|
|
409
|
+
- lib/bandwidth-sdk/models/bxml/verbs/connect.rb
|
|
409
410
|
- lib/bandwidth-sdk/models/bxml/verbs/custom_param.rb
|
|
411
|
+
- lib/bandwidth-sdk/models/bxml/verbs/endpoint.rb
|
|
410
412
|
- lib/bandwidth-sdk/models/bxml/verbs/forward.rb
|
|
411
413
|
- lib/bandwidth-sdk/models/bxml/verbs/gather.rb
|
|
412
414
|
- lib/bandwidth-sdk/models/bxml/verbs/hangup.rb
|
|
@@ -674,7 +676,9 @@ files:
|
|
|
674
676
|
- spec/unit/models/bxml/verb_spec.rb
|
|
675
677
|
- spec/unit/models/bxml/verbs/bridge_spec.rb
|
|
676
678
|
- spec/unit/models/bxml/verbs/conference_spec.rb
|
|
679
|
+
- spec/unit/models/bxml/verbs/connect_spec.rb
|
|
677
680
|
- spec/unit/models/bxml/verbs/custom_param_spec.rb
|
|
681
|
+
- spec/unit/models/bxml/verbs/endpoint_spec.rb
|
|
678
682
|
- spec/unit/models/bxml/verbs/forward_spec.rb
|
|
679
683
|
- spec/unit/models/bxml/verbs/gather_spec.rb
|
|
680
684
|
- spec/unit/models/bxml/verbs/hangup_spec.rb
|
|
@@ -906,7 +910,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
906
910
|
- !ruby/object:Gem::Version
|
|
907
911
|
version: '0'
|
|
908
912
|
requirements: []
|
|
909
|
-
rubygems_version: 4.0.
|
|
913
|
+
rubygems_version: 4.0.20
|
|
910
914
|
specification_version: 4
|
|
911
915
|
summary: Bandwidth Ruby SDK
|
|
912
916
|
test_files:
|
|
@@ -960,7 +964,9 @@ test_files:
|
|
|
960
964
|
- spec/unit/models/bxml/verb_spec.rb
|
|
961
965
|
- spec/unit/models/bxml/verbs/bridge_spec.rb
|
|
962
966
|
- spec/unit/models/bxml/verbs/conference_spec.rb
|
|
967
|
+
- spec/unit/models/bxml/verbs/connect_spec.rb
|
|
963
968
|
- spec/unit/models/bxml/verbs/custom_param_spec.rb
|
|
969
|
+
- spec/unit/models/bxml/verbs/endpoint_spec.rb
|
|
964
970
|
- spec/unit/models/bxml/verbs/forward_spec.rb
|
|
965
971
|
- spec/unit/models/bxml/verbs/gather_spec.rb
|
|
966
972
|
- spec/unit/models/bxml/verbs/hangup_spec.rb
|