bandwidth-sdk 16.0.0 → 16.2.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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +3 -0
  4. data/bandwidth.yml +254 -0
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +505 -1
  7. data/coverage/index.html +6442 -1076
  8. data/docs/BusinessEntityTypeEnum.md +15 -0
  9. data/docs/BusinessRegistrationTypeEnum.md +15 -0
  10. data/docs/ListMessageItem.md +13 -1
  11. data/docs/MessagesApi.md +24 -0
  12. data/docs/OptInWorkflow.md +3 -1
  13. data/docs/ProductTypeEnum.md +15 -0
  14. data/docs/RbmActionBase.md +1 -1
  15. data/docs/RbmSuggestionResponse.md +1 -1
  16. data/docs/TfvSubmissionInfo.md +7 -1
  17. data/docs/VerificationRequest.md +11 -1
  18. data/docs/VerificationUpdateRequest.md +11 -1
  19. data/lib/bandwidth-sdk/api/messages_api.rb +36 -0
  20. data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +43 -0
  21. data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +40 -0
  22. data/lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb +10 -8
  23. data/lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb +2 -1
  24. data/lib/bandwidth-sdk/models/list_message_item.rb +71 -5
  25. data/lib/bandwidth-sdk/models/message_type_enum.rb +2 -1
  26. data/lib/bandwidth-sdk/models/opt_in_workflow.rb +38 -4
  27. data/lib/bandwidth-sdk/models/product_type_enum.rb +47 -0
  28. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +72 -4
  29. data/lib/bandwidth-sdk/models/verification_request.rb +108 -4
  30. data/lib/bandwidth-sdk/models/verification_update_request.rb +108 -4
  31. data/lib/bandwidth-sdk/version.rb +1 -1
  32. data/lib/bandwidth-sdk.rb +3 -0
  33. data/spec/smoke/messages_api_spec.rb +2 -1
  34. data/spec/spec_helper.rb +3 -2
  35. data/spec/unit/api/messages_api_spec.rb +6 -0
  36. data/spec/unit/models/bxml/verbs/start_stream_spec.rb +9 -5
  37. data/spec/unit/models/bxml/verbs/stop_stream_spec.rb +6 -4
  38. metadata +56 -50
@@ -76,7 +76,8 @@ describe 'MessagesApi Integration Tests' do
76
76
  it 'lists messages' do
77
77
  get_opts = {
78
78
  source_tn: BW_NUMBER,
79
- message_direction: list_message_direction
79
+ message_direction: list_message_direction,
80
+ calling_number_country_a3: 'USA'
80
81
  }
81
82
  data, status_code = @messaging_api_instance.list_messages_with_http_info(BW_ACCOUNT_ID, get_opts)
82
83
 
data/spec/spec_helper.rb CHANGED
@@ -9,9 +9,10 @@ SimpleCov.start do
9
9
  else
10
10
  !(['/models/call_state_enum.rb',
11
11
  '/models/call_state.rb',
12
- '/models/deferred_result.rb',
12
+ '/models/tfv_error.rb',
13
13
  '/models/message.rb',
14
- '/models/verify_code_request.rb'
14
+ '/models/verify_code_request.rb',
15
+ '/models/verify_code_response.rb'
15
16
  ].any? { |name| source_file.filename.include?(name) })
16
17
  end
17
18
  end
@@ -75,6 +75,7 @@ describe 'MessagesApi' do
75
75
  expect(data.page_info.prev_page_token).to be_instance_of(String)
76
76
  expect(data.page_info.next_page_token).to be_instance_of(String)
77
77
  expect(data.messages).to be_instance_of(Array)
78
+ expect(data.messages[0]).to be_instance_of(Bandwidth::ListMessageItem)
78
79
  expect(data.messages[0].message_id.length).to eq(29)
79
80
  expect(data.messages[0].account_id.length).to eq(7)
80
81
  expect(data.messages[0].source_tn.length).to eq(12)
