bandwidth-sdk 6.1.0 → 8.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/README.md +89 -12
- data/lib/bandwidth.rb +5 -2
- data/lib/bandwidth/api_helper.rb +5 -17
- data/lib/bandwidth/client.rb +23 -9
- data/lib/bandwidth/configuration.rb +54 -18
- data/lib/bandwidth/http/auth/{two_factor_auth_basic_auth.rb → multi_factor_auth_basic_auth.rb} +3 -3
- data/lib/bandwidth/http/auth/phone_number_lookup_basic_auth.rb +22 -0
- data/lib/bandwidth/http/faraday_client.rb +5 -2
- data/lib/bandwidth/messaging_lib/messaging/client.rb +14 -5
- data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +25 -29
- data/lib/bandwidth/messaging_lib/messaging/models/bandwidth_message_item.rb +47 -2
- data/lib/bandwidth/messaging_lib/messaging/models/media.rb +5 -75
- data/lib/bandwidth/models/base_model.rb +19 -8
- data/lib/bandwidth/multi_factor_auth_lib/multi_factor_auth.rb +23 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/client.rb +15 -6
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/base_controller.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/controllers/mfa_controller.rb +7 -7
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/error_with_request_exception.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/forbidden_request_exception.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/exceptions/unauthorized_request_exception.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_code_request_schema.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_messaging_response.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_verify_code_response.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_verify_request_schema.rb +0 -0
- data/lib/bandwidth/{two_factor_auth_lib/two_factor_auth → multi_factor_auth_lib/multi_factor_auth}/models/two_factor_voice_response.rb +0 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup.rb +20 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/client.rb +60 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/controllers/api_controller.rb +1551 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/controllers/base_controller.rb +49 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/exceptions/accounts_tnlookup400_error_exception.rb +29 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_request.rb +35 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb +45 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_status.rb +74 -0
- data/lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/result.rb +107 -0
- data/lib/bandwidth/utilities/date_time_helper.rb +156 -0
- data/lib/bandwidth/voice_lib/voice.rb +14 -18
- data/lib/bandwidth/voice_lib/voice/client.rb +14 -5
- data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +248 -230
- data/lib/bandwidth/voice_lib/voice/exceptions/{api_error_response_exception.rb → api_error_exception.rb} +2 -2
- data/lib/bandwidth/voice_lib/voice/models/{recording_metadata_response.rb → call_recording_metadata.rb} +47 -28
- data/lib/bandwidth/voice_lib/voice/models/call_state.rb +232 -0
- data/lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb +2 -20
- data/lib/bandwidth/voice_lib/voice/models/conference_event_method_enum.rb +2 -20
- data/lib/bandwidth/voice_lib/voice/models/{conference_member_detail.rb → conference_member_state.rb} +8 -8
- data/lib/bandwidth/voice_lib/voice/models/{conference_recording_metadata_response.rb → conference_recording_metadata.rb} +34 -18
- data/lib/bandwidth/voice_lib/voice/models/{conference_detail.rb → conference_state.rb} +22 -14
- data/lib/bandwidth/voice_lib/voice/models/{api_create_call_request.rb → create_call_request.rb} +35 -59
- data/lib/bandwidth/voice_lib/voice/models/{api_call_response.rb → create_call_response.rb} +28 -23
- data/lib/bandwidth/voice_lib/voice/models/{modify_call_recording_state.rb → modify_call_recording_request.rb} +4 -4
- data/lib/bandwidth/voice_lib/voice/models/{api_modify_call_request.rb → modify_call_request.rb} +25 -25
- data/lib/bandwidth/voice_lib/voice/models/{api_modify_conference_request.rb → modify_conference_request.rb} +11 -11
- data/lib/bandwidth/voice_lib/voice/models/state1_enum.rb +7 -4
- data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +4 -7
- data/lib/bandwidth/voice_lib/voice/models/{api_transcribe_recording_request.rb → transcribe_recording_request.rb} +8 -8
- data/lib/bandwidth/voice_lib/voice/models/{transcription.rb → transcription_metadata.rb} +19 -10
- data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +7 -2
- data/lib/bandwidth/web_rtc_lib/web_rtc/client.rb +14 -5
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb +14 -14
- data/lib/bandwidth/web_rtc_lib/web_rtc/models/device_api_version_enum.rb +2 -2
- data/test/controllers/controller_test_base.rb +21 -0
- data/test/http_response_catcher.rb +19 -0
- data/test/integration/test_integration.rb +39 -13
- data/test/test_helper.rb +94 -0
- metadata +47 -37
- data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +0 -22
- data/lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb +0 -164
- data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +0 -47
- data/lib/bandwidth/voice_lib/voice/models/state2_enum.rb +0 -20
- data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +0 -29
- data/lib/bandwidth/voice_lib/voice/models/status3_enum.rb +0 -32
| @@ -4,8 +4,8 @@ | |
| 4 4 | 
             
            # ( https://apimatic.io ).
         | 
