bandwidth-sdk 18.1.4 → 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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +24 -24
  3. data/README.md +2 -0
  4. data/bandwidth.yml +65 -4
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +1167 -384
  7. data/coverage/index.html +15779 -7307
  8. data/custom_templates/configuration.mustache +6 -2
  9. data/custom_templates/gem.mustache +1 -0
  10. data/docs/AnswerCallback.md +1 -1
  11. data/docs/BridgeCompleteCallback.md +1 -1
  12. data/docs/BridgeTargetCompleteCallback.md +1 -1
  13. data/docs/ConferenceCompletedCallback.md +1 -1
  14. data/docs/ConferenceCreatedCallback.md +1 -1
  15. data/docs/ConferenceMemberExitCallback.md +1 -1
  16. data/docs/ConferenceMemberJoinCallback.md +1 -1
  17. data/docs/ConferenceRecordingAvailableCallback.md +1 -1
  18. data/docs/ConferenceRedirectCallback.md +1 -1
  19. data/docs/DisconnectCallback.md +1 -1
  20. data/docs/DtmfCallback.md +1 -1
  21. data/docs/GatherCallback.md +1 -1
  22. data/docs/InitiateCallback.md +1 -1
  23. data/docs/MachineDetectionCompleteCallback.md +1 -1
  24. data/docs/MediaApi.md +6 -6
  25. data/docs/RbmActionBase.md +1 -1
  26. data/docs/RbmSuggestionResponse.md +1 -1
  27. data/docs/RecordingAvailableCallback.md +1 -1
  28. data/docs/RecordingCompleteCallback.md +1 -1
  29. data/docs/RedirectCallback.md +1 -1
  30. data/docs/ReferCallStatusEnum.md +15 -0
  31. data/docs/ReferCompleteCallback.md +46 -0
  32. data/docs/TranscriptionAvailableCallback.md +1 -1
  33. data/docs/TransferAnswerCallback.md +1 -1
  34. data/docs/TransferCompleteCallback.md +1 -1
  35. data/docs/TransferDisconnectCallback.md +1 -1
  36. data/lib/bandwidth-sdk/api/media_api.rb +6 -6
  37. data/lib/bandwidth-sdk/configuration.rb +6 -2
  38. data/lib/bandwidth-sdk/models/answer_callback.rb +1 -1
  39. data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +1 -1
  40. data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +1 -1
  41. data/lib/bandwidth-sdk/models/bxml/verbs/connect.rb +23 -0
  42. data/lib/bandwidth-sdk/models/bxml/verbs/endpoint.rb +11 -0
  43. data/lib/bandwidth-sdk/models/bxml/verbs/forward.rb +2 -0
  44. data/lib/bandwidth-sdk/models/bxml/verbs/gather.rb +22 -14
  45. data/lib/bandwidth-sdk/models/bxml/verbs/record.rb +2 -0
  46. data/lib/bandwidth-sdk/models/bxml/verbs/refer.rb +24 -0
  47. data/lib/bandwidth-sdk/models/bxml/verbs/sip_uri.rb +3 -1
  48. data/lib/bandwidth-sdk/models/bxml/verbs/start_recording.rb +2 -0
  49. data/lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb +2 -2
  50. data/lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb +2 -0
  51. data/lib/bandwidth-sdk/models/bxml/verbs/transfer.rb +1 -0
  52. data/lib/bandwidth-sdk/models/conference_completed_callback.rb +1 -1
  53. data/lib/bandwidth-sdk/models/conference_created_callback.rb +1 -1
  54. data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +1 -1
  55. data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +1 -1
  56. data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +1 -1
  57. data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +1 -1
  58. data/lib/bandwidth-sdk/models/disconnect_callback.rb +1 -1
  59. data/lib/bandwidth-sdk/models/dtmf_callback.rb +1 -1
  60. data/lib/bandwidth-sdk/models/gather_callback.rb +1 -1
  61. data/lib/bandwidth-sdk/models/initiate_callback.rb +1 -1
  62. data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +1 -1
  63. data/lib/bandwidth-sdk/models/recording_available_callback.rb +1 -1
  64. data/lib/bandwidth-sdk/models/recording_complete_callback.rb +1 -1
  65. data/lib/bandwidth-sdk/models/redirect_callback.rb +1 -1
  66. data/lib/bandwidth-sdk/models/refer_call_status_enum.rb +40 -0
  67. data/lib/bandwidth-sdk/models/refer_complete_callback.rb +309 -0
  68. data/lib/bandwidth-sdk/models/transcription_available_callback.rb +1 -1
  69. data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +1 -1
  70. data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +1 -1
  71. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +1 -1
  72. data/lib/bandwidth-sdk/version.rb +1 -1
  73. data/lib/bandwidth-sdk.rb +5 -0
  74. data/spec/smoke/media_api_spec.rb +2 -2
  75. data/spec/smoke/messages_api_spec.rb +2 -2
  76. data/spec/unit/api/calls_api_spec.rb +1 -2
  77. data/spec/unit/api/conferences_api_spec.rb +1 -2
  78. data/spec/unit/api/endpoints_api_spec.rb +1 -2
  79. data/spec/unit/api/media_api_spec.rb +1 -2
  80. data/spec/unit/api/messages_api_spec.rb +1 -2
  81. data/spec/unit/api/mfa_api_spec.rb +1 -2
  82. data/spec/unit/api/multi_channel_api_spec.rb +1 -2
  83. data/spec/unit/api/phone_number_lookup_api_spec.rb +1 -2
  84. data/spec/unit/api/recordings_api_spec.rb +1 -2
  85. data/spec/unit/api/statistics_api_spec.rb +1 -2
  86. data/spec/unit/api/toll_free_verification_api_spec.rb +1 -2
  87. data/spec/unit/api/transcriptions_api_spec.rb +1 -2
  88. data/spec/unit/models/bxml/verbs/connect_spec.rb +62 -0
  89. data/spec/unit/models/bxml/verbs/endpoint_spec.rb +16 -0
  90. data/spec/unit/models/bxml/verbs/forward_spec.rb +6 -2
  91. data/spec/unit/models/bxml/verbs/gather_spec.rb +23 -7
  92. data/spec/unit/models/bxml/verbs/record_spec.rb +8 -4
  93. data/spec/unit/models/bxml/verbs/refer_spec.rb +54 -0
  94. data/spec/unit/models/bxml/verbs/start_recording_spec.rb +8 -4
  95. data/spec/unit/models/bxml/verbs/start_stream_spec.rb +5 -5
  96. data/spec/unit/models/bxml/verbs/start_transcription_spec.rb +11 -7
  97. data/spec/unit/models/bxml/verbs/transfer_spec.rb +7 -5
  98. data/spec/unit/models/refer_call_status_enum_spec.rb +31 -0
  99. data/spec/unit/models/refer_complete_callback_spec.rb +123 -0
  100. metadata +19 -2