@@ -92,6 +93,11 @@ describe 'MessagesApi' do
92
93
  expect(data.messages[0].recipient_count).to be_instance_of(Integer)
93
94
  expect(data.messages[0].campaign_class).to be_instance_of(String)
94
95
  expect(data.messages[0].campaign_id).to be_instance_of(String)
96
+ expect(data.messages[0].bw_latency).to be_instance_of(Integer)
97
+ expect(data.messages[0].calling_number_country_a3).to be_instance_of(String)
98
+ expect(data.messages[0].called_number_country_a3).to be_instance_of(String)
99
+ expect(data.messages[0].product).to be_one_of(Bandwidth::ProductTypeEnum.all_vars)
100
+ expect(data.messages[0].location).to be_instance_of(String)
95
101
  end
96
102
 
97
103
  it 'causes an ArgumentError for a missing account_id' do
@@ -6,6 +6,8 @@ describe 'Bandwidth::Bxml::StartStream' do
6
6
  mode: 'unidirectional',
7
7
  tracks: 'inbound',
8
8
  destination: 'https://initial.com',
9
+ destination_username: 'initial_destination_username',
10
+ destination_password: 'initial_destination_password',
9
11
  stream_event_url: 'https://initial.com',
10
12
  stream_event_method: 'POST',
11
13
  username: 'initial_username',
@@ -19,6 +21,8 @@ describe 'Bandwidth::Bxml::StartStream' do
19
21
  mode: 'bidirectional',
20
22
  tracks: 'outbound',
21
23
  destination: 'https://new.com',
24
+ destination_username: 'new_destination_username',
25
+ destination_password: 'new_destination_password',
22
26
  stream_event_url: 'https://new.com',
23
27
  stream_event_method: 'GET',
24
28
  username: 'new_username',
@@ -39,13 +43,13 @@ describe 'Bandwidth::Bxml::StartStream' do
39
43
  end
40
44
 
41
45
  it 'tests the to_bxml method of the StartStream instance' do
42
- expected = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" streamEventUrl=\"https://initial.com\" streamEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\"/>\n"
46
+ expected = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" destination_username=\"initial_destination_username\" destination_password=\"initial_destination_password\" streamEventUrl=\"https://initial.com\" streamEventMethod=\"POST\" username=\"initial_username\" password=\"initial_password\"/>\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 StartStream instance' do
47
51
  instance.set_attributes(new_attributes)
48
- expected = "\n<StartStream name=\"new_name\" mode=\"bidirectional\" tracks=\"outbound\" destination=\"https://new.com\" streamEventUrl=\"https://new.com\" streamEventMethod=\"GET\" username=\"new_username\" password=\"new_password\"/>\n"
52
+ expected = "\n<StartStream name=\"new_name\" mode=\"bidirectional\" tracks=\"outbound\" destination=\"https://new.com\" destination_username=\"new_destination_username\" destination_password=\"new_destination_password\" streamEventUrl=\"https://new.com\" streamEventMethod=\"GET\" username=\"new_username\" password=\"new_password\"/>\n"
49
53
  expect(instance.to_bxml).to eq(expected)
50
54
  end
51
55
  end
@@ -57,16 +61,16 @@ describe 'Bandwidth::Bxml::StartStream' do
57
61
  end
58
62
 
59
63
  it 'tests the to_bxml method of the nested StartStream instance' do
60
- expected = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" 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"
64
+ expected = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" destination_username=\"initial_destination_username\" destination_password=\"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"
61
65
  expect(instance_nested.to_bxml).to eq(expected)
62
66
  end
63
67
 
64
68
  it 'tests the add_stream_param method of the nested StartStream instance' do
65
- expected_single = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" 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"
69
+ expected_single = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" destination_username=\"initial_destination_username\" destination_password=\"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"
66
70
  instance_nested.add_stream_params(stream_param_2)
67
71
  expect(instance_nested.to_bxml).to eq(expected_single)
68
72
 
