nexmo 6.2.0 → 7.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -3
- data/lib/nexmo.rb +2 -0
- data/lib/nexmo/abstract_authentication.rb +2 -2
- data/lib/nexmo/account.rb +6 -1
- data/lib/nexmo/alerts.rb +6 -1
- data/lib/nexmo/applications.rb +24 -3
- data/lib/nexmo/applications/list_response.rb +2 -0
- data/lib/nexmo/authentication_error.rb +2 -0
- data/lib/nexmo/basic.rb +2 -0
- data/lib/nexmo/bearer_token.rb +1 -0
- data/lib/nexmo/client.rb +46 -23
- data/lib/nexmo/client_error.rb +2 -0
- data/lib/nexmo/config.rb +49 -9
- data/lib/nexmo/conversations.rb +24 -0
- data/lib/nexmo/conversations/events.rb +1 -0
- data/lib/nexmo/conversations/legs.rb +1 -0
- data/lib/nexmo/conversations/members.rb +1 -0
- data/lib/nexmo/conversations/users.rb +1 -0
- data/lib/nexmo/conversions.rb +4 -0
- data/lib/nexmo/entity.rb +3 -1
- data/lib/nexmo/error.rb +2 -0
- data/lib/nexmo/errors.rb +8 -0
- data/lib/nexmo/files.rb +7 -2
- data/lib/nexmo/form_data.rb +2 -0
- data/lib/nexmo/gsm7.rb +2 -2
- data/lib/nexmo/http.rb +12 -3
- data/lib/nexmo/json.rb +4 -0
- data/lib/nexmo/jwt.rb +5 -1
- data/lib/nexmo/key_secret_params.rb +10 -2
- data/lib/nexmo/keys.rb +7 -1
- data/lib/nexmo/logger.rb +14 -4
- data/lib/nexmo/messages.rb +7 -1
- data/lib/nexmo/namespace.rb +15 -18
- data/lib/nexmo/number_insight.rb +21 -6
- data/lib/nexmo/numbers.rb +2 -1
- data/lib/nexmo/numbers/list_response.rb +2 -0
- data/lib/nexmo/numbers/response.rb +1 -0
- data/lib/nexmo/params.rb +1 -0
- data/lib/nexmo/pricing.rb +2 -1
- data/lib/nexmo/pricing_types.rb +1 -0
- data/lib/nexmo/redact.rb +1 -0
- data/lib/nexmo/response.rb +2 -0
- data/lib/nexmo/secrets.rb +1 -0
- data/lib/nexmo/secrets/list_response.rb +2 -0
- data/lib/nexmo/server_error.rb +2 -0
- data/lib/nexmo/signature.rb +1 -0
- data/lib/nexmo/sms.rb +16 -10
- data/lib/nexmo/tfa.rb +2 -1
- data/lib/nexmo/user_agent.rb +1 -0
- data/lib/nexmo/verify.rb +93 -17
- data/lib/nexmo/version.rb +3 -1
- data/lib/nexmo/{calls.rb → voice.rb} +12 -11
- data/lib/nexmo/{calls → voice}/dtmf.rb +2 -1
- data/lib/nexmo/{calls → voice}/list_response.rb +3 -1
- data/lib/nexmo/{calls → voice}/stream.rb +2 -1
- data/lib/nexmo/{calls → voice}/talk.rb +2 -1
- data/nexmo.gemspec +1 -0
- metadata +22 -11
- data/lib/nexmo/number_insight/response.rb +0 -5
- data/lib/nexmo/sms/response.rb +0 -7
- data/lib/nexmo/verify/response.rb +0 -5
data/lib/nexmo/version.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# typed: true
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
module Nexmo
|
4
|
-
class
|
5
|
+
class Voice < Namespace
|
5
6
|
self.authentication = BearerToken
|
6
7
|
|
7
8
|
self.request_body = JSON
|
@@ -9,7 +10,7 @@ module Nexmo
|
|
9
10
|
# Create an outbound Call.
|
10
11
|
#
|
11
12
|
# @example
|
12
|
-
# response = client.
|
13
|
+
# response = client.voice.create({
|
13
14
|
# to: [{type: 'phone', number: '14843331234'}],
|
14
15
|
# from: {type: 'phone', number: '14843335555'},
|
15
16
|
# answer_url: ['https://example.com/answer']
|
@@ -60,7 +61,7 @@ module Nexmo
|
|
60
61
|
# Get details of your calls.
|
61
62
|
#
|
62
63
|
# @example
|
63
|
-
# response = client.
|
64
|
+
# response = client.voice.list
|
64
65
|
# response.each do |item|
|
65
66
|
# puts "#{item.uuid} #{item.direction} #{item.status}"
|
66
67
|
# end
|
@@ -99,7 +100,7 @@ module Nexmo
|
|
99
100
|
# Get detail of a specific call.
|
100
101
|
#
|
101
102
|
# @example
|
102
|
-
# response = client.
|
103
|
+
# response = client.voice.get(id)
|
103
104
|
#
|
104
105
|
# @param [String] id
|
105
106
|
#
|
@@ -114,7 +115,7 @@ module Nexmo
|
|
114
115
|
# Modify an in progress call.
|
115
116
|
#
|
116
117
|
# @example
|
117
|
-
# response = client.
|
118
|
+
# response = client.voice.update(id, action: 'hangup')
|
118
119
|
#
|
119
120
|
# @option params [required, String] :action
|
120
121
|
#
|
@@ -135,7 +136,7 @@ module Nexmo
|
|
135
136
|
# Hangup an in progress call.
|
136
137
|
#
|
137
138
|
# @example
|
138
|
-
# response = client.
|
139
|
+
# response = client.voice.hangup(id)
|
139
140
|
#
|
140
141
|
# @param [String] id
|
141
142
|
#
|
@@ -150,7 +151,7 @@ module Nexmo
|
|
150
151
|
# Mute an in progress call.
|
151
152
|
#
|
152
153
|
# @example
|
153
|
-
# response = client.
|
154
|
+
# response = client.voice.mute(id)
|
154
155
|
#
|
155
156
|
# @param [String] id
|
156
157
|
#
|
@@ -165,7 +166,7 @@ module Nexmo
|
|
165
166
|
# Unmute an in progress call.
|
166
167
|
#
|
167
168
|
# @example
|
168
|
-
# response = client.
|
169
|
+
# response = client.voice.unmute(id)
|
169
170
|
#
|
170
171
|
# @param [String] id
|
171
172
|
#
|
@@ -180,7 +181,7 @@ module Nexmo
|
|
180
181
|
# Earmuff an in progress call.
|
181
182
|
#
|
182
183
|
# @example
|
183
|
-
# response = client.
|
184
|
+
# response = client.voice.earmuff(id)
|
184
185
|
#
|
185
186
|
# @param [String] id
|
186
187
|
#
|
@@ -195,7 +196,7 @@ module Nexmo
|
|
195
196
|
# Unearmuff an in progress call.
|
196
197
|
#
|
197
198
|
# @example
|
198
|
-
# response = client.
|
199
|
+
# response = client.voice.unearmuff(id)
|
199
200
|
#
|
200
201
|
# @param [String] id
|
201
202
|
#
|
@@ -215,7 +216,7 @@ module Nexmo
|
|
215
216
|
# url: ['https://example.com/ncco.json']
|
216
217
|
# }
|
217
218
|
#
|
218
|
-
# response = client.
|
219
|
+
# response = client.voice.transfer(id, destination: destination)
|
219
220
|
#
|
220
221
|
# @param [String] id
|
221
222
|
# @param [Hash] destination
|
data/nexmo.gemspec
CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.required_ruby_version = '>= 2.5.0'
|
15
15
|
s.add_dependency('jwt', '~> 2')
|
16
16
|
s.add_dependency('zeitwerk', '~> 2', '>= 2.2')
|
17
|
+
s.add_dependency('sorbet-runtime', '~> 0.5')
|
17
18
|
s.require_path = 'lib'
|
18
19
|
s.metadata = {
|
19
20
|
'homepage' => 'https://github.com/Nexmo/nexmo-ruby',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexmo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nexmo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '2.2'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sorbet-runtime
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.5'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.5'
|
47
61
|
description: Nexmo Client Library for Ruby
|
48
62
|
email:
|
49
63
|
- devrel@nexmo.com
|
@@ -62,11 +76,6 @@ files:
|
|
62
76
|
- lib/nexmo/authentication_error.rb
|
63
77
|
- lib/nexmo/basic.rb
|
64
78
|
- lib/nexmo/bearer_token.rb
|
65
|
-
- lib/nexmo/calls.rb
|
66
|
-
- lib/nexmo/calls/dtmf.rb
|
67
|
-
- lib/nexmo/calls/list_response.rb
|
68
|
-
- lib/nexmo/calls/stream.rb
|
69
|
-
- lib/nexmo/calls/talk.rb
|
70
79
|
- lib/nexmo/client.rb
|
71
80
|
- lib/nexmo/client_error.rb
|
72
81
|
- lib/nexmo/config.rb
|
@@ -91,7 +100,6 @@ files:
|
|
91
100
|
- lib/nexmo/messages.rb
|
92
101
|
- lib/nexmo/namespace.rb
|
93
102
|
- lib/nexmo/number_insight.rb
|
94
|
-
- lib/nexmo/number_insight/response.rb
|
95
103
|
- lib/nexmo/numbers.rb
|
96
104
|
- lib/nexmo/numbers/list_response.rb
|
97
105
|
- lib/nexmo/numbers/response.rb
|
@@ -105,12 +113,15 @@ files:
|
|
105
113
|
- lib/nexmo/server_error.rb
|
106
114
|
- lib/nexmo/signature.rb
|
107
115
|
- lib/nexmo/sms.rb
|
108
|
-
- lib/nexmo/sms/response.rb
|
109
116
|
- lib/nexmo/tfa.rb
|
110
117
|
- lib/nexmo/user_agent.rb
|
111
118
|
- lib/nexmo/verify.rb
|
112
|
-
- lib/nexmo/verify/response.rb
|
113
119
|
- lib/nexmo/version.rb
|
120
|
+
- lib/nexmo/voice.rb
|
121
|
+
- lib/nexmo/voice/dtmf.rb
|
122
|
+
- lib/nexmo/voice/list_response.rb
|
123
|
+
- lib/nexmo/voice/stream.rb
|
124
|
+
- lib/nexmo/voice/talk.rb
|
114
125
|
- nexmo.gemspec
|
115
126
|
homepage: https://github.com/Nexmo/nexmo-ruby
|
116
127
|
licenses:
|
@@ -136,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
147
|
- !ruby/object:Gem::Version
|
137
148
|
version: '0'
|
138
149
|
requirements: []
|
139
|
-
rubygems_version: 3.
|
150
|
+
rubygems_version: 3.0.0
|
140
151
|
signing_key:
|
141
152
|
specification_version: 4
|
142
153
|
summary: This is the Ruby client library for Nexmo's API. To use it you'll need a
|
data/lib/nexmo/sms/response.rb
DELETED