bandwidth-sdk 2.2.2 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bandwidth.rb +2 -1
  3. data/lib/bandwidth/client.rb +9 -0
  4. data/lib/bandwidth/configuration.rb +22 -4
  5. data/lib/bandwidth/http/auth/two_factor_auth_basic_auth.rb +22 -0
  6. data/lib/bandwidth/messaging_lib/messaging.rb +1 -3
  7. data/lib/bandwidth/messaging_lib/messaging/client.rb +4 -0
  8. data/lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb +30 -83
  9. data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
  10. data/lib/bandwidth/messaging_lib/messaging/exceptions/{generic_client_exception.rb → messaging_exception.rb} +2 -14
  11. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +19 -0
  12. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb +44 -0
  13. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/api_controller.rb +129 -0
  14. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +49 -0
  15. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_code_request_schema.rb +62 -0
  16. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_messaging_response.rb +35 -0
  17. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_code_response.rb +35 -0
  18. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb +71 -0
  19. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_voice_response.rb +35 -0
  20. data/lib/bandwidth/voice_lib/bxml/verbs/conference.rb +28 -0
  21. data/lib/bandwidth/voice_lib/bxml/verbs/gather.rb +8 -0
  22. data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +2 -1
  23. data/lib/bandwidth/voice_lib/bxml/verbs/send_dtmf.rb +4 -1
  24. data/lib/bandwidth/voice_lib/voice.rb +2 -0
  25. data/lib/bandwidth/voice_lib/voice/client.rb +4 -0
  26. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +145 -78
  27. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
  28. data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +20 -2
  29. data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +35 -0
  30. data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +4 -1
  31. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +1 -1
  32. data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +8 -14
  33. data/lib/bandwidth/voice_lib/voice/models/status2_enum.rb +32 -0
  34. data/lib/bandwidth/voice_lib/voice/models/status_enum.rb +4 -13
  35. data/lib/bandwidth/voice_lib/voice/models/transcription.rb +1 -1
  36. metadata +18 -7
  37. data/lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb +0 -49
  38. data/lib/bandwidth/messaging_lib/messaging/models/field_error.rb +0 -44
@@ -13,7 +13,7 @@ module Bandwidth
13
13
  @http_call_back = http_call_back
14
14
 
15
15
  @global_headers = {
16
- 'user-agent' => 'APIMATIC 2.0'
16
+ 'user-agent' => 'ruby-sdk-refs/tags/ruby3.4.0'
17
17
  }
18
18
  end
19
19
 
@@ -50,6 +50,14 @@ module Bandwidth
50
50
  # @return [String]
51
51
  attr_accessor :application_id
52
52
 
53
+ # Format is E164
54
+ # @return [String]
55
+ attr_accessor :obfuscated_to
56
+
57
+ # Format is E164
58
+ # @return [String]
59
+ attr_accessor :obfuscated_from
60
+
53
61
  # A mapping from model property names to API property names.
54
62
  def self.names
55
63
  @_hash = {} if @_hash.nil?
@@ -64,6 +72,8 @@ module Bandwidth
64
72
  @_hash['disconnect_method'] = 'disconnectMethod'
65
73
  @_hash['tag'] = 'tag'
66
74
  @_hash['application_id'] = 'applicationId'
75
+ @_hash['obfuscated_to'] = 'obfuscatedTo'
76
+ @_hash['obfuscated_from'] = 'obfuscatedFrom'
67
77
  @_hash
68
78
  end
69
79
 
@@ -77,7 +87,9 @@ module Bandwidth
77
87
  answer_method = nil,
78
88
  disconnect_url = nil,
79
89
  disconnect_method = nil,
80
- tag = nil)
90
+ tag = nil,
91
+ obfuscated_to = nil,
92
+ obfuscated_from = nil)
81
93
  @from = from
82
94
  @to = to
83
95
  @call_timeout = call_timeout
@@ -89,6 +101,8 @@ module Bandwidth
89
101
  @disconnect_method = disconnect_method
