vonage 7.29.1 → 8.0.0.beta

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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -476
  3. data/lib/vonage/applications.rb +4 -12
  4. data/lib/vonage/basic.rb +1 -1
  5. data/lib/vonage/bearer_token.rb +1 -1
  6. data/lib/vonage/client.rb +0 -65
  7. data/lib/vonage/client_error.rb +1 -1
  8. data/lib/vonage/config.rb +1 -9
  9. data/lib/vonage/conversations/events.rb +0 -12
  10. data/lib/vonage/conversations/legs.rb +0 -6
  11. data/lib/vonage/conversations/members.rb +0 -15
  12. data/lib/vonage/conversations/users.rb +0 -15
  13. data/lib/vonage/conversations.rb +0 -30
  14. data/lib/vonage/errors.rb +20 -37
  15. data/lib/vonage/gsm7.rb +1 -1
  16. data/lib/vonage/http.rb +3 -3
  17. data/lib/vonage/jwt.rb +0 -17
  18. data/lib/vonage/key_secret_params.rb +2 -3
  19. data/lib/vonage/keys.rb +1 -14
  20. data/lib/vonage/logger.rb +3 -5
  21. data/lib/vonage/messaging/channels/viber.rb +2 -9
  22. data/lib/vonage/messaging/channels/whats_app.rb +1 -3
  23. data/lib/vonage/messaging/message.rb +0 -1
  24. data/lib/vonage/messaging.rb +4 -34
  25. data/lib/vonage/namespace.rb +68 -137
  26. data/lib/vonage/numbers.rb +17 -40
  27. data/lib/vonage/server_error.rb +1 -1
  28. data/lib/vonage/signature.rb +5 -5
  29. data/lib/vonage/sms.rb +20 -20
  30. data/lib/vonage/version.rb +1 -1
  31. data/lib/vonage/video/archives.rb +58 -25
  32. data/lib/vonage/video/list_response.rb +11 -0
  33. data/lib/vonage/video/moderation.rb +22 -7
  34. data/lib/vonage/video/signals.rb +9 -4
  35. data/lib/vonage/video/streams.rb +12 -6
  36. data/lib/vonage/video.rb +13 -50
  37. data/lib/vonage/voice/actions/connect.rb +5 -34
  38. data/lib/vonage/voice/actions/conversation.rb +4 -10
  39. data/lib/vonage/voice/actions/input.rb +3 -19
  40. data/lib/vonage/voice/actions/notify.rb +3 -8
  41. data/lib/vonage/voice/actions/pay.rb +107 -0
  42. data/lib/vonage/voice/actions/record.rb +4 -52
  43. data/lib/vonage/voice/actions/stream.rb +4 -48
  44. data/lib/vonage/voice/actions/talk.rb +4 -54
  45. data/lib/vonage/voice/talk.rb +1 -11
  46. data/lib/vonage/voice.rb +0 -24
  47. data/lib/vonage.rb +0 -4
  48. data/vonage.gemspec +1 -3
  49. metadata +12 -108
  50. data/lib/vonage/api_error.rb +0 -33
  51. data/lib/vonage/conversation/event/list_response.rb +0 -11
  52. data/lib/vonage/conversation/event.rb +0 -108
  53. data/lib/vonage/conversation/list_response.rb +0 -11
  54. data/lib/vonage/conversation/member/list_response.rb +0 -11
  55. data/lib/vonage/conversation/member.rb +0 -134
  56. data/lib/vonage/conversation/user/conversations_list_response.rb +0 -11
  57. data/lib/vonage/conversation/user/sessions_list_response.rb +0 -11
  58. data/lib/vonage/conversation/user.rb +0 -67
  59. data/lib/vonage/conversation.rb +0 -164
  60. data/lib/vonage/meetings/applications.rb +0 -28
  61. data/lib/vonage/meetings/dial_in_numbers/list_response.rb +0 -11
  62. data/lib/vonage/meetings/dial_in_numbers.rb +0 -26
  63. data/lib/vonage/meetings/recordings.rb +0 -42
  64. data/lib/vonage/meetings/rooms/list_response.rb +0 -11
  65. data/lib/vonage/meetings/rooms.rb +0 -167
  66. data/lib/vonage/meetings/sessions/list_response.rb +0 -11
  67. data/lib/vonage/meetings/sessions.rb +0 -31
  68. data/lib/vonage/meetings/themes/list_response.rb +0 -11
  69. data/lib/vonage/meetings/themes.rb +0 -239
  70. data/lib/vonage/meetings.rb +0 -50
  71. data/lib/vonage/messaging/channels/rcs.rb +0 -42
  72. data/lib/vonage/network_authentication/client_authentication.rb +0 -39
  73. data/lib/vonage/network_authentication/server_authentication.rb +0 -47
  74. data/lib/vonage/network_authentication.rb +0 -22
  75. data/lib/vonage/network_number_verification.rb +0 -92
  76. data/lib/vonage/network_sim_swap.rb +0 -84
  77. data/lib/vonage/number_insight_2.rb +0 -36
  78. data/lib/vonage/proactive_connect/events/list_response.rb +0 -11
  79. data/lib/vonage/proactive_connect/events.rb +0 -71
  80. data/lib/vonage/proactive_connect/item.rb +0 -116
  81. data/lib/vonage/proactive_connect/items/file_response.rb +0 -32
  82. data/lib/vonage/proactive_connect/items/list_response.rb +0 -11
  83. data/lib/vonage/proactive_connect/items.rb +0 -116
  84. data/lib/vonage/proactive_connect/list.rb +0 -186
  85. data/lib/vonage/proactive_connect/lists/list_response.rb +0 -11
  86. data/lib/vonage/proactive_connect/lists.rb +0 -38
  87. data/lib/vonage/proactive_connect.rb +0 -43
  88. data/lib/vonage/subaccounts/balance_transfers/list_response.rb +0 -11
  89. data/lib/vonage/subaccounts/credit_transfers/list_response.rb +0 -11
  90. data/lib/vonage/subaccounts/list_response.rb +0 -15
  91. data/lib/vonage/subaccounts.rb +0 -203
  92. data/lib/vonage/users/list_response.rb +0 -11
  93. data/lib/vonage/users.rb +0 -156
  94. data/lib/vonage/verify2/channels/email.rb +0 -36
  95. data/lib/vonage/verify2/channels/silent_auth.rb +0 -45
  96. data/lib/vonage/verify2/channels/sms.rb +0 -63
  97. data/lib/vonage/verify2/channels/voice.rb +0 -32
  98. data/lib/vonage/verify2/channels/whats_app.rb +0 -39
  99. data/lib/vonage/verify2/channels/whats_app_interactive.rb +0 -32
  100. data/lib/vonage/verify2/start_verification_options.rb +0 -63
  101. data/lib/vonage/verify2/template_fragments/list_response.rb +0 -11
  102. data/lib/vonage/verify2/template_fragments.rb +0 -125
  103. data/lib/vonage/verify2/templates/list_response.rb +0 -11
  104. data/lib/vonage/verify2/templates.rb +0 -86
  105. data/lib/vonage/verify2/workflow.rb +0 -39
  106. data/lib/vonage/verify2/workflow_builder.rb +0 -25
  107. data/lib/vonage/verify2.rb +0 -112
  108. data/lib/vonage/video/archives/list_response.rb +0 -11
  109. data/lib/vonage/video/broadcasts/list_response.rb +0 -11
  110. data/lib/vonage/video/broadcasts.rb +0 -75
  111. data/lib/vonage/video/captions.rb +0 -67
  112. data/lib/vonage/video/renders/list_response.rb +0 -11
  113. data/lib/vonage/video/renders.rb +0 -107
  114. data/lib/vonage/video/sip.rb +0 -48
  115. data/lib/vonage/video/streams/list_response.rb +0 -11
  116. data/lib/vonage/video/web_socket.rb +0 -61
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
  module Vonage