| 5 5 |  | 
| 6 6 | 
             
            module Bandwidth
         | 
| 7 | 
            -
              #  | 
| 8 | 
            -
              class  | 
| 7 | 
            +
              # ApiError class.
         | 
| 8 | 
            +
              class ApiErrorException < APIException
         | 
| 9 9 | 
             
                # TODO: Write general description for this method
         | 
| 10 10 | 
             
                # @return [String]
         | 
| 11 11 | 
             
                attr_accessor :type
         | 
| @@ -5,8 +5,8 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            require 'date'
         | 
| 7 7 | 
             
            module Bandwidth
         | 
| 8 | 
            -
              #  | 
| 9 | 
            -
              class  | 
| 8 | 
            +
              # CallRecordingMetadata Model.
         | 
| 9 | 
            +
              class CallRecordingMetadata < BaseModel
         | 
| 10 10 | 
             
                # TODO: Write general description for this method
         | 
| 11 11 | 
             
                # @return [String]
         | 
| 12 12 | 
             
                attr_accessor :application_id
         | 
| @@ -67,16 +67,25 @@ module Bandwidth | |
| 67 67 | 
             
                # @return [FileFormatEnum]
         | 
| 68 68 | 
             
                attr_accessor :file_format
         | 
| 69 69 |  | 
| 70 | 
            -
                #  | 
| 71 | 
            -
                #  | 
| 70 | 
            +
                # The current status of the recording. Current values are 'processing',
         | 
| 71 | 
            +
                # 'partial', 'complete', 'deleted' and 'error'. Additional states may be
         | 
| 72 | 
            +
                # added in the future, so your application must be tolerant of unknown
         | 
| 73 | 
            +
                # values.
         | 
| 74 | 
            +
                # @return [String]
         | 
| 72 75 | 
             
                attr_accessor :status
         | 
| 73 76 |  | 
| 74 | 
            -
                #  | 
| 77 | 
            +
                # The current status of the recording. Current values are 'processing',
         | 
| 78 | 
            +
                # 'partial', 'complete', 'deleted' and 'error'. Additional states may be
         | 
| 79 | 
            +
                # added in the future, so your application must be tolerant of unknown
         | 
| 80 | 
            +
                # values.
         | 
| 75 81 | 
             
                # @return [String]
         | 
| 76 82 | 
             
                attr_accessor :media_url
         | 
| 77 83 |  | 
| 78 | 
            -
                #  | 
| 79 | 
            -
                #  | 
| 84 | 
            +
                # The current status of the recording. Current values are 'processing',
         | 
| 85 | 
            +
                # 'partial', 'complete', 'deleted' and 'error'. Additional states may be
         | 
| 86 | 
            +
                # added in the future, so your application must be tolerant of unknown
         | 
| 87 | 
            +
                # values.
         | 
| 88 | 
            +
                # @return [TranscriptionMetadata]
         | 
| 80 89 | 
             
                attr_accessor :transcription
         | 
| 81 90 |  | 
| 82 91 | 
             
                # A mapping from model property names to API property names.
         | 
| @@ -158,33 +167,43 @@ module Bandwidth | |
| 158 167 | 
             
                  duration = hash['duration']
         | 
| 159 168 | 
             
                  direction = hash['direction']
         | 
| 160 169 | 
             
                  channels = hash['channels']
         | 
| 161 | 
            -
                  start_time =  | 
| 162 | 
            -
             | 
| 170 | 
            +
                  start_time = DateTimeHelper.from_rfc3339(hash['startTime']) if
         | 
| 171 | 
            +
                    hash['startTime']
         | 
| 172 | 
            +
                  end_time = DateTimeHelper.from_rfc3339(hash['endTime']) if
         | 
| 173 | 
            +
                    hash['endTime']
         | 
| 163 174 | 
             
                  file_format = hash['fileFormat']
         | 
| 164 175 | 
             
                  status = hash['status']
         | 
| 165 176 | 
             
                  media_url = hash['mediaUrl']
         | 
| 166 | 
            -
                  transcription =  | 
| 177 | 
            +
                  transcription = TranscriptionMetadata.from_hash(hash['transcription']) if
         | 
| 167 178 | 
             
                    hash['transcription']
         | 