90
102
  @tag = tag
91
103
  @application_id = application_id
104
+ @obfuscated_to = obfuscated_to
105
+ @obfuscated_from = obfuscated_from
92
106
  end
93
107
 
94
108
  # Creates an instance of the object from a hash.
@@ -107,6 +121,8 @@ module Bandwidth
107
121
  disconnect_url = hash['disconnectUrl']
108
122
  disconnect_method = hash['disconnectMethod']
109
123
  tag = hash['tag']
124
+ obfuscated_to = hash['obfuscatedTo']
125
+ obfuscated_from = hash['obfuscatedFrom']
110
126
 
111
127
  # Create object from extracted values.
112
128
  ApiCreateCallRequest.new(from,
@@ -119,7 +135,9 @@ module Bandwidth
119
135
  answer_method,
120
136
  disconnect_url,
121
137
  disconnect_method,
122
- tag)
138
+ tag,
139
+ obfuscated_to,
140
+ obfuscated_from)
123
141
  end
124
142
  end
125
143
  end
@@ -0,0 +1,35 @@
1
+ # bandwidth
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Bandwidth
7
+ # CallEngineModifyConferenceRequest Model.
8
+ class CallEngineModifyConferenceRequest < BaseModel
9
+ # TODO: Write general description for this method
10
+ # @return [StatusEnum]
11
+ attr_accessor :status
12
+
13
+ # A mapping from model property names to API property names.
14
+ def self.names
15
+ @_hash = {} if @_hash.nil?
16
+ @_hash['status'] = 'status'
17
+ @_hash
18
+ end
19
+
20
+ def initialize(status = nil)
21
+ @status = status
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
+ status = hash['status']
30
+
31
+ # Create object from extracted values.
32
+ CallEngineModifyConferenceRequest.new(status)
33
+ end
34
+ end
35
+ end
@@ -38,7 +38,10 @@ module Bandwidth
38
38
  NODECAPACITYEXCEEDED = 'node-capacity-exceeded'.freeze,
39
39
 
40
40
  # TODO: Write general description for UNKNOWN
41
- UNKNOWN = 'unknown'.freeze
41
+ UNKNOWN = 'unknown'.freeze,
42
+
43
+ # TODO: Write general description for APPLICATIONERROR
44
+ APPLICATIONERROR = 'application-error'.freeze
42
45
  ].freeze
43
46
  end
44
47
  end
@@ -55,7 +55,7 @@ module Bandwidth
55
55
  attr_accessor :file_format
56
56
 
57
57
  # Format is ISO-8601
58
- # @return [StatusEnum]
58
+ # @return [Status1Enum]
59
59
  attr_accessor :status
60
60
 
61
61
  # Format is ISO-8601
@@ -7,26 +7,20 @@ module Bandwidth
7
7
  # Status1.
8
8
  class Status1Enum
9
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
10
  # TODO: Write general description for PROCESSING
17
11
  PROCESSING = 'processing'.freeze,
18
12
 
19
- # TODO: Write general description for AVAILABLE
20
- AVAILABLE = 'available'.freeze,
13
+ # TODO: Write general description for PARTIAL
14
+ PARTIAL = 'partial'.freeze,
21
15
 
22
- # TODO: Write general description for ERROR
23
- ERROR = 'error'.freeze,
16
+ # TODO: Write general description for COMPLETE
17
+ COMPLETE = 'complete'.freeze,
24
18
 
25
- # TODO: Write general description for TIMEOUT
26
- TIMEOUT = 'timeout'.freeze,
19
+ # TODO: Write general description for DELETED
20
+ DELETED = 'deleted'.freeze,
27
21
 
28
- # TODO: Write general description for FILESIZETOOBIG
29
- FILESIZETOOBIG = 'file-size-too-big'.freeze
22
+ # TODO: Write general description for ERROR
23
+ ERROR = 'error'.freeze
30
24
  ].freeze