69
- expected_multiple = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" 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"
73
+ expected_multiple = "\n<StartStream name=\"initial_name\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"https://initial.com\" destination_username=\"initial_destination_username\" destination_password=\"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"
70
74
  instance_nested.add_stream_params([stream_param_2, stream_param_2])
71
75
  expect(instance_nested.to_bxml).to eq(expected_multiple)
72
76
  end
@@ -2,13 +2,15 @@
2
2
  describe 'Bandwidth::Bxml::StopStream' do
3
3
  let(:initial_attributes) {
4
4
  {
5
- name: 'initial_name'
5
+ name: 'initial_name',
6
+ wait: true
6
7
  }
7
8
  }
8
9
 
9
10
  let(:new_attributes) {
10
11
  {
11
- name: 'new_name'
12
+ name: 'new_name',
13
+ wait: false
12
14
  }
13
15
  }
14
16
 
@@ -21,13 +23,13 @@ describe 'Bandwidth::Bxml::StopStream' do
21
23
  end
22
24
 
23
25
  it 'tests the to_bxml method of the StopStream instance' do
24
- expected = "\n<StopStream name=\"initial_name\"/>\n"
26
+ expected = "\n<StopStream name=\"initial_name\" wait=\"true\"/>\n"
25
27
  expect(instance.to_bxml).to eq(expected)
26
28
  end
27
29
 
28
30
  it 'tests the set_attributes method of the StopStream instance' do
29
31
  instance.set_attributes(new_attributes)
30
- expected = "\n<StopStream name=\"new_name\"/>\n"
32
+ expected = "\n<StopStream name=\"new_name\" wait=\"false\"/>\n"
31
33
  expect(instance.to_bxml).to eq(expected)
32
34
  end
33
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bandwidth-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.0.0
4
+ version: 16.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bandwidth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-05 00:00:00.000000000 Z
11
+ date: 2025-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -150,6 +150,8 @@ files:
150
150
  - docs/BlockedWebhook.md
151
151
  - docs/BridgeCompleteCallback.md
152
152
  - docs/BridgeTargetCompleteCallback.md
153
+ - docs/BusinessEntityTypeEnum.md
154
+ - docs/BusinessRegistrationTypeEnum.md
153
155
  - docs/CallDirectionEnum.md
154
156
  - docs/CallRecordingMetadata.md
155
157
  - docs/CallState.md
@@ -239,6 +241,7 @@ files:
239
241
  - docs/PageInfo.md
240
242
  - docs/PhoneNumberLookupApi.md
241
243
  - docs/PriorityEnum.md
244
+ - docs/ProductTypeEnum.md
242
245
  - docs/RbmActionBase.md
243
246
  - docs/RbmActionDial.md
244
247
  - docs/RbmActionOpenUrl.md
@@ -328,6 +331,8 @@ files:
328
331
  - lib/bandwidth-sdk/models/blocked_webhook.rb
329
332
  - lib/bandwidth-sdk/models/bridge_complete_callback.rb
330
333
  - lib/bandwidth-sdk/models/bridge_target_complete_callback.rb
334
+ - lib/bandwidth-sdk/models/business_entity_type_enum.rb
335
+ - lib/bandwidth-sdk/models/business_registration_type_enum.rb
331
336
  - lib/bandwidth-sdk/models/bxml/bxml.rb
332
337
  - lib/bandwidth-sdk/models/bxml/nestable_verb.rb
333
338
  - lib/bandwidth-sdk/models/bxml/response.rb
@@ -443,6 +448,7 @@ files:
443
448
  - lib/bandwidth-sdk/models/opt_in_workflow.rb
444
449
  - lib/bandwidth-sdk/models/page_info.rb
445
450
  - lib/bandwidth-sdk/models/priority_enum.rb
451
+ - lib/bandwidth-sdk/models/product_type_enum.rb
446
452
  - lib/bandwidth-sdk/models/rbm_action_base.rb
447
453
  - lib/bandwidth-sdk/models/rbm_action_dial.rb
448
454
  - lib/bandwidth-sdk/models/rbm_action_open_url.rb