4
4
  class Voice::Actions::Talk
5
- attr_accessor :text, :bargeIn, :loop, :level, :language, :style, :premium, :eventOnCompletion, :eventUrl, :eventMethod
5
+ attr_accessor :text, :bargeIn, :loop, :level, :language, :style
6
6
 
7
7
  def initialize(attributes= {})
8
8
  @text = attributes.fetch(:text)
@@ -11,16 +11,12 @@ module Vonage
11
11
  @level = attributes.fetch(:level, nil)
12
12
  @language = attributes.fetch(:language, nil)
13
13
  @style = attributes.fetch(:style, nil)
14
- @premium = attributes.fetch(:premium, nil)
15
- @eventOnCompletion = attributes.fetch(:eventOnCompletion, nil)
16
- @eventUrl = attributes.fetch(:eventUrl, nil)
17
- @eventMethod = attributes.fetch(:eventMethod, nil)
18
14
 
19
15
  after_initialize!
20
16
  end
21
17
 
22
18
  def after_initialize!
23
- if self.bargeIn || self.bargeIn == false
19
+ if self.bargeIn
24
20
  verify_barge_in
25
21
  end
26
22
 
@@ -35,22 +31,6 @@ module Vonage
35
31
  if self.style
36
32
  verify_style
37
33
  end
