bandwidth-sdk 18.3.1 → 19.1.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 +52 -29
- data/README.md +1 -10
- data/Rakefile +1 -1
- data/bandwidth.yml +285 -109
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +1408 -1053
- data/coverage/index.html +20749 -16728
- data/custom_templates/api_client.mustache +3 -1
- data/custom_templates/configuration.mustache +18 -12
- data/custom_templates/gem.mustache +2 -2
- data/docs/Callback.md +1 -0
- data/docs/CallsApi.md +5 -25
- data/docs/ConferencesApi.md +9 -45
- data/docs/DisconnectCallback.md +6 -2
- data/docs/EndpointsApi.md +5 -25
- data/docs/InboundCallback.md +1 -1
- data/docs/InboundCallbackMessage.md +2 -0
- data/docs/InitiateCallback.md +1 -1
- data/docs/LookupResult.md +2 -2
- data/docs/MFAApi.md +3 -15
- data/docs/MediaApi.md +4 -20
- data/docs/Message.md +1 -1
- data/docs/MessagesApi.md +2 -10
- data/docs/MultiChannelAction.md +3 -3
- data/docs/MultiChannelActionCalendarEvent.md +3 -3
- data/docs/MultiChannelApi.md +1 -5
- data/docs/PhoneNumberLookupApi.md +3 -15
- data/docs/RbmActionBase.md +3 -3
- data/docs/RbmActionDial.md +3 -3
- data/docs/RbmActionOpenUrl.md +3 -3
- data/docs/RbmActionViewLocation.md +3 -3
- data/docs/RbmSession.md +26 -0
- data/docs/RbmSuggestionResponse.md +4 -4
- data/docs/RecordingsApi.md +10 -50
- data/docs/StatisticsApi.md +1 -5
- data/docs/StatusCallback.md +2 -2
- data/docs/StatusCallbackMessage.md +3 -1
- data/docs/TollFreeVerificationApi.md +9 -45
- data/docs/TranscriptionsApi.md +3 -15
- data/docs/TransferDisconnectCallback.md +7 -1
- data/lib/bandwidth-sdk/api/calls_api.rb +5 -5
- data/lib/bandwidth-sdk/api/conferences_api.rb +9 -9
- data/lib/bandwidth-sdk/api/endpoints_api.rb +5 -5
- data/lib/bandwidth-sdk/api/media_api.rb +4 -4
- data/lib/bandwidth-sdk/api/messages_api.rb +2 -2
- data/lib/bandwidth-sdk/api/mfa_api.rb +3 -3
- data/lib/bandwidth-sdk/api/multi_channel_api.rb +1 -1
- data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +3 -3
- data/lib/bandwidth-sdk/api/recordings_api.rb +10 -10
- data/lib/bandwidth-sdk/api/statistics_api.rb +1 -1
- data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +9 -9
- data/lib/bandwidth-sdk/api/transcriptions_api.rb +3 -3
- data/lib/bandwidth-sdk/api_client.rb +3 -1
- data/lib/bandwidth-sdk/configuration.rb +18 -19
- data/lib/bandwidth-sdk/models/bxml/verbs/transfer.rb +2 -0
- data/lib/bandwidth-sdk/models/callback.rb +1 -0
- data/lib/bandwidth-sdk/models/disconnect_callback.rb +27 -5
- data/lib/bandwidth-sdk/models/inbound_callback_message.rb +10 -1
- data/lib/bandwidth-sdk/models/initiate_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_item.rb +1 -0
- data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_base.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_dial.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_session.rb +208 -0
- data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +2 -2
- data/lib/bandwidth-sdk/models/status_callback_message.rb +13 -4
- data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +2 -1
- data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +37 -5
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +3 -2
- data/spec/smoke/calls_api_spec.rb +46 -46
- data/spec/smoke/conferences_api_spec.rb +1 -1
- data/spec/smoke/endpoints_api_spec.rb +2 -31
- data/spec/smoke/media_api_spec.rb +2 -0
- data/spec/smoke/messages_api_spec.rb +2 -24
- data/spec/smoke/mfa_api_spec.rb +4 -27
- data/spec/smoke/multi_channel_api_spec.rb +4 -2
- data/spec/smoke/phone_number_lookup_api_spec.rb +2 -0
- data/spec/smoke/recordings_api_spec.rb +1 -1
- data/spec/smoke/smoke_helper.rb +41 -0
- data/spec/smoke/statistics_api_spec.rb +2 -37
- data/spec/smoke/toll_free_verification_api_spec.rb +2 -0
- data/spec/smoke/transcriptions_api_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -48
- data/spec/unit/api/calls_api_spec.rb +3 -1
- data/spec/unit/api/conferences_api_spec.rb +2 -0
- data/spec/unit/api/endpoints_api_spec.rb +2 -0
- data/spec/unit/api/media_api_spec.rb +2 -0
- data/spec/unit/api/messages_api_spec.rb +2 -0
- data/spec/unit/api/mfa_api_spec.rb +2 -0
- data/spec/unit/api/multi_channel_api_spec.rb +2 -0
- data/spec/unit/api/phone_number_lookup_api_spec.rb +2 -0
- data/spec/unit/api/recordings_api_spec.rb +2 -0
- data/spec/unit/api/statistics_api_spec.rb +2 -0
- data/spec/unit/api/toll_free_verification_api_spec.rb +2 -0
- data/spec/unit/api/transcriptions_api_spec.rb +2 -0
- data/spec/unit/client/api_client_spec.rb +70 -206
- data/spec/unit/client/configuration_spec.rb +22 -17
- data/spec/unit/constants.rb +6 -0
- data/spec/unit/models/bxml/verbs/transfer_spec.rb +11 -7
- data/spec/unit/models/callback_spec.rb +1 -0
- data/spec/unit/models/disconnect_callback_spec.rb +10 -2
- data/spec/unit/models/inbound_callback_message_spec.rb +20 -5
- data/spec/unit/models/list_message_item_spec.rb +1 -0
- data/spec/unit/models/rbm_session_spec.rb +95 -0
- data/spec/unit/models/status_callback_message_spec.rb +20 -5
- data/spec/unit/models/status_callback_type_enum_spec.rb +7 -1
- data/spec/unit/models/transfer_disconnect_callback_spec.rb +16 -4
- metadata +9 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Unit tests for Bandwidth::RbmSession
|
|
2
|
+
describe Bandwidth::RbmSession do
|
|
3
|
+
let(:rbm_session_default) { Bandwidth::RbmSession.new({
|
|
4
|
+
can_initiate: true
|
|
5
|
+
}) }
|
|
6
|
+
let(:rbm_session_values) { Bandwidth::RbmSession.new({
|
|
7
|
+
can_initiate: false,
|
|
8
|
+
id: '0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d',
|
|
9
|
+
type: 'INTERACTIVE_SESSION',
|
|
10
|
+
start_time: '2026-08-06T09:59:55Z',
|
|
11
|
+
end_time: '2026-08-07T09:59:55Z'
|
|
12
|
+
}) }
|
|
13
|
+
|
|
14
|
+
describe '#initialize' do
|
|
15
|
+
it 'causes an ArgumentError by passing an Array to the initialize method' do
|
|
16
|
+
expect {
|
|
17
|
+
Bandwidth::RbmSession.new([])
|
|
18
|
+
}.to raise_error(ArgumentError)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it 'causes an ArgumentError by passing an invalid attribute to the initialize method' do
|
|
22
|
+
expect {
|
|
23
|
+
Bandwidth::RbmSession.new({ invalid: true })
|
|
24
|
+
}.to raise_error(ArgumentError)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe '#acceptable_attributes' do
|
|
29
|
+
it 'expects acceptable JSON attributes to be those in the attribute map' do
|
|
30
|
+
expect(Bandwidth::RbmSession.acceptable_attributes).to eq(Bandwidth::RbmSession.attribute_map.values)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe '#openapi_nullable' do
|
|
35
|
+
it 'expects nullable attributes to be the set of nullable fields' do
|
|
36
|
+
expect(Bandwidth::RbmSession.openapi_nullable).to eq(Set.new([
|
|
37
|
+
:'id',
|
|
38
|
+
:'type',
|
|
39
|
+
:'start_time',
|
|
40
|
+
:'end_time'
|
|
41
|
+
]))
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
describe '#build_from_hash' do
|
|
46
|
+
it 'validates instance of RbmSession created by the build_from_hash method' do
|
|
47
|
+
rbm_session_from_hash = Bandwidth::RbmSession.build_from_hash({
|
|
48
|
+
canInitiate: false,
|
|
49
|
+
id: '0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d',
|
|
50
|
+
type: 'INTERACTIVE_SESSION',
|
|
51
|
+
startTime: '2026-08-06T09:59:55Z',
|
|
52
|
+
endTime: '2026-08-07T09:59:55Z'
|
|
53
|
+
})
|
|
54
|
+
expect(rbm_session_from_hash).to be_instance_of(Bandwidth::RbmSession)
|
|
55
|
+
expect(rbm_session_from_hash.can_initiate).to be false
|
|
56
|
+
expect(rbm_session_from_hash.id).to eq('0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d')
|
|
57
|
+
expect(rbm_session_from_hash.type).to eq('INTERACTIVE_SESSION')
|
|
58
|
+
expect(rbm_session_from_hash.start_time).to eq(Time.parse('2026-08-06T09:59:55Z'))
|
|
59
|
+
expect(rbm_session_from_hash.end_time).to eq(Time.parse('2026-08-07T09:59:55Z'))
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
describe '#to_s' do
|
|
64
|
+
it 'returns a string representation of the object' do
|
|
65
|
+
expect(rbm_session_values.to_s).to eq({ :canInitiate => false, :id => '0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d', :type => 'INTERACTIVE_SESSION', :startTime => '2026-08-06T09:59:55Z', :endTime => '2026-08-07T09:59:55Z' }.to_s)
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
describe '#eq? #==' do
|
|
70
|
+
it 'returns true/false when comparing objects' do
|
|
71
|
+
expect(rbm_session_default.eql?(Bandwidth::RbmSession.new({ can_initiate: true }))).to be true
|
|
72
|
+
expect(rbm_session_default.eql?(rbm_session_values)).to be false
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe '#to_body #to_hash' do
|
|
77
|
+
it 'returns a hash representation of the object' do
|
|
78
|
+
expect(rbm_session_values.to_body).to eq({
|
|
79
|
+
canInitiate: false,
|
|
80
|
+
id: '0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d',
|
|
81
|
+
type: 'INTERACTIVE_SESSION',
|
|
82
|
+
startTime: '2026-08-06T09:59:55Z',
|
|
83
|
+
endTime: '2026-08-07T09:59:55Z'
|
|
84
|
+
})
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
describe 'custom attribute writers' do
|
|
89
|
+
it '#can_initiate=' do
|
|
90
|
+
expect {
|
|
91
|
+
rbm_session_values.can_initiate = nil
|
|
92
|
+
}.to raise_error(ArgumentError, 'can_initiate cannot be nil')
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -23,7 +23,11 @@ describe Bandwidth::StatusCallbackMessage do
|
|
|
23
23
|
tag: 'custom tag',
|
|
24
24
|
media: ['https://dev.bandwidth.com/images/bandwidth-logo.png'],
|
|
25
25
|
priority: Bandwidth::PriorityEnum::DEFAULT,
|
|
26
|
-
channel: Bandwidth::MultiChannelMessageChannelEnum::
|
|
26
|
+
channel: Bandwidth::MultiChannelMessageChannelEnum::RBM,
|
|
27
|
+
session: Bandwidth::RbmSession.new({
|
|
28
|
+
can_initiate: false,
|
|
29
|
+
id: '0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d'
|
|
30
|
+
})
|
|
27
31
|
}) }
|
|
28
32
|
|
|
29
33
|
describe '#initialize' do
|
|
@@ -67,7 +71,11 @@ describe Bandwidth::StatusCallbackMessage do
|
|
|
67
71
|
tag: 'custom tag',
|
|
68
72
|
media: ['https://dev.bandwidth.com/images/bandwidth-logo.png'],
|
|
69
73
|
priority: Bandwidth::PriorityEnum::DEFAULT,
|
|
70
|
-
channel: Bandwidth::MultiChannelMessageChannelEnum::
|
|
74
|
+
channel: Bandwidth::MultiChannelMessageChannelEnum::RBM,
|
|
75
|
+
session: {
|
|
76
|
+
canInitiate: false,
|
|
77
|
+
id: '0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d'
|
|
78
|
+
}
|
|
71
79
|
})
|
|
72
80
|
expect(status_callback_message_from_hash).to be_instance_of(Bandwidth::StatusCallbackMessage)
|
|
73
81
|
expect(status_callback_message_from_hash.id).to eq('1589228074636lm4k2je7j7jklbn2')
|
|
@@ -82,13 +90,16 @@ describe Bandwidth::StatusCallbackMessage do
|
|
|
82
90
|
expect(status_callback_message_from_hash.tag).to eq('custom tag')
|
|
83
91
|
expect(status_callback_message_from_hash.media).to eq(['https://dev.bandwidth.com/images/bandwidth-logo.png'])
|
|
84
92
|
expect(status_callback_message_from_hash.priority).to eq(Bandwidth::PriorityEnum::DEFAULT)
|
|
85
|
-
expect(status_callback_message_from_hash.channel).to eq(Bandwidth::MultiChannelMessageChannelEnum::
|
|
93
|
+
expect(status_callback_message_from_hash.channel).to eq(Bandwidth::MultiChannelMessageChannelEnum::RBM)
|
|
94
|
+
expect(status_callback_message_from_hash.session).to be_instance_of(Bandwidth::RbmSession)
|
|
95
|
+
expect(status_callback_message_from_hash.session.can_initiate).to be false
|
|
96
|
+
expect(status_callback_message_from_hash.session.id).to eq('0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d')
|
|
86
97
|
end
|
|
87
98
|
end
|
|
88
99
|
|
|
89
100
|
describe '#to_s' do
|
|
90
101
|
it 'returns a string representation of the object' do
|
|
91
|
-
expect(status_callback_message_values.to_s).to eq({ :id => '1589228074636lm4k2je7j7jklbn2', :owner => '+19195554321', :applicationId => '93de2206-9669-4e07-948d-329f4b722ee2', :time => '2022-06-16T13:15:07.160Z', :segmentCount => 2, :direction => 'out', :to => ['+19195551234'], :from => '+19195554321', :text => 'Hello world', :tag => 'custom tag', :media => ['https://dev.bandwidth.com/images/bandwidth-logo.png'], :priority => 'default', :channel => '
|
|
102
|
+
expect(status_callback_message_values.to_s).to eq({ :id => '1589228074636lm4k2je7j7jklbn2', :owner => '+19195554321', :applicationId => '93de2206-9669-4e07-948d-329f4b722ee2', :time => '2022-06-16T13:15:07.160Z', :segmentCount => 2, :direction => 'out', :to => ['+19195551234'], :from => '+19195554321', :text => 'Hello world', :tag => 'custom tag', :media => ['https://dev.bandwidth.com/images/bandwidth-logo.png'], :priority => 'default', :channel => 'RBM', :session => { :canInitiate => false, :id => '0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d' } }.to_s)
|
|
92
103
|
end
|
|
93
104
|
end
|
|
94
105
|
|
|
@@ -124,7 +135,11 @@ describe Bandwidth::StatusCallbackMessage do
|
|
|
124
135
|
tag: 'custom tag',
|
|
125
136
|
media: ['https://dev.bandwidth.com/images/bandwidth-logo.png'],
|
|
126
137
|
priority: Bandwidth::PriorityEnum::DEFAULT,
|
|
127
|
-
channel: Bandwidth::MultiChannelMessageChannelEnum::
|
|
138
|
+
channel: Bandwidth::MultiChannelMessageChannelEnum::RBM,
|
|
139
|
+
session: {
|
|
140
|
+
canInitiate: false,
|
|
141
|
+
id: '0f5a3b9c-2d4e-4f6a-8b1c-7e9d0a2b3c4d'
|
|
142
|
+
}
|
|
128
143
|
})
|
|
129
144
|
end
|
|
130
145
|
end
|
|
@@ -20,6 +20,10 @@ describe Bandwidth::StatusCallbackTypeEnum do
|
|
|
20
20
|
it 'defines MESSAGE_READ' do
|
|
21
21
|
expect(Bandwidth::StatusCallbackTypeEnum::MESSAGE_READ).to eq('message-read')
|
|
22
22
|
end
|
|
23
|
+
|
|
24
|
+
it 'defines SESSION_STARTED' do
|
|
25
|
+
expect(Bandwidth::StatusCallbackTypeEnum::SESSION_STARTED).to eq('session-started')
|
|
26
|
+
end
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
describe '.all_vars' do
|
|
@@ -29,7 +33,8 @@ describe Bandwidth::StatusCallbackTypeEnum do
|
|
|
29
33
|
'message-sent',
|
|
30
34
|
'message-delivered',
|
|
31
35
|
'message-failed',
|
|
32
|
-
'message-read'
|
|
36
|
+
'message-read',
|
|
37
|
+
'session-started'
|
|
33
38
|
])
|
|
34
39
|
end
|
|
35
40
|
end
|
|
@@ -41,6 +46,7 @@ describe Bandwidth::StatusCallbackTypeEnum do
|
|
|
41
46
|
expect(Bandwidth::StatusCallbackTypeEnum.build_from_hash('message-delivered')).to eq('message-delivered')
|
|
42
47
|
expect(Bandwidth::StatusCallbackTypeEnum.build_from_hash('message-failed')).to eq('message-failed')
|
|
43
48
|
expect(Bandwidth::StatusCallbackTypeEnum.build_from_hash('message-read')).to eq('message-read')
|
|
49
|
+
expect(Bandwidth::StatusCallbackTypeEnum.build_from_hash('session-started')).to eq('session-started')
|
|
44
50
|
end
|
|
45
51
|
|
|
46
52
|
it 'raises an error for an invalid enum value' do
|
|
@@ -21,7 +21,10 @@ describe Bandwidth::TransferDisconnectCallback do
|
|
|
21
21
|
transfer_to: '+19195551234',
|
|
22
22
|
cause: 'hangup',
|
|
23
23
|
error_message: 'call rejected',
|
|
24
|
-
error_id: '4642074b-7b58-478b-96e4-3a60955c6765'
|
|
24
|
+
error_id: '4642074b-7b58-478b-96e4-3a60955c6765',
|
|
25
|
+
sip_response_code: 486,
|
|
26
|
+
sip_status_line: 'SIP/2.0 486 Busy Here',
|
|
27
|
+
sip_headers: { 'reason' => 'v=analytics1' }
|
|
25
28
|
}) }
|
|
26
29
|
|
|
27
30
|
describe '#initialize' do
|
|
@@ -78,7 +81,10 @@ describe Bandwidth::TransferDisconnectCallback do
|
|
|
78
81
|
transferTo: '+19195551234',
|
|
79
82
|
cause: 'hangup',
|
|
80
83
|
errorMessage: 'call rejected',
|
|
81
|
-
errorId: '4642074b-7b58-478b-96e4-3a60955c6765'
|
|
84
|
+
errorId: '4642074b-7b58-478b-96e4-3a60955c6765',
|
|
85
|
+
sipResponseCode: 486,
|
|
86
|
+
sipStatusLine: 'SIP/2.0 486 Busy Here',
|
|
87
|
+
sipHeaders: { 'reason' => 'v=analytics1' }
|
|
82
88
|
})
|
|
83
89
|
expect(transfer_disconnect_callback_from_hash).to be_instance_of(Bandwidth::TransferDisconnectCallback)
|
|
84
90
|
expect(transfer_disconnect_callback_from_hash.event_type).to eq('transferDisconnect')
|
|
@@ -101,12 +107,15 @@ describe Bandwidth::TransferDisconnectCallback do
|
|
|
101
107
|
expect(transfer_disconnect_callback_from_hash.cause).to eq('hangup')
|
|
102
108
|
expect(transfer_disconnect_callback_from_hash.error_message).to eq('call rejected')
|
|
103
109
|
expect(transfer_disconnect_callback_from_hash.error_id).to eq('4642074b-7b58-478b-96e4-3a60955c6765')
|
|
110
|
+
expect(transfer_disconnect_callback_from_hash.sip_response_code).to eq(486)
|
|
111
|
+
expect(transfer_disconnect_callback_from_hash.sip_status_line).to eq('SIP/2.0 486 Busy Here')
|
|
112
|
+
expect(transfer_disconnect_callback_from_hash.sip_headers).to eq({ 'reason' => 'v=analytics1' })
|
|
104
113
|
end
|
|
105
114
|
end
|
|
106
115
|
|
|
107
116
|
describe '#to_s' do
|
|
108
117
|
it 'returns a string representation of the object' do
|
|
109
|
-
expect(transfer_disconnect_callback_values.to_s).to eq({ :eventType => 'transferDisconnect', :eventTime => '2022-06-16T13:15:07.160Z', :accountId => '9900000', :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :from => '+19195554321', :to => '+19195551234', :direction => 'outbound', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :callUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :parentCallId => 'c-95ac29a2-1331029c-2cb0-4a07-b215-b22865662d99', :enqueuedTime => '2022-06-16T13:15:07.160Z', :startTime => '2022-06-16T13:15:07.160Z', :answerTime => '2022-06-16T13:15:18.126Z', :endTime => '2022-06-16T13:16:18.126Z', :tag => 'custom tag', :transferCallerId => '+19195554321', :transferTo => '+19195551234', :cause => 'hangup', :errorMessage => 'call rejected', :errorId => '4642074b-7b58-478b-96e4-3a60955c6765' }.to_s)
|
|
118
|
+
expect(transfer_disconnect_callback_values.to_s).to eq({ :eventType => 'transferDisconnect', :eventTime => '2022-06-16T13:15:07.160Z', :accountId => '9900000', :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :from => '+19195554321', :to => '+19195551234', :direction => 'outbound', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :callUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :parentCallId => 'c-95ac29a2-1331029c-2cb0-4a07-b215-b22865662d99', :enqueuedTime => '2022-06-16T13:15:07.160Z', :startTime => '2022-06-16T13:15:07.160Z', :answerTime => '2022-06-16T13:15:18.126Z', :endTime => '2022-06-16T13:16:18.126Z', :tag => 'custom tag', :transferCallerId => '+19195554321', :transferTo => '+19195551234', :cause => 'hangup', :errorMessage => 'call rejected', :errorId => '4642074b-7b58-478b-96e4-3a60955c6765', :sipResponseCode => 486, :sipStatusLine => 'SIP/2.0 486 Busy Here', :sipHeaders => { 'reason' => 'v=analytics1' } }.to_s)
|
|
110
119
|
end
|
|
111
120
|
end
|
|
112
121
|
|
|
@@ -139,7 +148,10 @@ describe Bandwidth::TransferDisconnectCallback do
|
|
|
139
148
|
transferTo: '+19195551234',
|
|
140
149
|
cause: 'hangup',
|
|
141
150
|
errorMessage: 'call rejected',
|
|
142
|
-
errorId: '4642074b-7b58-478b-96e4-3a60955c6765'
|
|
151
|
+
errorId: '4642074b-7b58-478b-96e4-3a60955c6765',
|
|
152
|
+
sipResponseCode: 486,
|
|
153
|
+
sipStatusLine: 'SIP/2.0 486 Busy Here',
|
|
154
|
+
sipHeaders: { 'reason' => 'v=analytics1' }
|
|
143
155
|
})
|
|
144
156
|
end
|
|
145
157
|
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:
|
|
4
|
+
version: 19.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bandwidth
|
|
@@ -307,6 +307,7 @@ files:
|
|
|
307
307
|
- docs/RbmMessageContentText.md
|
|
308
308
|
- docs/RbmMessageMedia.md
|
|
309
309
|
- docs/RbmOpenUrlEnum.md
|
|
310
|
+
- docs/RbmSession.md
|
|
310
311
|
- docs/RbmStandaloneCard.md
|
|
311
312
|
- docs/RbmSuggestionResponse.md
|
|
312
313
|
- docs/RbmWebViewEnum.md
|
|
@@ -569,6 +570,7 @@ files:
|
|
|
569
570
|
- lib/bandwidth-sdk/models/rbm_message_content_text.rb
|
|
570
571
|
- lib/bandwidth-sdk/models/rbm_message_media.rb
|
|
571
572
|
- lib/bandwidth-sdk/models/rbm_open_url_enum.rb
|
|
573
|
+
- lib/bandwidth-sdk/models/rbm_session.rb
|
|
572
574
|
- lib/bandwidth-sdk/models/rbm_standalone_card.rb
|
|
573
575
|
- lib/bandwidth-sdk/models/rbm_suggestion_response.rb
|
|
574
576
|
- lib/bandwidth-sdk/models/rbm_web_view_enum.rb
|
|
@@ -638,6 +640,7 @@ files:
|
|
|
638
640
|
- spec/smoke/multi_channel_api_spec.rb
|
|
639
641
|
- spec/smoke/phone_number_lookup_api_spec.rb
|
|
640
642
|
- spec/smoke/recordings_api_spec.rb
|
|
643
|
+
- spec/smoke/smoke_helper.rb
|
|
641
644
|
- spec/smoke/statistics_api_spec.rb
|
|
642
645
|
- spec/smoke/toll_free_verification_api_spec.rb
|
|
643
646
|
- spec/smoke/transcriptions_api_spec.rb
|
|
@@ -657,6 +660,7 @@ files:
|
|
|
657
660
|
- spec/unit/client/api_client_spec.rb
|
|
658
661
|
- spec/unit/client/api_error_spec.rb
|
|
659
662
|
- spec/unit/client/configuration_spec.rb
|
|
663
|
+
- spec/unit/constants.rb
|
|
660
664
|
- spec/unit/models/account_statistics_spec.rb
|
|
661
665
|
- spec/unit/models/additional_denial_reason_spec.rb
|
|
662
666
|
- spec/unit/models/address_spec.rb
|
|
@@ -838,6 +842,7 @@ files:
|
|
|
838
842
|
- spec/unit/models/rbm_message_content_text_spec.rb
|
|
839
843
|
- spec/unit/models/rbm_message_media_spec.rb
|
|
840
844
|
- spec/unit/models/rbm_open_url_enum_spec.rb
|
|
845
|
+
- spec/unit/models/rbm_session_spec.rb
|
|
841
846
|
- spec/unit/models/rbm_standalone_card_spec.rb
|
|
842
847
|
- spec/unit/models/rbm_suggestion_response_spec.rb
|
|
843
848
|
- spec/unit/models/rbm_web_view_enum_spec.rb
|
|
@@ -926,6 +931,7 @@ test_files:
|
|
|
926
931
|
- spec/smoke/multi_channel_api_spec.rb
|
|
927
932
|
- spec/smoke/phone_number_lookup_api_spec.rb
|
|
928
933
|
- spec/smoke/recordings_api_spec.rb
|
|
934
|
+
- spec/smoke/smoke_helper.rb
|
|
929
935
|
- spec/smoke/statistics_api_spec.rb
|
|
930
936
|
- spec/smoke/toll_free_verification_api_spec.rb
|
|
931
937
|
- spec/smoke/transcriptions_api_spec.rb
|
|
@@ -945,6 +951,7 @@ test_files:
|
|
|
945
951
|
- spec/unit/client/api_client_spec.rb
|
|
946
952
|
- spec/unit/client/api_error_spec.rb
|
|
947
953
|
- spec/unit/client/configuration_spec.rb
|
|
954
|
+
- spec/unit/constants.rb
|
|
948
955
|
- spec/unit/models/account_statistics_spec.rb
|
|
949
956
|
- spec/unit/models/additional_denial_reason_spec.rb
|
|
950
957
|
- spec/unit/models/address_spec.rb
|
|
@@ -1126,6 +1133,7 @@ test_files:
|
|
|
1126
1133
|
- spec/unit/models/rbm_message_content_text_spec.rb
|
|
1127
1134
|
- spec/unit/models/rbm_message_media_spec.rb
|
|
1128
1135
|
- spec/unit/models/rbm_open_url_enum_spec.rb
|
|
1136
|
+
- spec/unit/models/rbm_session_spec.rb
|
|
1129
1137
|
- spec/unit/models/rbm_standalone_card_spec.rb
|
|
1130
1138
|
- spec/unit/models/rbm_suggestion_response_spec.rb
|
|
1131
1139
|
- spec/unit/models/rbm_web_view_enum_spec.rb
|