@@ -600,67 +606,67 @@ summary: Bandwidth Ruby SDK
600
606
  test_files:
601
607
  - spec/call_utils.rb
602
608
  - spec/fixtures/ruby_cat.jpeg
609
+ - spec/smoke/phone_number_lookup_api_spec.rb
610
+ - spec/smoke/transcriptions_api_spec.rb
611
+ - spec/smoke/toll_free_verification_api_spec.rb
603
612
  - spec/smoke/multi_channel_api_spec.rb
613
+ - spec/smoke/messages_api_spec.rb
604
614
  - spec/smoke/conferences_api_spec.rb
605
- - spec/smoke/media_api_spec.rb
606
- - spec/smoke/transcriptions_api_spec.rb
607
- - spec/smoke/calls_api_spec.rb
608
615
  - spec/smoke/recordings_api_spec.rb
609
616
  - spec/smoke/mfa_api_spec.rb
610
617
  - spec/smoke/statistics_api_spec.rb
611
- - spec/smoke/toll_free_verification_api_spec.rb
612
- - spec/smoke/phone_number_lookup_api_spec.rb
613
- - spec/smoke/messages_api_spec.rb
618
+ - spec/smoke/calls_api_spec.rb
619
+ - spec/smoke/media_api_spec.rb
614
620
  - spec/spec_helper.rb
615
- - spec/unit/models/tfv_error_spec.rb
616
- - spec/unit/models/call_state_enum_spec.rb
621
+ - spec/unit/api/phone_number_lookup_api_spec.rb
622
+ - spec/unit/api/transcriptions_api_spec.rb
623
+ - spec/unit/api/toll_free_verification_api_spec.rb
624
+ - spec/unit/api/multi_channel_api_spec.rb
625
+ - spec/unit/api/messages_api_spec.rb
626
+ - spec/unit/api/conferences_api_spec.rb
627
+ - spec/unit/api/recordings_api_spec.rb
628
+ - spec/unit/api/mfa_api_spec.rb
629
+ - spec/unit/api/statistics_api_spec.rb
630
+ - spec/unit/api/calls_api_spec.rb
631
+ - spec/unit/api/media_api_spec.rb
632
+ - spec/unit/client/api_error_spec.rb
633
+ - spec/unit/client/configuration_spec.rb
634
+ - spec/unit/client/api_client_spec.rb
617
635
  - spec/unit/models/verify_code_request_spec.rb
618
- - spec/unit/models/bxml/response_spec.rb
619
- - spec/unit/models/bxml/verb_spec.rb
620
- - spec/unit/models/bxml/nestable_verb_spec.rb
621
- - spec/unit/models/bxml/bxml_spec.rb
622
- - spec/unit/models/bxml/verbs/sip_uri_spec.rb
623
- - spec/unit/models/bxml/verbs/custom_param_spec.rb
636
+ - spec/unit/models/call_state_spec.rb
637
+ - spec/unit/models/tfv_error_spec.rb
638
+ - spec/unit/models/bxml/verbs/gather_spec.rb
639
+ - spec/unit/models/bxml/verbs/stop_recording_spec.rb
640
+ - spec/unit/models/bxml/verbs/stop_transcription_spec.rb
641
+ - spec/unit/models/bxml/verbs/ring_spec.rb
642
+ - spec/unit/models/bxml/verbs/resume_recording_spec.rb
624
643
  - spec/unit/models/bxml/verbs/record_spec.rb
625
- - spec/unit/models/bxml/verbs/forward_spec.rb
626
- - spec/unit/models/bxml/verbs/phone_number_spec.rb
644
+ - spec/unit/models/bxml/verbs/start_stream_spec.rb
645
+ - spec/unit/models/bxml/verbs/pause_spec.rb
646
+ - spec/unit/models/bxml/verbs/start_gather_spec.rb
627
647
  - spec/unit/models/bxml/verbs/hangup_spec.rb
628
- - spec/unit/models/bxml/verbs/stop_transcription_spec.rb
629
648
  - spec/unit/models/bxml/verbs/redirect_spec.rb