38
-
39
- if self.premium || self.premium == false
40
- verify_premium
41
- end
42
-
43
- if self.eventOnCompletion || self.eventOnCompletion == false
44
- verify_event_on_completion
45
- end
46
-
47
- if self.eventUrl
48
- verify_event_url
49
- end
50
-
51
- if self.eventMethod
52
- verify_event_method
53
- end
54
34
  end
55
35
 
56
36
  def verify_barge_in
@@ -58,7 +38,7 @@ module Vonage
58
38
  end
59
39
 
60
40
  def verify_loop
61
- raise ClientError.new("Expected 'loop' value to be either 0 or a positive integer") unless self.loop >= 0
41
+ raise ClientError.new("Expected 'loop' value to be either 1 or 0") unless self.loop == 1 || self.loop == 0
62
42
  end
63
43
 
64
44
  def verify_level
@@ -69,32 +49,6 @@ module Vonage
69
49
  raise ClientError.new("Expected 'style' value to be an Integer") unless self.style.is_a?(Integer)
70
50
  end
71
51
 
72
- def verify_premium
73
- raise ClientError.new("Expected 'premium' value to be a Boolean") unless self.premium == true || self.premium == false
74
- end
75
-
76
- def verify_event_on_completion
77
- raise ClientError.new("Expected 'eventOnCompletion' value to be a Boolean") unless self.eventOnCompletion == true || self.eventOnCompletion == false
78
- end
79
-
80
- def verify_event_url
81
- unless self.eventUrl.is_a?(Array) && self.eventUrl.length == 1 && self.eventUrl[0].is_a?(String)
82
- raise ClientError.new("Expected 'eventUrl' parameter to be an Array containing a single string item")
83
- end
84
-
85
- uri = URI.parse(self.eventUrl[0])
86
-
87
- raise ClientError.new("Invalid 'eventUrl' value, array must contain a valid URL") unless uri.kind_of?(URI::HTTP) || uri.kind_of?(URI::HTTPS)
88
-
89
- self.eventUrl
90
- end
91
-
92
- def verify_event_method
93
- valid_methods = ['GET', 'POST']
94
-
95
- raise ClientError.new("Invalid 'eventMethod' value. must be either: 'GET' or 'POST'") unless valid_methods.include?(self.eventMethod.upcase)
96
- end
97
-
98
52
  def action
99
53
  create_talk!(self)
100
54
  end
@@ -112,12 +66,8 @@ module Vonage
112
66
  ncco[0].merge!(level: builder.level) if builder.level
113
67
  ncco[0].merge!(language: builder.language) if builder.language
114
68
  ncco[0].merge!(style: builder.style) if builder.style
115
- ncco[0].merge!(premium: builder.premium) if (builder.bargeIn || builder.bargeIn == false)
116
- ncco[0].merge!(eventOnCompletion: builder.eventOnCompletion) if (builder.eventOnCompletion || builder.eventOnCompletion == false)
117
- ncco[0].merge!(eventUrl: builder.eventUrl) if builder.eventUrl
118
- ncco[0].merge!(eventMethod: builder.eventMethod) if builder.eventMethod
119
69
 
120
70
  ncco
121
71
  end
122
72
  end