@@ -65,6 +65,10 @@ module {{moduleName}}
65
65
  # Defines the access token (Bearer) used with OAuth2.
66
66
  attr_accessor :access_token
67
67
 
68
+ # Defines the URL used to obtain access tokens (Bearer) used with OAuth2.
69
+ # @return [String]
70
+ attr_accessor :access_token_url
71
+
68
72
  # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
69
73
  # Overrides the access_token if set
70
74
  # @return [Proc]
@@ -175,6 +179,7 @@ module {{moduleName}}
175
179
  {{#authMethods}}
176
180
  {{#isOAuth}}
177
181
  @access_token_expiration = nil
182
+ @access_token_url = '{{tokenUrl}}'
178
183
  @access_token_getter = Proc.new {
179
184
  access_token_valid = @access_token && (@access_token_expiration.nil? || @access_token_expiration > Time.now + 60)
180
185
  next @access_token if access_token_valid
@@ -182,9 +187,8 @@ module {{moduleName}}
182
187
 
183
188
  puts "Refreshing access token..." if @debugging
184
189
  # obtain new access token using client credentials
185
- token_url = '{{tokenUrl}}'
186
190
  auth_header = 'Basic ' + ["#{@client_id}:#{@client_secret}"].pack('m').delete("\r\n")
187
- conn = Faraday.new(url: token_url) do |faraday|
191
+ conn = Faraday.new(url: @access_token_url) do |faraday|
188
192
  faraday.request :url_encoded
189
193
  faraday.adapter Faraday.default_adapter
190
194
  end
@@ -53,6 +53,7 @@ require 'bandwidth-sdk/models/bxml/verbs/phone_number'
53
53
  require 'bandwidth-sdk/models/bxml/verbs/play_audio'
54
54
  require 'bandwidth-sdk/models/bxml/verbs/record'
55
55
  require 'bandwidth-sdk/models/bxml/verbs/redirect'
56
+ require 'bandwidth-sdk/models/bxml/verbs/refer'
56
57
  require 'bandwidth-sdk/models/bxml/verbs/resume_recording'
57
58
  require 'bandwidth-sdk/models/bxml/verbs/ring'
58
59
  require 'bandwidth-sdk/models/bxml/verbs/send_dtmf'
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **conference_id** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] |
10
10
  | **name** | **String** | The user-specified name of the conference that was recorded | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **conference_id** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] |
10
10
  | **name** | **String** | The user-specified name of the conference that was recorded | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **conference_id** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] |
10
10
  | **name** | **String** | The user-specified name of the conference that was recorded | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **conference_id** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] |
10
10
  | **name** | **String** | The user-specified name of the conference that was recorded | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **conference_id** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] |