630
- - spec/unit/models/bxml/verbs/pause_recording_spec.rb
649
+ - spec/unit/models/bxml/verbs/bridge_spec.rb
650
+ - spec/unit/models/bxml/verbs/start_transcription_spec.rb
651
+ - spec/unit/models/bxml/verbs/custom_param_spec.rb
652
+ - spec/unit/models/bxml/verbs/conference_spec.rb
631
653
  - spec/unit/models/bxml/verbs/stop_gather_spec.rb
654
+ - spec/unit/models/bxml/verbs/pause_recording_spec.rb
655
+ - spec/unit/models/bxml/verbs/sip_uri_spec.rb
656
+ - spec/unit/models/bxml/verbs/forward_spec.rb
657
+ - spec/unit/models/bxml/verbs/play_audio_spec.rb
632
658
  - spec/unit/models/bxml/verbs/stop_stream_spec.rb
633
- - spec/unit/models/bxml/verbs/start_stream_spec.rb
634
- - spec/unit/models/bxml/verbs/stream_param_spec.rb
659
+ - spec/unit/models/bxml/verbs/transfer_spec.rb
660
+ - spec/unit/models/bxml/verbs/send_dtmf_spec.rb
635
661
  - spec/unit/models/bxml/verbs/speak_sentence_spec.rb
636
- - spec/unit/models/bxml/verbs/stop_recording_spec.rb
637
- - spec/unit/models/bxml/verbs/pause_spec.rb
638
- - spec/unit/models/bxml/verbs/resume_recording_spec.rb
639
- - spec/unit/models/bxml/verbs/play_audio_spec.rb
640
662
  - spec/unit/models/bxml/verbs/tag_spec.rb
641
- - spec/unit/models/bxml/verbs/bridge_spec.rb
663
+ - spec/unit/models/bxml/verbs/stream_param_spec.rb
642
664
  - spec/unit/models/bxml/verbs/start_recording_spec.rb
643
- - spec/unit/models/bxml/verbs/transfer_spec.rb
644
- - spec/unit/models/bxml/verbs/conference_spec.rb
645
- - spec/unit/models/bxml/verbs/start_transcription_spec.rb
646
- - spec/unit/models/bxml/verbs/send_dtmf_spec.rb
647
- - spec/unit/models/bxml/verbs/start_gather_spec.rb
648
- - spec/unit/models/bxml/verbs/gather_spec.rb
649
- - spec/unit/models/bxml/verbs/ring_spec.rb
650
- - spec/unit/models/message_spec.rb
651
- - spec/unit/models/call_state_spec.rb
665
+ - spec/unit/models/bxml/verbs/phone_number_spec.rb
666
+ - spec/unit/models/bxml/verb_spec.rb
667
+ - spec/unit/models/bxml/bxml_spec.rb
668
+ - spec/unit/models/bxml/response_spec.rb
669
+ - spec/unit/models/bxml/nestable_verb_spec.rb
670
+ - spec/unit/models/call_state_enum_spec.rb
652
671
  - spec/unit/models/verify_code_response_spec.rb
653
- - spec/unit/client/api_client_spec.rb
654
- - spec/unit/client/api_error_spec.rb
655
- - spec/unit/client/configuration_spec.rb
656
- - spec/unit/api/multi_channel_api_spec.rb
657
- - spec/unit/api/conferences_api_spec.rb
658
- - spec/unit/api/media_api_spec.rb
659
- - spec/unit/api/transcriptions_api_spec.rb
660
- - spec/unit/api/calls_api_spec.rb
661
- - spec/unit/api/recordings_api_spec.rb
662
- - spec/unit/api/mfa_api_spec.rb
663
- - spec/unit/api/statistics_api_spec.rb
664
- - spec/unit/api/toll_free_verification_api_spec.rb
665
- - spec/unit/api/phone_number_lookup_api_spec.rb
666
- - spec/unit/api/messages_api_spec.rb
672
+ - spec/unit/models/message_spec.rb