| 168 179 |  | 
| 169 180 | 
             
                  # Create object from extracted values.
         | 
| 170 | 
            -
                   | 
| 171 | 
            -
             | 
| 172 | 
            -
             | 
| 173 | 
            -
             | 
| 174 | 
            -
             | 
| 175 | 
            -
             | 
| 176 | 
            -
             | 
| 177 | 
            -
             | 
| 178 | 
            -
             | 
| 179 | 
            -
             | 
| 180 | 
            -
             | 
| 181 | 
            -
             | 
| 182 | 
            -
             | 
| 183 | 
            -
             | 
| 184 | 
            -
             | 
| 185 | 
            -
             | 
| 186 | 
            -
             | 
| 187 | 
            -
             | 
| 181 | 
            +
                  CallRecordingMetadata.new(application_id,
         | 
| 182 | 
            +
                                            account_id,
         | 
| 183 | 
            +
                                            call_id,
         | 
| 184 | 
            +
                                            parent_call_id,
         | 
| 185 | 
            +
                                            recording_id,
         | 
| 186 | 
            +
                                            to,
         | 
| 187 | 
            +
                                            from,
         | 
| 188 | 
            +
                                            transfer_caller_id,
         | 
| 189 | 
            +
                                            transfer_to,
         | 
| 190 | 
            +
                                            duration,
         | 
| 191 | 
            +
                                            direction,
         | 
| 192 | 
            +
                                            channels,
         | 
| 193 | 
            +
                                            start_time,
         | 
| 194 | 
            +
                                            end_time,
         | 
| 195 | 
            +
                                            file_format,
         | 
| 196 | 
            +
                                            status,
         | 
| 197 | 
            +
                                            media_url,
         | 
| 198 | 
            +
                                            transcription)
         | 
| 199 | 
            +
                end
         | 
| 200 | 
            +
             | 
| 201 | 
            +
                def to_start_time
         | 
| 202 | 
            +
                  DateTimeHelper.to_rfc3339(start_time)
         | 
| 203 | 
            +
                end
         | 
| 204 | 
            +
             | 
| 205 | 
            +
                def to_end_time
         | 
| 206 | 
            +
                  DateTimeHelper.to_rfc3339(end_time)
         | 
| 188 207 | 
             
                end
         | 
| 189 208 | 
             
              end
         | 
| 190 209 | 
             
            end
         | 
| @@ -0,0 +1,232 @@ | |
| 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 | 
            +
              # CallState Model.
         | 
| 9 | 
            +
              class CallState < BaseModel
         | 
| 10 | 
            +
                # TODO: Write general description for this method
         | 
| 11 | 
            +
                # @return [String]
         | 
| 12 | 
            +
                attr_accessor :call_id
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                # TODO: Write general description for this method
         | 
| 15 | 
            +
                # @return [String]
         | 
| 16 | 
            +
                attr_accessor :parent_call_id
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                # TODO: Write general description for this method
         | 
| 19 | 
            +
                # @return [String]
         | 
| 20 | 
            +
                attr_accessor :application_id
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                # TODO: Write general description for this method
         | 
| 23 | 
            +
                # @return [String]
         | 
| 24 | 
            +
                attr_accessor :account_id
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                # TODO: Write general description for this method
         | 
| 27 | 
            +
                # @return [String]
         | 
| 28 | 
            +
                attr_accessor :to
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                # TODO: Write general description for this method
         | 
| 31 | 
            +
                # @return [String]
         | 
| 32 | 
            +
                attr_accessor :from
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                # TODO: Write general description for this method
         | 
| 35 | 
            +
                # @return [String]
         | 
| 36 | 
            +
                attr_accessor :direction
         | 
| 37 | 
            +
             | 
| 38 | 
            +
                # The current state of the call. Current possible values are 'initiated',
         | 
| 39 | 
            +
                # 'answered' and 'disconnected'. Additional states may be added in the
         | 
| 40 | 
            +
                # future, so your application must be tolerant of unknown values.
         | 
| 41 | 
            +
                # @return [String]
         | 
| 42 | 
            +
                attr_accessor :state
         | 
| 43 | 
            +
             | 
| 44 | 
            +
                # The current state of the call. Current possible values are 'initiated',
         | 
| 45 | 
            +
                # 'answered' and 'disconnected'. Additional states may be added in the
         | 
| 46 | 
            +
                # future, so your application must be tolerant of unknown values.
         | 
| 47 | 
            +
                # @return [String]
         | 
| 48 | 
            +
                attr_accessor :identity
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                # The current state of the call. Current possible values are 'initiated',
         | 