10
10
  | **name** | **String** | The user-specified name of the conference that was recorded | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **conference_id** | **String** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] |
10
10
  | **name** | **String** | The user-specified name of the conference that was recorded | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
data/docs/DtmfCallback.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
data/docs/MediaApi.md CHANGED
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  api_instance = Bandwidth::MediaApi.new
37
37
  account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
38
- media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve.
38
+ media_id = 'bw.png' # String | The ID of the media file.
39
39
 
40
40
  begin
41
41
  # Delete Media
@@ -68,7 +68,7 @@ end
68
68
  | Name | Type | Description | Notes |
69
69
  | ---- | ---- | ----------- | ----- |
70
70
  | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | |
71
- | **media_id** | **String** | Media ID to retrieve. | |
71
+ | **media_id** | **String** | The ID of the media file. | |
72
72
 
73
73
  ### Return type
74
74
 
@@ -109,7 +109,7 @@ end
109
109
 
110
110
  api_instance = Bandwidth::MediaApi.new
111
111
  account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
112
- media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve.
112
+ media_id = 'bw.png' # String | The ID of the media file.
113
113
 
114
114
  begin
115
115
  # Get Media
@@ -143,7 +143,7 @@ end
143
143
  | Name | Type | Description | Notes |
144
144
  | ---- | ---- | ----------- | ----- |
145
145
  | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | |
146
- | **media_id** | **String** | Media ID to retrieve. | |
146
+ | **media_id** | **String** | The ID of the media file. | |
147
147
 
148
148
  ### Return type
149
149
 
@@ -261,7 +261,7 @@ end
261
261
 
262
262
  api_instance = Bandwidth::MediaApi.new
263
263
  account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
264
- media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve.
264
+ media_id = 'bw.png' # String | The ID of the media file.
265
265
  body = File.new('/path/to/some/file') # File |
