bandwidth-sdk 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +4 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/start_recording.rb +4 -1
- data/lib/bandwidth/voice_lib/voice.rb +11 -4
- data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +540 -90
- data/lib/bandwidth/voice_lib/voice/exceptions/{error_response_exception.rb → api_error_response_exception.rb} +3 -3
- data/lib/bandwidth/voice_lib/voice/models/api_call_response.rb +11 -2
- data/lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb +164 -0
- data/lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb +1 -1
- data/lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb +71 -0
- data/lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb +35 -0
- data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +44 -0
- data/lib/bandwidth/voice_lib/voice/models/modify_call_recording_state.rb +1 -1
- data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +35 -25
- data/lib/bandwidth/voice_lib/voice/models/state1_enum.rb +4 -7
- data/lib/bandwidth/voice_lib/voice/models/state2_enum.rb +20 -0
- data/lib/bandwidth/voice_lib/voice/models/state_enum.rb +7 -4
- data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +32 -0
- data/lib/bandwidth/voice_lib/voice/models/status_enum.rb +26 -0
- data/lib/bandwidth/voice_lib/voice/models/transcript.rb +44 -0
- data/lib/bandwidth/voice_lib/voice/models/transcription.rb +62 -0
- data/lib/bandwidth/voice_lib/voice/models/transcription_response.rb +42 -0
- metadata +13 -6
- data/lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb +0 -65
- data/lib/bandwidth/voice_lib/voice/models/transcription_status_enum.rb +0 -20
- data/lib/bandwidth/voice_lib/voice/models/type_enum.rb +0 -32
@@ -7,14 +7,11 @@ module Bandwidth
|
|
7
7
|
# State1.
|
8
8
|
class State1Enum
|
9
9
|
STATE1_ENUM = [
|
10
|
-
# TODO: Write general description for
|
11
|
-
|
10
|
+
# TODO: Write general description for ACTIVE
|
11
|
+
ACTIVE = 'active'.freeze,
|
12
12
|
|
13
|
-
# TODO: Write general description for
|
14
|
-
|
15
|
-
|
16
|
-
# TODO: Write general description for RECORDING
|
17
|
-
RECORDING = 'RECORDING'.freeze
|
13
|
+
# TODO: Write general description for COMPLETED
|
14
|
+
COMPLETED = 'completed'.freeze
|
18
15
|
].freeze
|
19
16
|
end
|
20
17
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# State2.
|
8
|
+
class State2Enum
|
9
|
+
STATE2_ENUM = [
|
10
|
+
# TODO: Write general description for NOT_RECORDING
|
11
|
+
NOT_RECORDING = 'NOT_RECORDING'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for PAUSED
|
14
|
+
PAUSED = 'PAUSED'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for RECORDING
|
17
|
+
RECORDING = 'RECORDING'.freeze
|
18
|
+
].freeze
|
19
|
+
end
|
20
|
+
end
|
@@ -7,11 +7,14 @@ module Bandwidth
|
|
7
7
|
# State.
|
8
8
|
class StateEnum
|
9
9
|
STATE_ENUM = [
|
10
|
-
# TODO: Write general description for
|
11
|
-
|
10
|
+
# TODO: Write general description for DISCONNECTED
|
11
|
+
DISCONNECTED = 'DISCONNECTED'.freeze,
|
12
12
|
|
13
|
-
# TODO: Write general description for
|
14
|
-
|
13
|
+
# TODO: Write general description for ANSWERED
|
14
|
+
ANSWERED = 'ANSWERED'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for INITIATED
|
17
|
+
INITIATED = 'INITIATED'.freeze
|
15
18
|
].freeze
|
16
19
|
end
|
17
20
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# Status1.
|
8
|
+
class Status1Enum
|
9
|
+
STATUS1_ENUM = [
|
10
|
+
# TODO: Write general description for REQUESTED
|
11
|
+
REQUESTED = 'requested'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for NONE
|
14
|
+
NONE = 'none'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for PROCESSING
|
17
|
+
PROCESSING = 'processing'.freeze,
|
18
|
+
|
19
|
+
# TODO: Write general description for AVAILABLE
|
20
|
+
AVAILABLE = 'available'.freeze,
|
21
|
+
|
22
|
+
# TODO: Write general description for ERROR
|
23
|
+
ERROR = 'error'.freeze,
|
24
|
+
|
25
|
+
# TODO: Write general description for TIMEOUT
|
26
|
+
TIMEOUT = 'timeout'.freeze,
|
27
|
+
|
28
|
+
# TODO: Write general description for FILESIZETOOBIG
|
29
|
+
FILESIZETOOBIG = 'file-size-too-big'.freeze
|
30
|
+
].freeze
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# Status.
|
8
|
+
class StatusEnum
|
9
|
+
STATUS_ENUM = [
|
10
|
+
# TODO: Write general description for PROCESSING
|
11
|
+
PROCESSING = 'processing'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for PARTIAL
|
14
|
+
PARTIAL = 'partial'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for COMPLETE
|
17
|
+
COMPLETE = 'complete'.freeze,
|
18
|
+
|
19
|
+
# TODO: Write general description for DELETED
|
20
|
+
DELETED = 'deleted'.freeze,
|
21
|
+
|
22
|
+
# TODO: Write general description for ERROR
|
23
|
+
ERROR = 'error'.freeze
|
24
|
+
].freeze
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# Transcript Model.
|
8
|
+
class Transcript < BaseModel
|
9
|
+
# TODO: Write general description for this method
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :text
|
12
|
+
|
13
|
+
# TODO: Write general description for this method
|
14
|
+
# @return [Float]
|
15
|
+
attr_accessor :confidence
|
16
|
+
|
17
|
+
# A mapping from model property names to API property names.
|
18
|
+
def self.names
|
19
|
+
@_hash = {} if @_hash.nil?
|
20
|
+
@_hash['text'] = 'text'
|
21
|
+
@_hash['confidence'] = 'confidence'
|
22
|
+
@_hash
|
23
|
+
end
|
24
|
+
|
25
|
+
def initialize(text = nil,
|
26
|
+
confidence = nil)
|
27
|
+
@text = text
|
28
|
+
@confidence = confidence
|
29
|
+
end
|
30
|
+
|
31
|
+
# Creates an instance of the object from a hash.
|
32
|
+
def self.from_hash(hash)
|
33
|
+
return nil unless hash
|
34
|
+
|
35
|
+
# Extract variables from the hash.
|
36
|
+
text = hash['text']
|
37
|
+
confidence = hash['confidence']
|
38
|
+
|
39
|
+
# Create object from extracted values.
|
40
|
+
Transcript.new(text,
|
41
|
+
confidence)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# Transcription Model.
|
8
|
+
class Transcription < BaseModel
|
9
|
+
# TODO: Write general description for this method
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :id
|
12
|
+
|
13
|
+
# TODO: Write general description for this method
|
14
|
+
# @return [Status1Enum]
|
15
|
+
attr_accessor :status
|
16
|
+
|
17
|
+
# TODO: Write general description for this method
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :completed_time
|
20
|
+
|
21
|
+
# TODO: Write general description for this method
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :url
|
24
|
+
|
25
|
+
# A mapping from model property names to API property names.
|
26
|
+
def self.names
|
27
|
+
@_hash = {} if @_hash.nil?
|
28
|
+
@_hash['id'] = 'id'
|
29
|
+
@_hash['status'] = 'status'
|
30
|
+
@_hash['completed_time'] = 'completedTime'
|
31
|
+
@_hash['url'] = 'url'
|
32
|
+
@_hash
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(id = nil,
|
36
|
+
status = nil,
|
37
|
+
completed_time = nil,
|
38
|
+
url = nil)
|
39
|
+
@id = id
|
40
|
+
@status = status
|
41
|
+
@completed_time = completed_time
|
42
|
+
@url = url
|
43
|
+
end
|
44
|
+
|
45
|
+
# Creates an instance of the object from a hash.
|
46
|
+
def self.from_hash(hash)
|
47
|
+
return nil unless hash
|
48
|
+
|
49
|
+
# Extract variables from the hash.
|
50
|
+
id = hash['id']
|
51
|
+
status = hash['status']
|
52
|
+
completed_time = hash['completedTime']
|
53
|
+
url = hash['url']
|
54
|
+
|
55
|
+
# Create object from extracted values.
|
56
|
+
Transcription.new(id,
|
57
|
+
status,
|
58
|
+
completed_time,
|
59
|
+
url)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# bandwidth
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module Bandwidth
|
7
|
+
# TranscriptionResponse Model.
|
8
|
+
class TranscriptionResponse < BaseModel
|
9
|
+
# TODO: Write general description for this method
|
10
|
+
# @return [List of Transcript]
|
11
|
+
attr_accessor :transcripts
|
12
|
+
|
13
|
+
# A mapping from model property names to API property names.
|
14
|
+
def self.names
|
15
|
+
@_hash = {} if @_hash.nil?
|
16
|
+
@_hash['transcripts'] = 'transcripts'
|
17
|
+
@_hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def initialize(transcripts = nil)
|
21
|
+
@transcripts = transcripts
|
22
|
+
end
|
23
|
+
|
24
|
+
# Creates an instance of the object from a hash.
|
25
|
+
def self.from_hash(hash)
|
26
|
+
return nil unless hash
|
27
|
+
|
28
|
+
# Extract variables from the hash.
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
transcripts = nil
|
31
|
+
unless hash['transcripts'].nil?
|
32
|
+
transcripts = []
|
33
|
+
hash['transcripts'].each do |structure|
|
34
|
+
transcripts << (Transcript.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Create object from extracted values.
|
39
|
+
TranscriptionResponse.new(transcripts)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bandwidth-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- APIMatic SDK Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|
@@ -137,22 +137,29 @@ files:
|
|
137
137
|
- lib/bandwidth/voice_lib/voice/client.rb
|
138
138
|
- lib/bandwidth/voice_lib/voice/controllers/api_controller.rb
|
139
139
|
- lib/bandwidth/voice_lib/voice/controllers/base_controller.rb
|
140
|
-
- lib/bandwidth/voice_lib/voice/exceptions/
|
140
|
+
- lib/bandwidth/voice_lib/voice/exceptions/api_error_response_exception.rb
|
141
141
|
- lib/bandwidth/voice_lib/voice/models/answer_method_enum.rb
|
142
142
|
- lib/bandwidth/voice_lib/voice/models/api_call_response.rb
|
143
|
+
- lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb
|
143
144
|
- lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb
|
144
|
-
- lib/bandwidth/voice_lib/voice/models/api_get_account_recordings_metadata_request.rb
|
145
145
|
- lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb
|
146
|
+
- lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb
|
147
|
+
- lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb
|
146
148
|
- lib/bandwidth/voice_lib/voice/models/direction_enum.rb
|
149
|
+
- lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb
|
147
150
|
- lib/bandwidth/voice_lib/voice/models/disconnect_method_enum.rb
|
148
151
|
- lib/bandwidth/voice_lib/voice/models/file_format_enum.rb
|
149
152
|
- lib/bandwidth/voice_lib/voice/models/modify_call_recording_state.rb
|
150
153
|
- lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb
|
151
154
|
- lib/bandwidth/voice_lib/voice/models/redirect_method_enum.rb
|
152
155
|
- lib/bandwidth/voice_lib/voice/models/state1_enum.rb
|
156
|
+
- lib/bandwidth/voice_lib/voice/models/state2_enum.rb
|
153
157
|
- lib/bandwidth/voice_lib/voice/models/state_enum.rb
|
154
|
-
- lib/bandwidth/voice_lib/voice/models/
|
155
|
-
- lib/bandwidth/voice_lib/voice/models/
|
158
|
+
- lib/bandwidth/voice_lib/voice/models/status1_enum.rb
|
159
|
+
- lib/bandwidth/voice_lib/voice/models/status_enum.rb
|
160
|
+
- lib/bandwidth/voice_lib/voice/models/transcript.rb
|
161
|
+
- lib/bandwidth/voice_lib/voice/models/transcription.rb
|
162
|
+
- lib/bandwidth/voice_lib/voice/models/transcription_response.rb
|
156
163
|
homepage: https://apimatic.io
|
157
164
|
licenses:
|
158
165
|
- MIT
|
@@ -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
|