123
- end
73
+ end
@@ -12,18 +12,8 @@ module Vonage
12
12
  # @option params [required, String] :text
13
13
  # The text to read.
14
14
  #
15
- # @option params [String] :language
16
- # The language to use. See {https://developer.vonage.com/en/api/voice#startTalk-req-body} for a list of valid language codes.
17
- #
18
- # @option params [Integer] :style
19
- # The vocal style, as identified by an assigned integer.
20
- # See {https://developer.vonage.com/en/voice/voice-api/concepts/text-to-speech#supported-languages} for a list of available styles.
21
- #
22
- # @option params [Boolean] :premium
23
- # Set to `true` to use the premium version of the specified style if available, otherwise the standard version will be used.
24
- #
25
15
  # @option params [String] :voice_name
26
- # The voice & language to use. [DEPRECATED: use `language` and `style` instead].
16
+ # The voice & language to use.
27
17
  #
28
18
  # @option params [Integer] :loop
29
19
  # The number of times to repeat the text the file, 0 for infinite.
data/lib/vonage/voice.rb CHANGED
@@ -18,8 +18,6 @@ module Vonage
18
18
  #
19
19
  # @option params [required, Array<Hash>] :to
20
20
  # Connect to a Phone (PSTN) number, SIP Endpoint, Websocket, or VBC extension.
21
- # The `to` Hash can contain a number of different properties depending on the `type`.
22
- # See the API reference for specific details.
23
21
  #
24
22
  # @option params [Hash] :from
25
23
  # Connect to a Phone (PSTN) number. Should not be set if **:random_from_number** is **true**
@@ -50,17 +48,6 @@ module Vonage
50
48
  # @option params [String] :machine_detection
51
49
  # Configure the behavior when Vonage detects that the call is answered by voicemail.
52
50
  #
53
- # @option params [Hash] :advanced_machine_detection
54
- # Configure the behavior of Vonage's advanced machine detection. Overrides machine_detection if both are set.
55
- # Hash with three possible properties:
56
- # - :behavior [String]: Must be one of `continue` or `hangup`. When hangup is used, the call will be terminated if a
57
- # machine is detected. When continue is used, the call will continue even if a machine is detected.
58
- # - :mode [String]: Must be one of `detect` or `detect_beep`. Detect if machine answered and sends a human or
59
- # machine status in the webhook payload. When set to `detect_beep`, the system also attempts to detect
60
- # voice mail beep and sends an additional parameter `sub_state` in the webhook with the value `beep_start`.
61
- # - :beep_timeout [Integer]: Min: 45, Max: 120. Maximum time in seconds Vonage should wait for a machine beep
62
- # to be detected. A machine event with `sub_state` set to `beep_timeout` will be sent if the timeout is exceeded.
63
- #
64
51
  # @option params [Integer] :length_timer
65
52
  # Set the number of seconds that elapse before Vonage hangs up after the call state changes to in_progress.
66
53
  #
@@ -281,16 +268,5 @@ module Vonage
281
268
  def dtmf
282
269
  @dtmf ||= DTMF.new(@config)
283
270
  end
284
-
285
- # Validate a JSON Web Token from a Voice API Webhook.
286
- #
287
- # @param [String, required] :token The JWT from the Webhook's Authorization header
288
- # @param [String, optional] :signature_secret The account signature secret. Required, unless `signature_secret`
289
- # is set in `Config`
290
- #
291
- # @return [Boolean] true, if the JWT is verified, false otherwise
292
- def verify_webhook_token(token:, signature_secret: @config.signature_secret)
293
- JWT.verify_hs256_signature(token: token, signature_secret: signature_secret)
294
- end
295
271
  end
296
272
  end
data/lib/vonage.rb CHANGED
@@ -7,16 +7,12 @@ module Vonage
7
7
  loader = Zeitwerk::Loader.new
8
8
  loader.tag = File.basename(__FILE__, '.rb')