266
266
  opts = {
267
267
  content_type: 'audio/wav', # String | The media type of the entity-body.
@@ -299,7 +299,7 @@ end
299
299
  | Name | Type | Description | Notes |
300
300
  | ---- | ---- | ----------- | ----- |
301
301
  | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | |
302
- | **media_id** | **String** | Media ID to retrieve. | |
302
+ | **media_id** | **String** | The ID of the media file. | |
303
303
  | **body** | **File** | | |
304
304
  | **content_type** | **String** | The media type of the entity-body. | [optional] |
305
305
  | **cache_control** | **String** | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | [optional] |
@@ -16,7 +16,7 @@ require 'bandwidth-sdk'
16
16
  instance = Bandwidth::RbmActionBase.new(
17
17
  type: null,
18
18
  text: Hello world,
19
- postback_data: [B@1ecf784f
19
+ postback_data: [B@dc3eda6
20
20
  )
21
21
  ```
22
22
 
@@ -15,7 +15,7 @@ require 'bandwidth-sdk'
15
15
 
16
16
  instance = Bandwidth::RbmSuggestionResponse.new(
17
17
  text: Yes, I would like to proceed,
18
- postback_data: [B@1ecf784f,
18
+ postback_data: [B@dc3eda6,
19
19
  paired_message_id: 1752697342534u24xerqdukke523x
20
20
  )
21
21
  ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -0,0 +1,15 @@
1
+ # Bandwidth::ReferCallStatusEnum
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'bandwidth-sdk'
12
+
13
+ instance = Bandwidth::ReferCallStatusEnum.new()
14
+ ```
15
+
@@ -0,0 +1,46 @@
1
+ # Bandwidth::ReferCompleteCallback
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
+ | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
+ | **account_id** | **String** | The user account associated with the call. | [optional] |
10
+ | **application_id** | **String** | The id of the application associated with the call. | [optional] |
11
+ | **from** | **String** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] |
12
+ | **to** | **String** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] |
13
+ | **direction** | [**CallDirectionEnum**](CallDirectionEnum.md) | | [optional] |
14
+ | **call_id** | **String** | The call id associated with the event. | [optional] |
15
+ | **call_url** | **String** | The URL of the call associated with the event. | [optional] |
16
+ | **start_time** | **Time** | Time the call was started, in ISO 8601 format. | [optional] |
17
+ | **answer_time** | **Time** | Time the call was answered, in ISO 8601 format. | [optional] |
18
+ | **tag** | **String** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] |
19
+ | **refer_call_status** | [**ReferCallStatusEnum**](ReferCallStatusEnum.md) | | [optional] |
20
+ | **refer_sip_response_code** | **Integer** | (optional) The SIP response code returned for the REFER request itself (e.g. 202, 405, 603). Present when a SIP response was received for the REFER. | [optional] |
21
+ | **notify_sip_response_code** | **Integer** | (optional) The final SIP response code reported via NOTIFY (message/sipfrag body). Present only when the caller's endpoint sent a final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout or when the REFER was rejected before a subscription was established. | [optional] |
22
+
23
+ ## Example
24
+
25
+ ```ruby
26
+ require 'bandwidth-sdk'
27
+
28
+ instance = Bandwidth::ReferCompleteCallback.new(
29
+ event_type: bridgeComplete,
30
+ event_time: 2022-06-17T22:19:40.375Z,
31
+ account_id: 9900000,
32
+ application_id: 04e88489-df02-4e34-a0ee-27a91849555f,
33
+ from: +15555555555,
34
+ to: +15555555555,
35
+ direction: null,
36
+ call_id: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
37
+ call_url: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85,
38
+ start_time: 2022-06-17T22:19:40.375Z,
39
+ answer_time: 2022-06-17T22:20Z,
40
+ tag: exampleTag,
41
+ refer_call_status: null,
42
+ refer_sip_response_code: 202,
43
+ notify_sip_response_code: 200
44
+ )
45
+ ```
46
+
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
7
+ | **event_type** | **String** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] |
8
8
  | **event_time** | **Time** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] |
9
9
  | **account_id** | **String** | The user account associated with the call. | [optional] |
10
10
  | **application_id** | **String** | The id of the application associated with the call. | [optional] |
@@ -22,7 +22,7 @@ module Bandwidth
22
22
  # Delete Media
23
23
  # Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
24
24
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
25
- # @param media_id [String] Media ID to retrieve.
25
+ # @param media_id [String] The ID of the media file.
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [nil]
28
28
  def delete_media(account_id, media_id, opts = {})