| 51 | 
            +
                # 'answered' and 'disconnected'. Additional states may be added in the
         | 
| 52 | 
            +
                # future, so your application must be tolerant of unknown values.
         | 
| 53 | 
            +
                # @return [Hash]
         | 
| 54 | 
            +
                attr_accessor :pai
         | 
| 55 | 
            +
             | 
| 56 | 
            +
                # The current state of the call. Current possible values are 'initiated',
         | 
| 57 | 
            +
                # 'answered' and 'disconnected'. Additional states may be added in the
         | 
| 58 | 
            +
                # future, so your application must be tolerant of unknown values.
         | 
| 59 | 
            +
                # @return [DateTime]
         | 
| 60 | 
            +
                attr_accessor :start_time
         | 
| 61 | 
            +
             | 
| 62 | 
            +
                # The current state of the call. Current possible values are 'initiated',
         | 
| 63 | 
            +
                # 'answered' and 'disconnected'. Additional states may be added in the
         | 
| 64 | 
            +
                # future, so your application must be tolerant of unknown values.
         | 
| 65 | 
            +
                # @return [DateTime]
         | 
| 66 | 
            +
                attr_accessor :answer_time
         | 
| 67 | 
            +
             | 
| 68 | 
            +
                # The current state of the call. Current possible values are 'initiated',
         | 
| 69 | 
            +
                # 'answered' and 'disconnected'. Additional states may be added in the
         | 
| 70 | 
            +
                # future, so your application must be tolerant of unknown values.
         | 
| 71 | 
            +
                # @return [DateTime]
         | 
| 72 | 
            +
                attr_accessor :end_time
         | 
| 73 | 
            +
             | 
| 74 | 
            +
                # The reason the call was disconnected, or null if the call is still active.
         | 
| 75 | 
            +
                # Current values are 'cancel', 'timeout', 'busy', 'rejected', 'hangup',
         | 
| 76 | 
            +
                # 'invalid-bxml', 'callback-error', 'application-error', 'error',
         | 
| 77 | 
            +
                # 'account-limit', 'node-capacity-exceeded' and 'unknown'. Additional causes
         | 
| 78 | 
            +
                # may be added in the future, so your application must be tolerant of
         | 
| 79 | 
            +
                # unknown values.
         | 
| 80 | 
            +
                # @return [String]
         | 
| 81 | 
            +
                attr_accessor :disconnect_cause
         | 
| 82 | 
            +
             | 
| 83 | 
            +
                # The reason the call was disconnected, or null if the call is still active.
         | 
| 84 | 
            +
                # Current values are 'cancel', 'timeout', 'busy', 'rejected', 'hangup',
         | 
| 85 | 
            +
                # 'invalid-bxml', 'callback-error', 'application-error', 'error',
         | 
| 86 | 
            +
                # 'account-limit', 'node-capacity-exceeded' and 'unknown'. Additional causes
         | 
| 87 | 
            +
                # may be added in the future, so your application must be tolerant of
         | 
| 88 | 
            +
                # unknown values.
         | 
| 89 | 
            +
                # @return [String]
         | 
| 90 | 
            +
                attr_accessor :error_message
         | 
| 91 | 
            +
             | 
| 92 | 
            +
                # The reason the call was disconnected, or null if the call is still active.
         | 
| 93 | 
            +
                # Current values are 'cancel', 'timeout', 'busy', 'rejected', 'hangup',
         | 
| 94 | 
            +
                # 'invalid-bxml', 'callback-error', 'application-error', 'error',
         | 
| 95 | 
            +
                # 'account-limit', 'node-capacity-exceeded' and 'unknown'. Additional causes
         | 
| 96 | 
            +
                # may be added in the future, so your application must be tolerant of
         | 
| 97 | 
            +
                # unknown values.
         | 
| 98 | 
            +
                # @return [String]
         | 
| 99 | 
            +
                attr_accessor :error_id
         | 
| 100 | 
            +
             | 
| 101 | 
            +
                # The reason the call was disconnected, or null if the call is still active.
         | 
| 102 | 
            +
                # Current values are 'cancel', 'timeout', 'busy', 'rejected', 'hangup',
         | 
| 103 | 
            +
                # 'invalid-bxml', 'callback-error', 'application-error', 'error',
         | 
| 104 | 
            +
                # 'account-limit', 'node-capacity-exceeded' and 'unknown'. Additional causes
         | 
| 105 | 
            +
                # may be added in the future, so your application must be tolerant of
         | 
| 106 | 
            +
                # unknown values.
         | 
| 107 | 
            +
                # @return [DateTime]
         | 
| 108 | 
            +
                attr_accessor :last_update
         | 