9
9
  loader.inflector.inflect({
10
- 'api_error' => 'APIError',
11
10
  'dtmf' => 'DTMF',
12
11
  'gsm7' => 'GSM7',
13
12
  'http' => 'HTTP',
14
13
  'json' => 'JSON',
15
14
  'jwt' => 'JWT',
16
- 'rcs' => 'RCS',
17
- 'sip' => 'SIP',
18
15
  'sms' => 'SMS',
19
- 'network_sim_swap' => 'NetworkSIMSwap',
20
16
  'mms' => 'MMS',
21
17
  'tfa' => 'TFA',
22
18
  'version' => 'VERSION',
data/vonage.gemspec CHANGED
@@ -12,11 +12,9 @@ Gem::Specification.new do |s|
12
12
  s.summary = 'This is the Ruby Server SDK for Vonage APIs. To use it you\'ll need a Vonage account. Sign up for free at https://www.vonage.com'
13
13
  s.files = Dir.glob('lib/**/*.rb') + %w(LICENSE.txt README.md vonage.gemspec)
14
14
  s.required_ruby_version = '>= 2.5.0'
15
- s.add_dependency('vonage-jwt', '~> 0.2.0')
15
+ s.add_dependency('vonage-jwt', '~> 0.1.0')
16
16
  s.add_dependency('zeitwerk', '~> 2', '>= 2.2')
17
17
  s.add_dependency('sorbet-runtime', '~> 0.5')
18
- s.add_dependency('multipart-post', '~> 2.0')
19
- s.add_dependency('net-http-persistent', '~> 4.0', '>= 4.0.2')
20
18
  s.add_runtime_dependency('rexml')
21
19
  s.add_runtime_dependency('phonelib')
22
20
  s.require_path = 'lib'
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vonage
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.29.1
4
+ version: 8.0.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vonage
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2025-02-18 00:00:00.000000000 Z
11
+ date: 2022-12-12 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: vonage-jwt
@@ -15,14 +16,14 @@ dependencies:
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: 0.2.0
19
+ version: 0.1.0
19
20
  type: :runtime
20
21
  prerelease: false
21
22
  version_requirements: !ruby/object:Gem::Requirement
22
23
  requirements:
23
24
  - - "~>"
24
25
  - !ruby/object:Gem::Version
25
- version: 0.2.0
26
+ version: 0.1.0
26
27
  - !ruby/object:Gem::Dependency
27
28
  name: zeitwerk
28
29
  requirement: !ruby/object:Gem::Requirement
@@ -57,40 +58,6 @@ dependencies:
57
58
  - - "~>"
58
59
  - !ruby/object:Gem::Version
59
60
  version: '0.5'
60
- - !ruby/object:Gem::Dependency
61
- name: multipart-post
62
- requirement: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "~>"
65
- - !ruby/object:Gem::Version
66
- version: '2.0'
67
- type: :runtime
68
- prerelease: false
69
- version_requirements: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '2.0'
74
- - !ruby/object:Gem::Dependency
75
- name: net-http-persistent
76
- requirement: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: '4.0'
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: 4.0.2
84
- type: :runtime
85
- prerelease: false
86
- version_requirements: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: '4.0'
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- version: 4.0.2
94
61
  - !ruby/object:Gem::Dependency
95
62
  name: rexml
96
63
  requirement: !ruby/object:Gem::Requirement
@@ -132,7 +99,6 @@ files:
132
99
  - lib/vonage/abstract_authentication.rb
133
100
  - lib/vonage/account.rb
134
101
  - lib/vonage/alerts.rb
135
- - lib/vonage/api_error.rb
136
102
  - lib/vonage/applications.rb
137
103
  - lib/vonage/applications/list_response.rb
138
104
  - lib/vonage/authentication_error.rb
@@ -141,15 +107,6 @@ files:
141
107
  - lib/vonage/client.rb
142
108
  - lib/vonage/client_error.rb
143
109
  - lib/vonage/config.rb
144
- - lib/vonage/conversation.rb
145
- - lib/vonage/conversation/event.rb
146
- - lib/vonage/conversation/event/list_response.rb
147
- - lib/vonage/conversation/list_response.rb
148
- - lib/vonage/conversation/member.rb
149
- - lib/vonage/conversation/member/list_response.rb
150
- - lib/vonage/conversation/user.rb
151
- - lib/vonage/conversation/user/conversations_list_response.rb
152
- - lib/vonage/conversation/user/sessions_list_response.rb
153
110
  - lib/vonage/conversations.rb
154
111
  - lib/vonage/conversations/events.rb
155
112
  - lib/vonage/conversations/legs.rb
@@ -168,50 +125,22 @@ files:
168
125
  - lib/vonage/key_secret_params.rb
169
126
  - lib/vonage/keys.rb
170
127
  - lib/vonage/logger.rb
171
- - lib/vonage/meetings.rb
172
- - lib/vonage/meetings/applications.rb
173
- - lib/vonage/meetings/dial_in_numbers.rb
174
- - lib/vonage/meetings/dial_in_numbers/list_response.rb
175
- - lib/vonage/meetings/recordings.rb
176
- - lib/vonage/meetings/rooms.rb
177
- - lib/vonage/meetings/rooms/list_response.rb
178
- - lib/vonage/meetings/sessions.rb
179
- - lib/vonage/meetings/sessions/list_response.rb
180
- - lib/vonage/meetings/themes.rb
181
- - lib/vonage/meetings/themes/list_response.rb
182
128
  - lib/vonage/messages.rb
183
129
  - lib/vonage/messaging.rb
184
130
  - lib/vonage/messaging/channels/messenger.rb
185
131
  - lib/vonage/messaging/channels/mms.rb
186
- - lib/vonage/messaging/channels/rcs.rb
187
132
  - lib/vonage/messaging/channels/sms.rb
188
133
  - lib/vonage/messaging/channels/viber.rb
189
134
  - lib/vonage/messaging/channels/whats_app.rb
190
135
  - lib/vonage/messaging/message.rb
191
136
  - lib/vonage/namespace.rb
192
- - lib/vonage/network_authentication.rb
193
- - lib/vonage/network_authentication/client_authentication.rb
194
- - lib/vonage/network_authentication/server_authentication.rb
195
- - lib/vonage/network_number_verification.rb
196
- - lib/vonage/network_sim_swap.rb
197
137
  - lib/vonage/number_insight.rb
198
- - lib/vonage/number_insight_2.rb
199
138
  - lib/vonage/numbers.rb
200
139
  - lib/vonage/numbers/list_response.rb
201
140
  - lib/vonage/numbers/response.rb
202
141
  - lib/vonage/params.rb
203
142
  - lib/vonage/pricing.rb
204
143
  - lib/vonage/pricing_types.rb
205
- - lib/vonage/proactive_connect.rb
206
- - lib/vonage/proactive_connect/events.rb
207
- - lib/vonage/proactive_connect/events/list_response.rb
208
- - lib/vonage/proactive_connect/item.rb
209
- - lib/vonage/proactive_connect/items.rb
210
- - lib/vonage/proactive_connect/items/file_response.rb
211
- - lib/vonage/proactive_connect/items/list_response.rb
212
- - lib/vonage/proactive_connect/list.rb
213
- - lib/vonage/proactive_connect/lists.rb
214
- - lib/vonage/proactive_connect/lists/list_response.rb
215
144
  - lib/vonage/redact.rb
216
145
  - lib/vonage/response.rb
217
146
  - lib/vonage/secrets.rb
@@ -220,49 +149,22 @@ files:
220
149
  - lib/vonage/service_error.rb
221
150
  - lib/vonage/signature.rb
222
151
  - lib/vonage/sms.rb
223
- - lib/vonage/subaccounts.rb
224
- - lib/vonage/subaccounts/balance_transfers/list_response.rb
225
- - lib/vonage/subaccounts/credit_transfers/list_response.rb
226
- - lib/vonage/subaccounts/list_response.rb
227
152
  - lib/vonage/tfa.rb
228
153
  - lib/vonage/user_agent.rb
229
- - lib/vonage/users.rb
230
- - lib/vonage/users/list_response.rb
231
154
  - lib/vonage/verify.rb
232
- - lib/vonage/verify2.rb
233
- - lib/vonage/verify2/channels/email.rb
234
- - lib/vonage/verify2/channels/silent_auth.rb
235
- - lib/vonage/verify2/channels/sms.rb
236
- - lib/vonage/verify2/channels/voice.rb
237
- - lib/vonage/verify2/channels/whats_app.rb
238
- - lib/vonage/verify2/channels/whats_app_interactive.rb
239
- - lib/vonage/verify2/start_verification_options.rb
240
- - lib/vonage/verify2/template_fragments.rb
241
- - lib/vonage/verify2/template_fragments/list_response.rb
242
- - lib/vonage/verify2/templates.rb
243
- - lib/vonage/verify2/templates/list_response.rb
244
- - lib/vonage/verify2/workflow.rb
245
- - lib/vonage/verify2/workflow_builder.rb
246
155
  - lib/vonage/version.rb
247
156
  - lib/vonage/video.rb
248
157
  - lib/vonage/video/archives.rb
249
- - lib/vonage/video/archives/list_response.rb
250
- - lib/vonage/video/broadcasts.rb
251
- - lib/vonage/video/broadcasts/list_response.rb
252
- - lib/vonage/video/captions.rb
158
+ - lib/vonage/video/list_response.rb
253
159
  - lib/vonage/video/moderation.rb
254
- - lib/vonage/video/renders.rb
255
- - lib/vonage/video/renders/list_response.rb
256
160
  - lib/vonage/video/signals.rb
257
- - lib/vonage/video/sip.rb
258
161
  - lib/vonage/video/streams.rb
259
- - lib/vonage/video/streams/list_response.rb
260
- - lib/vonage/video/web_socket.rb
261
162
  - lib/vonage/voice.rb
262
163
  - lib/vonage/voice/actions/connect.rb
263
164
  - lib/vonage/voice/actions/conversation.rb
264
165
  - lib/vonage/voice/actions/input.rb
265
166
  - lib/vonage/voice/actions/notify.rb
167
+ - lib/vonage/voice/actions/pay.rb
266
168
  - lib/vonage/voice/actions/record.rb
267
169
  - lib/vonage/voice/actions/stream.rb
268
170
  - lib/vonage/voice/actions/talk.rb
@@ -281,6 +183,7 @@ metadata:
281
183
  bug_tracker_uri: https://github.com/Vonage/vonage-ruby-sdk/issues
282
184
  changelog_uri: https://github.com/Vonage/vonage-ruby-sdk/blob/master/CHANGES.md
283
185
  documentation_uri: https://www.rubydoc.info/github/vonage/vonage-ruby-sdk
186
+ post_install_message:
284
187
  rdoc_options: []
285
188
  require_paths:
286
189
  - lib
@@ -291,11 +194,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
291
194
  version: 2.5.0
292
195
  required_rubygems_version: !ruby/object:Gem::Requirement
293
196
  requirements:
294
- - - ">="
197
+ - - ">"
295
198
  - !ruby/object:Gem::Version
296
- version: '0'
199
+ version: 1.3.1
297
200
  requirements: []
298
- rubygems_version: 3.6.2
201
+ rubygems_version: 3.3.26
202
+ signing_key:
299
203
  specification_version: 4
300
204
  summary: This is the Ruby Server SDK for Vonage APIs. To use it you'll need a Vonage
301
205
  account. Sign up for free at https://www.vonage.com
@@ -1,33 +0,0 @@
1
- # typed: strong
2
- require "json"
3
-
4
- module Vonage
5
- class APIError < Error
6
- extend T::Sig
7
-
8
- sig { returns(Net::HTTPResponse) }
9
- attr_reader :http_response
10
-
11
- sig { params(message: T.nilable(String), http_response: T.nilable(Net::HTTPResponse)).void }
12
- def initialize(message = nil, http_response: nil)
13
- super(message)
14
- @http_response = http_response
15
- end
16
-
17
- def http_response_code
18
- return nil unless http_response
19
- http_response.code
20
- end
21
-
22
- def http_response_headers
23
- return nil unless http_response
24
- http_response.to_hash
25
- end
26
-
27
- def http_response_body
28
- return nil unless http_response
29
- return {} unless http_response.content_type && http_response.content_type.include?("json")
30
- ::JSON.parse(http_response.body)
31
- end
32
- end
33
- end
@@ -1,11 +0,0 @@
1
- # typed: true
2
-
3
- class Vonage::Conversation::Event::ListResponse < Vonage::Response
4
- include Enumerable
5
-
6
- def each
7
- return enum_for(:each) unless block_given?
8
-
9
- @entity._embedded.each { |item| yield item }
10
- end
11
- end
@@ -1,108 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Conversation::Event < Namespace
6
- self.authentication = BearerToken
7
-
8
- self.request_body = JSON
9
-
10
- # List conversation events
11
- #
12
- # @example
13
- # response = client.conversation.event.list(conversation_id: 'CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a')
14
- #
15
- # @param [required, String] :conversation_id The conversation_id of the conversation to list events for
16
- #
17
- # @param [String] :start_id
18
- # The ID to start returning events at
19
- #
20
- # @param [String] :end_id
21
- # The ID to end returning events at
22
- #
23
- # @param [String] :event_type
24
- # The type of event to search for. Does not currently support custom events
25
- #
26
- # @param [Integer] :page_size
27
- # Return this amount of records in the response.
28
- #
29
- # @param ['asc', 'desc'] :order
30
- # Return the records in ascending or descending order.
31
- #
32
- # @param [String] :cursor
33
- # The cursor to start returning results from.
34
- #
35
- # @return [Conversation::Member::ListResponse]
36
- #
37
- # @see https://developer.vonage.com/en/api/conversation#getEvents
38
- #
39
- def list(conversation_id:, **params)
40
- request("/v1/conversations/#{conversation_id}/events", params: params, response_class: ListResponse)
41
- end
42
-
43
- # Create an event
44
- # @example
45
- # response = client.conversation.event.create(
46
- # conversation_id: 'CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a',
47
- # type: 'message',
48
- # body: {
49
- # message_type: 'text',
50
- # text: 'Hello World'
51
- # }
52
- # )
53
- #
54
- # @param [required, String] :conversation_id The conversation_id of the conversation to create the event for
55
- #
56
- # @param [required, String] :type
57
- # Event type.
58
- #
59
- # @param [String] :from
60
- #
61
- # @option params [required, String] :from
62
- #
63
- # @param [Hash] :body
64
- # The body of the event. There are many possible properties depending on the event type and message_type
65
- #
66
- # @return [Response]
67
- #
68
- # @see https://developer.vonage.com/en/api/conversation#createEvent
69
- #
70
- def create(conversation_id:, **params)
71
- request("/v1/conversations/#{conversation_id}/events", params: params, type: Post)
72
- end
73
-
74
- # Get details of a specific event
75
- #
76
- # @example
77
- # response = client.conversation.event.find(conversation_id: 'CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a', event_id: 1)
78
- #
79
- # @param [required, String] :conversation_id
80
- #
81
- # @param [required, String] :event_id
82
- #
83
- # @return [Response]
84
- #
85
- # @see https://developer.vonage.com/en/api/conversation#getEvent
86
- #
87
- def find(conversation_id:, event_id:)
88
- request("/v1/conversations/#{conversation_id}/events/#{event_id}")
89
- end
90
-
91
- # Delete an event.
92
- #
93
- # @example
94
- # response = client.conversation.event.delete(conversation_id: 'CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a', event_id: 1)
95
- #
96
- # @param [String] :conversation_id
97
- #
98
- # @param [String] :event_id
99
- #
100
- # @return [Response]
101
- #
102
- # @see https://developer.vonage.com/en/api/conversation#deleteEvent
103
- #
104
- def delete(conversation_id:, event_id:)
105
- request("/v1/conversations/#{conversation_id}/events/#{event_id}", type: Delete)
106
- end
107
- end
108
- end
@@ -1,11 +0,0 @@
1
- # typed: true
2
-
3
- class Vonage::Conversation::ListResponse < Vonage::Response
4
- include Enumerable
5
-
6
- def each
7
- return enum_for(:each) unless block_given?
8
-
9
- @entity._embedded.conversations.each { |item| yield item }
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- # typed: true
2
-
3
- class Vonage::Conversation::Member::ListResponse < Vonage::Response
4
- include Enumerable
5
-
6
- def each
7
- return enum_for(:each) unless block_given?
8
-
9
- @entity._embedded.members.each { |item| yield item }
10
- end
11
- end