@@ -33,7 +33,7 @@ module Bandwidth
33
33
  # Delete Media
34
34
  # Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
35
35
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
36
- # @param media_id [String] Media ID to retrieve.
36
+ # @param media_id [String] The ID of the media file.
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
39
  def delete_media_with_http_info(account_id, media_id, opts = {})
@@ -91,7 +91,7 @@ module Bandwidth
91
91
  # Get Media
92
92
  # Downloads a media file you previously uploaded.
93
93
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
94
- # @param media_id [String] Media ID to retrieve.
94
+ # @param media_id [String] The ID of the media file.
95
95
  # @param [Hash] opts the optional parameters
96
96
  # @return [File]
97
97
  def get_media(account_id, media_id, opts = {})
@@ -102,7 +102,7 @@ module Bandwidth
102
102
  # Get Media
103
103
  # Downloads a media file you previously uploaded.
104
104
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
105
- # @param media_id [String] Media ID to retrieve.
105
+ # @param media_id [String] The ID of the media file.
106
106
  # @param [Hash] opts the optional parameters
107
107
  # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
108
108
  def get_media_with_http_info(account_id, media_id, opts = {})
@@ -226,7 +226,7 @@ module Bandwidth
226
226
  # Upload Media
227
227
  # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
228
228
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
229
- # @param media_id [String] Media ID to retrieve.
229
+ # @param media_id [String] The ID of the media file.
230
230
  # @param body [File]
231
231
  # @param [Hash] opts the optional parameters
232
232
  # @option opts [String] :content_type The media type of the entity-body.
@@ -240,7 +240,7 @@ module Bandwidth
240
240
  # Upload Media
241
241
  # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
242
242
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
243
- # @param media_id [String] Media ID to retrieve.
243
+ # @param media_id [String] The ID of the media file.
244
244
  # @param body [File]
245
245
  # @param [Hash] opts the optional parameters
246
246
  # @option opts [String] :content_type The media type of the entity-body.
@@ -72,6 +72,10 @@ module Bandwidth
72
72
  # Defines the access token (Bearer) used with OAuth2.
73
73
  attr_accessor :access_token
74
74
 
75
+ # Defines the URL used to obtain access tokens (Bearer) used with OAuth2.
76
+ # @return [String]
77
+ attr_accessor :access_token_url
78
+
75
79
  # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
76
80
  # Overrides the access_token if set
77
81
  # @return [Proc]
@@ -193,6 +197,7 @@ module Bandwidth
193
197
  @force_ending_format = false
194
198
  @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
195
199
  @access_token_expiration = nil
