bandwidth-sdk 18.3.0 → 19.0.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 +27 -21
- data/README.md +2 -11
- data/Rakefile +1 -1
- data/bandwidth.yml +341 -122
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +1308 -939
- data/coverage/index.html +21197 -17030
- data/custom_templates/README.mustache +1 -1
- data/custom_templates/api_client.mustache +3 -1
- data/custom_templates/configuration.mustache +18 -12
- data/custom_templates/gem.mustache +4 -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 +7 -23
- 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/TfvSubmissionInfo.md +2 -2
- data/docs/TollFreeVerificationApi.md +12 -48
- data/docs/TranscriptionsApi.md +3 -15
- data/docs/TransferDisconnectCallback.md +7 -1
- data/docs/VerificationRequest.md +2 -2
- data/docs/VerificationUpdateRequest.md +3 -3
- data/generate.sh +9 -0
- 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 +8 -8
- 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 +15 -15
- 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/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/tfv_submission_info.rb +2 -2
- data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +37 -5
- data/lib/bandwidth-sdk/models/verification_request.rb +2 -2
- data/lib/bandwidth-sdk/models/verification_update_request.rb +19 -2
- 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/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/tfv_submission_wrapper_spec.rb +2 -1
- data/spec/unit/models/transfer_disconnect_callback_spec.rb +16 -4
- data/spec/unit/models/verification_update_request_spec.rb +4 -2
- metadata +10 -1
|
@@ -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
|
|
@@ -44,7 +44,8 @@ describe Bandwidth::TfvSubmissionWrapper do
|
|
|
44
44
|
optInWorkflow: { description: 'opt-in via website', imageUrls: ['https://example.com/optin.png'] },
|
|
45
45
|
privacyPolicyUrl: 'https://example.com/privacy',
|
|
46
46
|
termsAndConditionsUrl: 'https://example.com/terms',
|
|
47
|
-
businessDba: 'Bandwidth Inc'
|
|
47
|
+
businessDba: 'Bandwidth Inc',
|
|
48
|
+
businessEntityType: Bandwidth::BusinessEntityTypeEnum::PRIVATE_PROFIT
|
|
48
49
|
}
|
|
49
50
|
})
|
|
50
51
|
expect(tfv_submission_wrapper_from_hash).to be_instance_of(Bandwidth::TfvSubmissionWrapper)
|
|
@@ -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
|
|
@@ -7,7 +7,8 @@ describe Bandwidth::VerificationUpdateRequest do
|
|
|
7
7
|
use_case: 'baseline use case',
|
|
8
8
|
use_case_summary: 'baseline summary',
|
|
9
9
|
production_message_content: 'baseline message',
|
|
10
|
-
opt_in_workflow: { description: 'baseline opt-in', imageUrls: [] }
|
|
10
|
+
opt_in_workflow: { description: 'baseline opt-in', imageUrls: [] },
|
|
11
|
+
business_entity_type: Bandwidth::BusinessEntityTypeEnum::PRIVATE_PROFIT
|
|
11
12
|
}) }
|
|
12
13
|
let(:verification_update_request_values) { Bandwidth::VerificationUpdateRequest.new({
|
|
13
14
|
business_address: { name: 'Bandwidth' },
|
|
@@ -126,7 +127,8 @@ describe Bandwidth::VerificationUpdateRequest do
|
|
|
126
127
|
use_case: 'baseline use case',
|
|
127
128
|
use_case_summary: 'baseline summary',
|
|
128
129
|
production_message_content: 'baseline message',
|
|
129
|
-
opt_in_workflow: { description: 'baseline opt-in', imageUrls: [] }
|
|
130
|
+
opt_in_workflow: { description: 'baseline opt-in', imageUrls: [] },
|
|
131
|
+
business_entity_type: Bandwidth::BusinessEntityTypeEnum::PRIVATE_PROFIT
|
|
130
132
|
})
|
|
131
133
|
expect(verification_update_request_default.eql?(verification_update_request_equal)).to be true
|
|
132
134
|
expect(verification_update_request_default.eql?(verification_update_request_values)).to be false
|
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.0.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
|
|
@@ -367,6 +368,7 @@ files:
|
|
|
367
368
|
- docs/WebhookSubscriptionTypeEnum.md
|
|
368
369
|
- docs/WebhookSubscriptionsListBody.md
|
|
369
370
|
- generate-model-tests.sh
|
|
371
|
+
- generate.sh
|
|
370
372
|
- git_push.sh
|
|
371
373
|
- lib/bandwidth-sdk.rb
|
|
372
374
|
- lib/bandwidth-sdk/api/calls_api.rb
|
|
@@ -568,6 +570,7 @@ files:
|
|
|
568
570
|
- lib/bandwidth-sdk/models/rbm_message_content_text.rb
|
|
569
571
|
- lib/bandwidth-sdk/models/rbm_message_media.rb
|
|
570
572
|
- lib/bandwidth-sdk/models/rbm_open_url_enum.rb
|
|
573
|
+
- lib/bandwidth-sdk/models/rbm_session.rb
|
|
571
574
|
- lib/bandwidth-sdk/models/rbm_standalone_card.rb
|
|
572
575
|
- lib/bandwidth-sdk/models/rbm_suggestion_response.rb
|
|
573
576
|
- lib/bandwidth-sdk/models/rbm_web_view_enum.rb
|
|
@@ -637,6 +640,7 @@ files:
|
|
|
637
640
|
- spec/smoke/multi_channel_api_spec.rb
|
|
638
641
|
- spec/smoke/phone_number_lookup_api_spec.rb
|
|
639
642
|
- spec/smoke/recordings_api_spec.rb
|
|
643
|
+
- spec/smoke/smoke_helper.rb
|
|
640
644
|
- spec/smoke/statistics_api_spec.rb
|
|
641
645
|
- spec/smoke/toll_free_verification_api_spec.rb
|
|
642
646
|
- spec/smoke/transcriptions_api_spec.rb
|
|
@@ -656,6 +660,7 @@ files:
|
|
|
656
660
|
- spec/unit/client/api_client_spec.rb
|
|
657
661
|
- spec/unit/client/api_error_spec.rb
|
|
658
662
|
- spec/unit/client/configuration_spec.rb
|
|
663
|
+
- spec/unit/constants.rb
|
|
659
664
|
- spec/unit/models/account_statistics_spec.rb
|
|
660
665
|
- spec/unit/models/additional_denial_reason_spec.rb
|
|
661
666
|
- spec/unit/models/address_spec.rb
|
|
@@ -837,6 +842,7 @@ files:
|
|
|
837
842
|
- spec/unit/models/rbm_message_content_text_spec.rb
|
|
838
843
|
- spec/unit/models/rbm_message_media_spec.rb
|
|
839
844
|
- spec/unit/models/rbm_open_url_enum_spec.rb
|
|
845
|
+
- spec/unit/models/rbm_session_spec.rb
|
|
840
846
|
- spec/unit/models/rbm_standalone_card_spec.rb
|
|
841
847
|
- spec/unit/models/rbm_suggestion_response_spec.rb
|
|
842
848
|
- spec/unit/models/rbm_web_view_enum_spec.rb
|
|
@@ -925,6 +931,7 @@ test_files:
|
|
|
925
931
|
- spec/smoke/multi_channel_api_spec.rb
|
|
926
932
|
- spec/smoke/phone_number_lookup_api_spec.rb
|
|
927
933
|
- spec/smoke/recordings_api_spec.rb
|
|
934
|
+
- spec/smoke/smoke_helper.rb
|
|
928
935
|
- spec/smoke/statistics_api_spec.rb
|
|
929
936
|
- spec/smoke/toll_free_verification_api_spec.rb
|
|
930
937
|
- spec/smoke/transcriptions_api_spec.rb
|
|
@@ -944,6 +951,7 @@ test_files:
|
|
|
944
951
|
- spec/unit/client/api_client_spec.rb
|
|
945
952
|
- spec/unit/client/api_error_spec.rb
|
|
946
953
|
- spec/unit/client/configuration_spec.rb
|
|
954
|
+
- spec/unit/constants.rb
|
|
947
955
|
- spec/unit/models/account_statistics_spec.rb
|
|
948
956
|
- spec/unit/models/additional_denial_reason_spec.rb
|
|
949
957
|
- spec/unit/models/address_spec.rb
|
|
@@ -1125,6 +1133,7 @@ test_files:
|
|
|
1125
1133
|
- spec/unit/models/rbm_message_content_text_spec.rb
|
|
1126
1134
|
- spec/unit/models/rbm_message_media_spec.rb
|
|
1127
1135
|
- spec/unit/models/rbm_open_url_enum_spec.rb
|
|
1136
|
+
- spec/unit/models/rbm_session_spec.rb
|
|
1128
1137
|
- spec/unit/models/rbm_standalone_card_spec.rb
|
|
1129
1138
|
- spec/unit/models/rbm_suggestion_response_spec.rb
|
|
1130
1139
|
- spec/unit/models/rbm_web_view_enum_spec.rb
|