31
25
  end
32
26
  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
+ # Status2.
8
+ class Status2Enum
9
+ STATUS2_ENUM = [
10
+ # TODO: Write general description for NONE
11
+ NONE = 'none'.freeze,
12
+
13
+ # TODO: Write general description for PROCESSING
14
+ PROCESSING = 'processing'.freeze,
15
+
16
+ # TODO: Write general description for AVAILABLE
17
+ AVAILABLE = 'available'.freeze,
18
+
19
+ # TODO: Write general description for ERROR
20
+ ERROR = 'error'.freeze,
21
+
22
+ # TODO: Write general description for TIMEOUT
23
+ TIMEOUT = 'timeout'.freeze,
24
+
25
+ # TODO: Write general description for FILESIZETOOBIG
26
+ FILESIZETOOBIG = 'file-size-too-big'.freeze,
27
+
28
+ # TODO: Write general description for FILESIZETOOSMALL
29
+ FILESIZETOOSMALL = 'file-size-too-small'.freeze
30
+ ].freeze
31
+ end
32
+ end
@@ -7,20 +7,11 @@ module Bandwidth
7
7
  # Status.
8
8
  class StatusEnum
9
9
  STATUS_ENUM = [
10
- # TODO: Write general description for PROCESSING
11
- PROCESSING = 'processing'.freeze,
10
+ # TODO: Write general description for ACTIVE
11
+ ACTIVE = 'active'.freeze,
12
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
13
+ # TODO: Write general description for COMPLETED
14
+ COMPLETED = 'completed'.freeze
24
15
  ].freeze
25
16
  end
26
17
  end
@@ -11,7 +11,7 @@ module Bandwidth
11
11
  attr_accessor :id
12
12
 
13
13
  # TODO: Write general description for this method
14
- # @return [Status1Enum]
14
+ # @return [Status2Enum]
15
15
  attr_accessor :status
16
16
 
17
17
  # TODO: Write general description for this method
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.2.2
4
+ version: 3.4.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-03-16 00:00:00.000000000 Z
11
+ date: 2020-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 2.0.0
75
+ version: '2.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 2.0.0
82
+ version: '2.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: builder
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -109,6 +109,7 @@ files:
109
109
  - lib/bandwidth/exceptions/api_exception.rb
110
110
  - lib/bandwidth/http/api_response.rb
111
111
  - lib/bandwidth/http/auth/messaging_basic_auth.rb
112
+ - lib/bandwidth/http/auth/two_factor_auth_basic_auth.rb
112
113
  - lib/bandwidth/http/auth/voice_basic_auth.rb
113
114
  - lib/bandwidth/http/faraday_client.rb
114
115
  - lib/bandwidth/http/http_call_back.rb
@@ -120,18 +121,26 @@ files:
120
121
  - lib/bandwidth/messaging_lib/messaging/client.rb
121
122
  - lib/bandwidth/messaging_lib/messaging/controllers/api_controller.rb
122
123
  - lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb
123
- - lib/bandwidth/messaging_lib/messaging/exceptions/generic_client_exception.rb
124
- - lib/bandwidth/messaging_lib/messaging/exceptions/path_client_exception.rb
124
+ - lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb
125
125
  - lib/bandwidth/messaging_lib/messaging/models/bandwidth_callback_message.rb
126
126
  - lib/bandwidth/messaging_lib/messaging/models/bandwidth_message.rb
127
127
  - lib/bandwidth/messaging_lib/messaging/models/deferred_result.rb
128
- - lib/bandwidth/messaging_lib/messaging/models/field_error.rb
129
128
  - lib/bandwidth/messaging_lib/messaging/models/media.rb
130
129
  - lib/bandwidth/messaging_lib/messaging/models/message_request.rb
131
130
  - lib/bandwidth/messaging_lib/messaging/models/tag.rb
132
131
  - lib/bandwidth/models/base_model.rb