200
+ @access_token_url = 'https://api.bandwidth.com/api/v1/oauth2/token'
196
201
  @access_token_getter = Proc.new {
197
202
  access_token_valid = @access_token && (@access_token_expiration.nil? || @access_token_expiration > Time.now + 60)
198
203
  next @access_token if access_token_valid
@@ -200,9 +205,8 @@ module Bandwidth
200
205
 
201
206
  puts "Refreshing access token..." if @debugging
202
207
  # obtain new access token using client credentials
203
- token_url = 'https://api.bandwidth.com/api/v1/oauth2/token'
204
208
  auth_header = 'Basic ' + ["#{@client_id}:#{@client_secret}"].pack('m').delete("\r\n")
205
- conn = Faraday.new(url: token_url) do |faraday|
209
+ conn = Faraday.new(url: @access_token_url) do |faraday|
206
210
  faraday.request :url_encoded
207
211
  faraday.adapter Faraday.default_adapter
208
212
  end
@@ -16,7 +16,7 @@ require 'time'
16
16
  module Bandwidth
17
17
  # The Answer event is sent to the answerUrl specified in the createCall request when an outbound call is answered.
18
18
  class AnswerCallback < ApiModelBase
19
- # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
19
+ # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
20
20
  attr_accessor :event_type
21
21
 
22
22
  # The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.
@@ -16,7 +16,7 @@ require 'time'
16
16
  module Bandwidth
17
17
  # If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call. If this webhook is sent, the Bridge Target Complete webhook is NOT sent. This callback is also sent if any problem occurs that prevents the calls to be bridged.
18
18
  class BridgeCompleteCallback < ApiModelBase
19
- # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
19
+ # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
20
20
  attr_accessor :event_type
21
21
 
22
22
  # The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.
@@ -16,7 +16,7 @@ require 'time'
16
16
  module Bandwidth
17
17
  # If the originating call leaves the <Bridge>, then this callback is sent to the bridgeTargetCompleteUrl, and the BXML returned in it is executed on the target call. If this webhook is sent, the Bridge Complete webhook is NOT sent.
18
18
  class BridgeTargetCompleteCallback < ApiModelBase
19
- # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
19
+ # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
20
20
  attr_accessor :event_type
21
21
 
22
22
  # The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution.
@@ -0,0 +1,23 @@
1
+ module Bandwidth
2
+ module Bxml
3
+ class Connect < Bandwidth::Bxml::NestableVerb
4
+ # Initializer
5
+ # @param endpoints [Verb] or [Array<Verb>] XML element children. Defaults to an empty array. Valid nested connect verbs are: Endpoint.
6
+ # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash.
7
+ def initialize(endpoints = [], attributes = {})
8
+ super('Connect', nil, endpoints, attributes)
9
+
10
+ @attribute_map = {
11
+ event_callback_url: 'eventCallbackUrl', # Optional [String]: URL to send events to during the connection lifecycle. May be a relative URL. Defaults to None.
12
+ event_fallback_url: 'eventFallbackUrl', # Optional [String]: Fallback URL used by Bandwidth when delivery to event_callback_url fails. May be a relative URL.
13
+ }
14
+ end
15
+
16
+ # Add endpoint or endpoints to the nested verbs array
17
+ # @param endpoints [Endpoint] or [Array<Endpoint>] Verb or verbs to add to the array.
18
+ def add_endpoints(endpoints)
19
+ @nested_verbs.push(*endpoints)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,11 @@
1
+ module Bandwidth
2
+ module Bxml
3
+ class Endpoint < Bandwidth::Bxml::Verb
4
+ # Initializer
5
+ # @param endpoint_id [String] The ID of the endpoint to connect to.
6
+ def initialize(endpoint_id)
7
+ super('Endpoint', endpoint_id, {})
8
+ end
9
+ end
10
+ end
11
+ end
@@ -9,6 +9,8 @@ module Bandwidth
9
9
  @attribute_map = {
10
10
  to: 'to', # [String]: The phone number destination of the call.
11
11
  from: 'from', # Optional [String]: The phone number that the recipient will receive the call from.
12
+ privacy: 'privacy', # Optional [Boolean]: Hide the calling number. The caller_display_name field can be used to customize the displayed name.
13
+ caller_display_name: 'callerDisplayName', # Optional [String]: The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If privacy is true, only the following values are valid: Restricted, Anonymous, Private, or Unavailable.
12
14
  call_timeout: 'callTimeout', # Optional [Number]: The number of seconds to wait before timing out the call.
13
15
  diversion_treatment: 'diversionTreatment', # Optional [String]: Can be any of the following: - none: No diversion headers are sent on the outbound leg of the transferred call. - propagate: Copy the Diversion header from the inbound leg to the outbound leg. Ignored if there is no Diversion header present on the inbound leg. - stack: After propagating any Diversion header from the inbound leg to the outbound leg, stack on top another Diversion header based on the Request-URI of the inbound call. If diversionTreatment is not specified, no diversion header will be included for the transfer even if one came with the inbound call. Defaults to None.
14
16
  diversion_reason: 'diversionReason', # Optional [String]: Can be any of the following values: unknown, user-busy, no-answer, unavailable, unconditional, time-of-day, do-not-disturb, deflection, follow-me, out-of-service, away. This parameter is considered only when diversionTreatment is set to stack. Defaults to None.