bandwidth-sdk 2.1.1 → 3.7.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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +85 -70
  3. data/lib/bandwidth.rb +7 -1
  4. data/lib/bandwidth/client.rb +20 -2
  5. data/lib/bandwidth/configuration.rb +45 -9
  6. data/lib/bandwidth/http/auth/two_factor_auth_basic_auth.rb +22 -0
  7. data/lib/bandwidth/http/auth/web_rtc_basic_auth.rb +22 -0
  8. data/lib/bandwidth/http/faraday_client.rb +2 -6
  9. data/lib/bandwidth/messaging_lib/messaging.rb +1 -3
  10. data/lib/bandwidth/messaging_lib/messaging/client.rb +11 -2
  11. data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +45 -88
  12. data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
  13. data/lib/bandwidth/messaging_lib/messaging/exceptions/{generic_client_exception.rb → messaging_exception.rb} +2 -14
  14. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +20 -0
  15. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb +49 -0
  16. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/api_controller.rb +153 -0
  17. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +49 -0
  18. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/invalid_request_exception.rb +29 -0
  19. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_code_request_schema.rb +88 -0
  20. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_messaging_response.rb +35 -0
  21. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_code_response.rb +35 -0
  22. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb +94 -0
  23. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_voice_response.rb +35 -0
  24. data/lib/bandwidth/utilities/file_wrapper.rb +17 -0
  25. data/lib/bandwidth/voice_lib/bxml/verbs/bridge.rb +22 -0
  26. data/lib/bandwidth/voice_lib/bxml/verbs/conference.rb +28 -0
  27. data/lib/bandwidth/voice_lib/bxml/verbs/gather.rb +8 -0
  28. data/lib/bandwidth/voice_lib/bxml/verbs/phone_number.rb +2 -0
  29. data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +5 -1
  30. data/lib/bandwidth/voice_lib/bxml/verbs/send_dtmf.rb +4 -1
  31. data/lib/bandwidth/voice_lib/bxml/verbs/start_recording.rb +4 -1
  32. data/lib/bandwidth/voice_lib/voice.rb +13 -4
  33. data/lib/bandwidth/voice_lib/voice/client.rb +11 -2
  34. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +629 -112
  35. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
  36. data/lib/bandwidth/voice_lib/voice/exceptions/{error_response_exception.rb → api_error_response_exception.rb} +3 -3
  37. data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +11 -2
  38. data/lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb +164 -0
  39. data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +20 -2
  40. data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +1 -1
  41. data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +71 -0
  42. data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +35 -0
  43. data/lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb +35 -0
  44. data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +47 -0
  45. data/lib/bandwidth/voice_lib/voice/models/modify_call_recording_state.rb +1 -1
  46. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +35 -25
  47. data/lib/bandwidth/voice_lib/voice/models/state1_enum.rb +4 -7
  48. data/lib/bandwidth/voice_lib/voice/models/state2_enum.rb +20 -0
  49. data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +7 -4
  50. data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +26 -0
  51. data/lib/bandwidth/voice_lib/voice/models/status2_enum.rb +32 -0
  52. data/lib/bandwidth/voice_lib/voice/models/status_enum.rb +17 -0
  53. data/lib/bandwidth/{messaging_lib/messaging/models/field_error.rb → voice_lib/voice/models/transcript.rb} +15 -15
  54. data/lib/bandwidth/voice_lib/voice/models/transcription.rb +62 -0
  55. data/lib/bandwidth/voice_lib/voice/models/transcription_response.rb +42 -0
  56. data/lib/bandwidth/web_rtc_lib/web_rtc.rb +21 -0
  57. data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +49 -0
  58. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +682 -0
  59. data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +49 -0
  60. data/lib/bandwidth/{messaging_lib/messaging/exceptions/path_client_exception.rb → web_rtc_lib/web_rtc/exceptions/error_exception.rb} +4 -19
  61. data/lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb +47 -0
  62. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant.rb +83 -0
  63. data/lib/bandwidth/web_rtc_lib/web_rtc/models/participant_subscription.rb +35 -0
  64. data/lib/bandwidth/web_rtc_lib/web_rtc/models/publish_permission_enum.rb +17 -0
  65. data/lib/bandwidth/web_rtc_lib/web_rtc/models/session.rb +44 -0
  66. data/lib/bandwidth/web_rtc_lib/web_rtc/models/subscriptions.rb +54 -0
  67. metadata +58 -11
  68. data/lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb +0 -65
  69. data/lib/bandwidth/voice_lib/voice/models/transcription_status_enum.rb +0 -20
  70. data/lib/bandwidth/voice_lib/voice/models/type_enum.rb +0 -32