| 109 | 
            +
             | 
| 110 | 
            +
                # A mapping from model property names to API property names.
         | 
| 111 | 
            +
                def self.names
         | 
| 112 | 
            +
                  @_hash = {} if @_hash.nil?
         | 
| 113 | 
            +
                  @_hash['call_id'] = 'callId'
         | 
| 114 | 
            +
                  @_hash['parent_call_id'] = 'parentCallId'
         | 
| 115 | 
            +
                  @_hash['application_id'] = 'applicationId'
         | 
| 116 | 
            +
                  @_hash['account_id'] = 'accountId'
         | 
| 117 | 
            +
                  @_hash['to'] = 'to'
         | 
| 118 | 
            +
                  @_hash['from'] = 'from'
         | 
| 119 | 
            +
                  @_hash['direction'] = 'direction'
         | 
| 120 | 
            +
                  @_hash['state'] = 'state'
         | 
| 121 | 
            +
                  @_hash['identity'] = 'identity'
         | 
| 122 | 
            +
                  @_hash['pai'] = 'pai'
         | 
| 123 | 
            +
                  @_hash['start_time'] = 'startTime'
         | 
| 124 | 
            +
                  @_hash['answer_time'] = 'answerTime'
         | 
| 125 | 
            +
                  @_hash['end_time'] = 'endTime'
         | 
| 126 | 
            +
                  @_hash['disconnect_cause'] = 'disconnectCause'
         | 
| 127 | 
            +
                  @_hash['error_message'] = 'errorMessage'
         | 
| 128 | 
            +
                  @_hash['error_id'] = 'errorId'
         | 
| 129 | 
            +
                  @_hash['last_update'] = 'lastUpdate'
         | 
| 130 | 
            +
                  @_hash
         | 
| 131 | 
            +
                end
         | 
| 132 | 
            +
             | 
| 133 | 
            +
                def initialize(call_id = nil,
         | 
| 134 | 
            +
                               parent_call_id = nil,
         | 
| 135 | 
            +
                               application_id = nil,
         | 
| 136 | 
            +
                               account_id = nil,
         | 
| 137 | 
            +
                               to = nil,
         | 
| 138 | 
            +
                               from = nil,
         | 
| 139 | 
            +
                               direction = nil,
         | 
| 140 | 
            +
                               state = nil,
         | 
| 141 | 
            +
                               identity = nil,
         | 
| 142 | 
            +
                               pai = nil,
         | 
| 143 | 
            +
                               start_time = nil,
         | 
| 144 | 
            +
                               answer_time = nil,
         | 
| 145 | 
            +
                               end_time = nil,
         | 
| 146 | 
            +
                               disconnect_cause = nil,
         | 
| 147 | 
            +
                               error_message = nil,
         | 
| 148 | 
            +
                               error_id = nil,
         | 
| 149 | 
            +
                               last_update = nil)
         | 
| 150 | 
            +
                  @call_id = call_id
         | 
| 151 | 
            +
                  @parent_call_id = parent_call_id
         | 
| 152 | 
            +
                  @application_id = application_id
         | 
| 153 | 
            +
                  @account_id = account_id
         | 
| 154 | 
            +
                  @to = to
         | 
| 155 | 
            +
                  @from = from
         | 
| 156 | 
            +
                  @direction = direction
         | 
| 157 | 
            +
                  @state = state
         | 
| 158 | 
            +
                  @identity = identity
         | 
| 159 | 
            +
                  @pai = pai
         | 
| 160 | 
            +
                  @start_time = start_time
         | 
| 161 | 
            +
                  @answer_time = answer_time
         | 
| 162 | 
            +
                  @end_time = end_time
         | 
| 163 | 
            +
                  @disconnect_cause = disconnect_cause
         | 
| 164 | 
            +
                  @error_message = error_message
         | 
| 165 | 
            +
                  @error_id = error_id
         | 
| 166 | 
            +
                  @last_update = last_update
         | 
| 167 | 
            +
                end
         | 
| 168 | 
            +
             | 
| 169 | 
            +
                # Creates an instance of the object from a hash.
         | 
| 170 | 
            +
                def self.from_hash(hash)
         | 
| 171 | 
            +
                  return nil unless hash
         | 
| 172 | 
            +
             | 
| 173 | 
            +
                  # Extract variables from the hash.
         | 
| 174 | 
            +
                  call_id = hash['callId']
         | 
| 175 | 
            +
                  parent_call_id = hash['parentCallId']
         | 
| 176 | 
            +
                  application_id = hash['applicationId']
         | 
