bandwidth-sdk 3.0.0 → 3.5.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 (34) 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/client.rb +4 -0
  7. data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
  8. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth.rb +20 -0
  9. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb +44 -0
  10. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/api_controller.rb +153 -0
  11. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +49 -0
  12. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/exceptions/invalid_request_exception.rb +29 -0
  13. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_code_request_schema.rb +88 -0
  14. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_messaging_response.rb +35 -0
  15. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_code_response.rb +35 -0
  16. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb +94 -0
  17. data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_voice_response.rb +35 -0
  18. data/lib/bandwidth/voice_lib/bxml/verbs/conference.rb +28 -0
  19. data/lib/bandwidth/voice_lib/bxml/verbs/gather.rb +8 -0
  20. data/lib/bandwidth/voice_lib/bxml/verbs/record.rb +2 -1
  21. data/lib/bandwidth/voice_lib/bxml/verbs/send_dtmf.rb +4 -1
  22. data/lib/bandwidth/voice_lib/voice.rb +2 -0
  23. data/lib/bandwidth/voice_lib/voice/client.rb +4 -0
  24. data/lib/bandwidth/voice_lib/voice/controllers/api_controller.rb +145 -78
  25. data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
  26. data/lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb +20 -2
  27. data/lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb +35 -0
  28. data/lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb +4 -1
  29. data/lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb +1 -1
  30. data/lib/bandwidth/voice_lib/voice/models/status1_enum.rb +8 -14
  31. data/lib/bandwidth/voice_lib/voice/models/status2_enum.rb +32 -0
  32. data/lib/bandwidth/voice_lib/voice/models/status_enum.rb +4 -13
  33. data/lib/bandwidth/voice_lib/voice/models/transcription.rb +1 -1
  34. metadata +18 -4
@@ -13,7 +13,7 @@ module Bandwidth
13
13
  @http_call_back = http_call_back
14
14
 
15
15
  @global_headers = {
16
- 'user-agent' => 'ruby-sdk-refs/tags/ruby3.0.0'
16
+ 'user-agent' => 'ruby-sdk-refs/tags/ruby3.5.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: 3.0.0
4
+ version: 3.5.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-04-03 00:00:00.000000000 Z
11
+ date: 2020-06-22 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
@@ -128,8 +129,19 @@ files:
128
129
  - lib/bandwidth/messaging_lib/messaging/models/message_request.rb
129
130
  - lib/bandwidth/messaging_lib/messaging/models/tag.rb
130
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/exceptions/invalid_request_exception.rb
137
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_code_request_schema.rb
138
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_messaging_response.rb
139
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_code_response.rb
140
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_verify_request_schema.rb
141
+ - lib/bandwidth/two_factor_auth_lib/two_factor_auth/models/two_factor_voice_response.rb
131
142
  - lib/bandwidth/utilities/file_wrapper.rb
132
143
  - lib/bandwidth/voice_lib/bxml/bxml.rb
144
+ - lib/bandwidth/voice_lib/bxml/verbs/conference.rb
133
145
  - lib/bandwidth/voice_lib/bxml/verbs/forward.rb
134
146
  - lib/bandwidth/voice_lib/bxml/verbs/gather.rb
135
147
  - lib/bandwidth/voice_lib/bxml/verbs/hangup.rb
@@ -157,6 +169,7 @@ files:
157
169
  - lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb
158
170
  - lib/bandwidth/voice_lib/voice/models/api_modify_call_request.rb
159
171
  - lib/bandwidth/voice_lib/voice/models/api_transcribe_recording_request.rb
172
+ - lib/bandwidth/voice_lib/voice/models/call_engine_modify_conference_request.rb
160
173
  - lib/bandwidth/voice_lib/voice/models/callback_method_enum.rb
161
174
  - lib/bandwidth/voice_lib/voice/models/direction_enum.rb
162
175
  - lib/bandwidth/voice_lib/voice/models/disconnect_cause_enum.rb
@@ -169,6 +182,7 @@ files:
169
182
  - lib/bandwidth/voice_lib/voice/models/state2_enum.rb
170
183
  - lib/bandwidth/voice_lib/voice/models/state_enum.rb
171
184
  - lib/bandwidth/voice_lib/voice/models/status1_enum.rb
185
+ - lib/bandwidth/voice_lib/voice/models/status2_enum.rb
172
186
  - lib/bandwidth/voice_lib/voice/models/status_enum.rb
173
187
  - lib/bandwidth/voice_lib/voice/models/transcript.rb
174
188
  - lib/bandwidth/voice_lib/voice/models/transcription.rb