132
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb
133
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb
134
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/api_controller.rb
135
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb
136
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_code_request_schema.rb
137
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_messaging_response.rb
138
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_code_response.rb
139
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb
140
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_voice_response.rb
133
141
  - lib/bandwidth/utilities/file_wrapper.rb
134
142
  - lib/bandwidth/voice_lib/bxml/bxml.rb
143
+ - lib/bandwidth/voice_lib/bxml/verbs/conference.rb
135
144
  - lib/bandwidth/voice_lib/bxml/verbs/forward.rb
136
145
  - lib/bandwidth/voice_lib/bxml/verbs/gather.rb
137
146
  - lib/bandwidth/voice_lib/bxml/verbs/hangup.rb
@@ -159,6 +168,7 @@ files:
159
168
  - lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb
160
169
  - lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb
161
170
  - lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb
171
+ - lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb
162
172
  - lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb
163
173
  - lib/bandwidth/voice_lib/voice/models/direction_enum.rb
164
174
  - lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb
@@ -171,6 +181,7 @@ files:
171
181
  - lib/bandwidth/voice_lib/voice/models/state2_enum.rb
172
182
  - lib/bandwidth/voice_lib/voice/models/state_enum.rb
173
183
  - lib/bandwidth/voice_lib/voice/models/status1_enum.rb
184
+ - lib/bandwidth/voice_lib/voice/models/status2_enum.rb
174
185
  - lib/bandwidth/voice_lib/voice/models/status_enum.rb
175
186
  - lib/bandwidth/voice_lib/voice/models/transcript.rb
176
187
  - lib/bandwidth/voice_lib/voice/models/transcription.rb
@@ -1,49 +0,0 @@
1
- # bandwidth
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module Bandwidth
7
- # PathClientException class.
8
- class PathClientException < APIException
9
- # TODO: Write general description for this method
10
- # @return [String]
11
- attr_accessor :timestamp
12
-
13
- # TODO: Write general description for this method
14
- # @return [Integer]
15
- attr_accessor :status
16
-
17
- # TODO: Write general description for this method
18
- # @return [String]
19
- attr_accessor :error
20
-
21
- # TODO: Write general description for this method
22
- # @return [String]
23
- attr_accessor :message
24
-
25
- # TODO: Write general description for this method
26
- # @return [String]
27
- attr_accessor :path
28
-
29
- # The constructor.
30
- # @param [String] The reason for raising an exception.
31
- # @param [HttpResponse] The HttpReponse of the API call.
32
- def initialize(reason, response)
33
- super(reason, response)
34
- hash = APIHelper.json_deserialize(@response.raw_body)
35
- unbox(hash)
36
- end
37
-
38
- # Populates this object by extracting properties from a hash.
39
- # @param [Hash] The deserialized response sent by the server in the
40
- # response body.
41
- def unbox(hash)
42
- @timestamp = hash['timestamp']
43
- @status = hash['status']
44
- @error = hash['error']
45
- @message = hash['message']
46
- @path = hash['path']
47
- end
48
- end
49
- end
@@ -1,44 +0,0 @@
1
- # bandwidth
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module Bandwidth
7
- # FieldError Model.
8
- class FieldError < BaseModel
9
- # TODO: Write general description for this method
10
- # @return [String]
11
- attr_accessor :field_name
12
-
13
- # TODO: Write general description for this method
14
- # @return [String]
15
- attr_accessor :description
16
-
17
- # A mapping from model property names to API property names.
18
- def self.names
19
- @_hash = {} if @_hash.nil?
20
- @_hash['field_name'] = 'fieldName'
21
- @_hash['description'] = 'description'
22
- @_hash
23
- end
24
-
25
- def initialize(field_name = nil,
26
- description = nil)
27
- @field_name = field_name
28
- @description = description
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
- field_name = hash['fieldName']
37
- description = hash['description']
38
-
39
- # Create object from extracted values.
40
- FieldError.new(field_name,
41
- description)
42
- end
43
- end
44
- end