| 177 | 
            +
                  account_id = hash['accountId']
         | 
| 178 | 
            +
                  to = hash['to']
         | 
| 179 | 
            +
                  from = hash['from']
         | 
| 180 | 
            +
                  direction = hash['direction']
         | 
| 181 | 
            +
                  state = hash['state']
         | 
| 182 | 
            +
                  identity = hash['identity']
         | 
| 183 | 
            +
                  pai = hash['pai']
         | 
| 184 | 
            +
                  start_time = DateTimeHelper.from_rfc3339(hash['startTime']) if
         | 
| 185 | 
            +
                    hash['startTime']
         | 
| 186 | 
            +
                  answer_time = DateTimeHelper.from_rfc3339(hash['answerTime']) if
         | 
| 187 | 
            +
                    hash['answerTime']
         | 
| 188 | 
            +
                  end_time = DateTimeHelper.from_rfc3339(hash['endTime']) if
         | 
| 189 | 
            +
                    hash['endTime']
         | 
| 190 | 
            +
                  disconnect_cause = hash['disconnectCause']
         | 
| 191 | 
            +
                  error_message = hash['errorMessage']
         | 
| 192 | 
            +
                  error_id = hash['errorId']
         | 
| 193 | 
            +
                  last_update = DateTimeHelper.from_rfc3339(hash['lastUpdate']) if
         | 
| 194 | 
            +
                    hash['lastUpdate']
         | 
| 195 | 
            +
             | 
| 196 | 
            +
                  # Create object from extracted values.
         | 
| 197 | 
            +
                  CallState.new(call_id,
         | 
| 198 | 
            +
                                parent_call_id,
         | 
| 199 | 
            +
                                application_id,
         | 
| 200 | 
            +
                                account_id,
         | 
| 201 | 
            +
                                to,
         | 
| 202 | 
            +
                                from,
         | 
| 203 | 
            +
                                direction,
         | 
| 204 | 
            +
                                state,
         | 
| 205 | 
            +
                                identity,
         | 
| 206 | 
            +
                                pai,
         | 
| 207 | 
            +
                                start_time,
         | 
| 208 | 
            +
                                answer_time,
         | 
| 209 | 
            +
                                end_time,
         | 
| 210 | 
            +
                                disconnect_cause,
         | 
| 211 | 
            +
                                error_message,
         | 
| 212 | 
            +
                                error_id,
         | 
| 213 | 
            +
                                last_update)
         | 
| 214 | 
            +
                end
         | 
| 215 | 
            +
             | 
| 216 | 
            +
                def to_start_time
         | 
| 217 | 
            +
                  DateTimeHelper.to_rfc3339(start_time)
         | 
| 218 | 
            +
                end
         | 
| 219 | 
            +
             | 
| 220 | 
            +
                def to_answer_time
         | 
| 221 | 
            +
                  DateTimeHelper.to_rfc3339(answer_time)
         | 
| 222 | 
            +
                end
         | 
| 223 | 
            +
             | 
| 224 | 
            +
                def to_end_time
         | 
| 225 | 
            +
                  DateTimeHelper.to_rfc3339(end_time)
         | 
| 226 | 
            +
                end
         | 
| 227 | 
            +
             | 
| 228 | 
            +
                def to_last_update
         | 
| 229 | 
            +
                  DateTimeHelper.to_rfc3339(last_update)
         | 
| 230 | 
            +
                end
         | 
| 231 | 
            +
              end
         | 
| 232 | 
            +
            end
         | 
| @@ -7,29 +7,11 @@ module Bandwidth | |
| 7 7 | 
             
              # CallbackMethod.
         | 
| 8 8 | 
             
              class CallbackMethodEnum
         | 
| 9 9 | 
             
                CALLBACK_METHOD_ENUM = [
         | 
| 10 | 
            -
                  # TODO: Write general description for GET
         | 
| 11 | 
            -
                  GET = 'GET'.freeze,
         | 
| 12 | 
            -
             | 
| 13 | 
            -
                  # TODO: Write general description for HEAD
         | 
| 14 | 
            -
                  HEAD = 'HEAD'.freeze,
         | 
| 15 | 
            -
             | 
| 16 10 | 
             
                  # TODO: Write general description for POST
         | 
| 17 11 | 
             
                  POST = 'POST'.freeze,
         | 
| 18 12 |  | 
| 19 | 
            -
                  # TODO: Write general description for  | 
| 20 | 
            -
                   | 
| 21 | 
            -
             | 
| 22 | 
            -
                  # TODO: Write general description for PATCH
         | 
| 23 | 
            -
                  PATCH = 'PATCH'.freeze,
         | 
| 24 | 
            -
             | 
| 25 | 
            -
                  # TODO: Write general description for DELETE
         | 
| 26 | 
            -
                  DELETE = 'DELETE'.freeze,
         | 
| 27 | 
            -
             | 
| 28 | 
            -
                  # TODO: Write general description for OPTIONS
         | 
| 29 | 
            -
                  OPTIONS = 'OPTIONS'.freeze,
         | 
| 30 | 
            -
             | 
| 31 | 
            -
                  # TODO: Write general description for TRACE
         | 
| 32 | 
            -
                  TRACE = 'TRACE'.freeze
         | 
| 13 | 
            +
                  # TODO: Write general description for GET
         | 
| 14 | 
            +
                  GET = 'GET'.freeze
         | 
| 33 15 | 
             
                ].freeze
         | 