@@ -1,65 +0,0 @@
1
- # bandwidth
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- require 'date'
7
- module Bandwidth
8
- # ApiGetAccountRecordingsMetadataRequest Model.
9
- class ApiGetAccountRecordingsMetadataRequest < BaseModel
10
- # Format is E164
11
- # @return [String]
12
- attr_accessor :from
13
-
14
- # Format is E164
15
- # @return [String]
16
- attr_accessor :to
17
-
18
- # ISO8601 format
19
- # @return [DateTime]
20
- attr_accessor :min_start_time
21
-
22
- # ISO8601 format
23
- # @return [DateTime]
24
- attr_accessor :max_start_time
25
-
26
- # A mapping from model property names to API property names.
27
- def self.names
28
- @_hash = {} if @_hash.nil?
29
- @_hash['from'] = 'from'
30
- @_hash['to'] = 'to'
31
- @_hash['min_start_time'] = 'minStartTime'
32
- @_hash['max_start_time'] = 'maxStartTime'
33
- @_hash
34
- end
35
-
36
- def initialize(from = nil,
37
- to = nil,
38
- min_start_time = nil,
39
- max_start_time = nil)
40
- @from = from
41
- @to = to
42
- @min_start_time = min_start_time
43
- @max_start_time = max_start_time
44
- end
45
-
46
- # Creates an instance of the object from a hash.
47
- def self.from_hash(hash)
48
- return nil unless hash
49
-
50
- # Extract variables from the hash.
51
- from = hash['from']
52
- to = hash['to']
53
- min_start_time = APIHelper.rfc3339(hash['minStartTime']) if
54
- hash['minStartTime']
55
- max_start_time = APIHelper.rfc3339(hash['maxStartTime']) if
56
- hash['maxStartTime']
57
-
58
- # Create object from extracted values.
59
- ApiGetAccountRecordingsMetadataRequest.new(from,
60
- to,
61
- min_start_time,
62
- max_start_time)
63
- end
64
- end
65
- end
@@ -1,20 +0,0 @@
1
- # bandwidth
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module Bandwidth
7
- # TranscriptionStatus.
8
- class TranscriptionStatusEnum
9
- TRANSCRIPTION_STATUS_ENUM = [
10
- # TODO: Write general description for NONE
11
- NONE = 'none'.freeze,
12
-
13
- # TODO: Write general description for REQUESTED
14
- REQUESTED = 'requested'.freeze,
15
-
16
- # TODO: Write general description for AVAILABLE
17
- AVAILABLE = 'available'.freeze
18
- ].freeze
19
- end
20
- end
@@ -1,32 +0,0 @@
1
- # bandwidth
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module Bandwidth
7
- # Type.
8
- class TypeEnum
9
- TYPE_ENUM = [
10
- # TODO: Write general description for VALIDATION
11
- VALIDATION = 'validation'.freeze,
12
-
13
- # TODO: Write general description for AUTHENTICATIONERROR
14
- AUTHENTICATIONERROR = 'authentication-error'.freeze,
15
-
16
- # TODO: Write general description for AUTHORIZATIONERROR
17
- AUTHORIZATIONERROR = 'authorization-error'.freeze,
18
-
19
- # TODO: Write general description for INTERNALERROR
20
- INTERNALERROR = 'internal-error'.freeze,
21
-
22
- # TODO: Write general description for ERROR
23
- ERROR = 'error'.freeze,
24
-
25
- # TODO: Write general description for RATELIMITEXCEEDED
26
- RATELIMITEXCEEDED = 'rate-limit-exceeded'.freeze,
27
-
28
- # TODO: Write general description for SYSTEMOVERLOADED
29
- SYSTEMOVERLOADED = 'system-overloaded'.freeze
30
- ].freeze
31
- end
32
- end