| 34 16 | 
             
              end
         | 
| 35 17 | 
             
            end
         | 
| @@ -7,29 +7,11 @@ module Bandwidth | |
| 7 7 | 
             
              # ConferenceEventMethod.
         | 
| 8 8 | 
             
              class ConferenceEventMethodEnum
         | 
| 9 9 | 
             
                CONFERENCE_EVENT_METHOD_ENUM = [
         | 
| 10 | 
            -
                  # TODO: Write general description for GET
         | 
| 11 | 
            -
                  GET = 'GET'.freeze,
         | 
| 12 | 
            -
             | 
| 13 | 
            -
                  # TODO: Write general description for HEAD
         | 
| 14 | 
            -
                  HEAD = 'HEAD'.freeze,
         | 
| 15 | 
            -
             | 
| 16 10 | 
             
                  # TODO: Write general description for POST
         | 
| 17 11 | 
             
                  POST = 'POST'.freeze,
         | 
| 18 12 |  | 
| 19 | 
            -
                  # TODO: Write general description for  | 
| 20 | 
            -
                   | 
| 21 | 
            -
             | 
| 22 | 
            -
                  # TODO: Write general description for PATCH
         | 
| 23 | 
            -
                  PATCH = 'PATCH'.freeze,
         | 
| 24 | 
            -
             | 
| 25 | 
            -
                  # TODO: Write general description for DELETE
         | 
| 26 | 
            -
                  DELETE = 'DELETE'.freeze,
         | 
| 27 | 
            -
             | 
| 28 | 
            -
                  # TODO: Write general description for OPTIONS
         | 
| 29 | 
            -
                  OPTIONS = 'OPTIONS'.freeze,
         | 
| 30 | 
            -
             | 
| 31 | 
            -
                  # TODO: Write general description for TRACE
         | 
| 32 | 
            -
                  TRACE = 'TRACE'.freeze
         | 
| 13 | 
            +
                  # TODO: Write general description for GET
         | 
| 14 | 
            +
                  GET = 'GET'.freeze
         | 
| 33 15 | 
             
                ].freeze
         | 
| 34 16 | 
             
              end
         | 
| 35 17 | 
             
            end
         | 
    
        data/lib/bandwidth/voice_lib/voice/models/{conference_member_detail.rb → conference_member_state.rb}
    RENAMED
    
    | @@ -4,8 +4,8 @@ | |
| 4 4 | 
             
            # ( https://apimatic.io ).
         | 
| 5 5 |  | 
| 6 6 | 
             
            module Bandwidth
         | 
| 7 | 
            -
              #  | 
| 8 | 
            -
              class  | 
| 7 | 
            +
              # ConferenceMemberState Model.
         | 
| 8 | 
            +
              class ConferenceMemberState < BaseModel
         | 
| 9 9 | 
             
                # TODO: Write general description for this method
         | 
| 10 10 | 
             
                # @return [String]
         | 
| 11 11 | 
             
                attr_accessor :call_id
         | 
| @@ -69,12 +69,12 @@ module Bandwidth | |
| 69 69 | 
             
                  call_ids_to_coach = hash['callIdsToCoach']
         | 
| 70 70 |  | 
| 71 71 | 
             
                  # Create object from extracted values.
         | 
| 72 | 
            -
                   | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 72 | 
            +
                  ConferenceMemberState.new(call_id,
         | 
| 73 | 
            +
                                            conference_id,
         | 
| 74 | 
            +
                                            member_url,
         | 
| 75 | 
            +
                                            mute,
         | 
| 76 | 
            +
                                            hold,
         | 
| 77 | 
            +
                                            call_ids_to_coach)
         | 
| 78 78 | 
             
                end
         | 
| 79 79 | 
             
              end
         | 
| 80 80 | 
             
            end
         | 
| @@ -5,8 +5,8 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            require 'date'
         | 
| 7 7 | 
             
            module Bandwidth
         | 
| 8 | 
            -
              #  | 
| 9 | 
            -
              class  | 
| 8 | 
            +
              # ConferenceRecordingMetadata Model.
         | 
| 9 | 
            +
              class ConferenceRecordingMetadata < BaseModel
         | 
| 10 10 | 
             
                # TODO: Write general description for this method
         | 
| 11 11 | 
             
                # @return [String]
         | 
| 12 12 | 
             
                attr_accessor :account_id
         | 
| @@ -43,11 +43,17 @@ module Bandwidth | |
| 43 43 | 
             
                # @return [FileFormatEnum]
         | 
| 44 44 | 
             
                attr_accessor :file_format
         | 
| 45 45 |  | 
| 46 | 
            -
                #  | 
| 47 | 
            -
                #  | 
| 46 | 
            +
                # The current status of the recording. Current possible values are
         | 
| 47 | 
            +
                # 'processing', 'partial', 'complete', 'deleted', and 'error'. Additional
         | 
| 48 | 
            +
                # states may be added in the future, so your application must be tolerant of
         | 
| 49 | 
            +
                # unknown values.
         | 
| 50 | 
            +
                # @return [String]
         | 
| 48 51 | 
             
                attr_accessor :status
         | 
| 49 52 |  | 
| 50 | 
            -
                #  | 
| 53 | 
            +
                # The current status of the recording. Current possible values are
         | 
| 54 | 
            +
                # 'processing', 'partial', 'complete', 'deleted', and 'error'. Additional
         | 
| 55 | 
            +
                # states may be added in the future, so your application must be tolerant of
         | 
| 56 | 
            +
                # unknown values.
         | 
| 51 57 | 
             
                # @return [String]
         | 
| 52 58 | 
             
                attr_accessor :media_url
         | 
| 53 59 |  | 
| @@ -103,24 +109,34 @@ module Bandwidth | |
| 103 109 | 
             
                  recording_id = hash['recordingId']
         | 
| 104 110 | 
             
                  duration = hash['duration']
         | 
| 105 111 | 
             
                  channels = hash['channels']
         | 
| 106 | 
            -
                  start_time =  | 
| 107 | 
            -
             | 
| 112 | 
            +
                  start_time = DateTimeHelper.from_rfc3339(hash['startTime']) if
         | 
| 113 | 
            +
                    hash['startTime']
         | 
| 114 | 
            +
                  end_time = DateTimeHelper.from_rfc3339(hash['endTime']) if
         | 
| 115 | 
            +
                    hash['endTime']
         | 
| 108 116 | 
             
                  file_format = hash['fileFormat']
         | 
| 109 117 | 
             
                  status = hash['status']
         | 
| 110 118 | 
             
                  media_url = hash['mediaUrl']
         | 
| 111 119 |  | 
| 112 120 | 
             
                  # Create object from extracted values.
         | 
| 113 | 
            -
                   | 
| 114 | 
            -
             | 
| 115 | 
            -
             | 
| 116 | 
            -
             | 
| 117 | 
            -
             | 
| 118 | 
            -
             | 
| 119 | 
            -
             | 
| 120 | 
            -
             | 
| 121 | 
            -
             | 
| 122 | 
            -
             | 
| 123 | 
            -
             | 
| 121 | 
            +
                  ConferenceRecordingMetadata.new(account_id,
         | 
| 122 | 
            +
                                                  conference_id,
         | 
| 123 | 
            +
                                                  name,
         | 
| 124 | 
            +
                                                  recording_id,
         | 
| 125 | 
            +
                                                  duration,
         | 
| 126 | 
            +
                                                  channels,
         | 
| 127 | 
            +
                                                  start_time,
         | 
| 128 | 
            +
                                                  end_time,
         | 
| 129 | 
            +
                                                  file_format,
         | 
| 130 | 
            +
                                                  status,
         | 
| 131 | 
            +
                                                  media_url)
         | 
| 132 | 
            +
                end
         | 
| 133 | 
            +
             | 
| 134 | 
            +
                def to_start_time
         | 
| 135 | 
            +
                  DateTimeHelper.to_rfc3339(start_time)
         | 
| 136 | 
            +
                end
         | 
| 137 | 
            +
             | 
| 138 | 
            +
                def to_end_time
         | 
| 139 | 
            +
                  DateTimeHelper.to_rfc3339(end_time)
         | 
| 124 140 | 
             
                end
         | 
| 125 141 | 
             
              end
         | 
| 126 142 | 
             
            end
         |