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.
- checksums.yaml +4 -4
- data/README.md +89 -476
- data/lib/vonage/applications.rb +4 -12
- data/lib/vonage/basic.rb +1 -1
- data/lib/vonage/bearer_token.rb +1 -1
- data/lib/vonage/client.rb +0 -65
- data/lib/vonage/client_error.rb +1 -1
- data/lib/vonage/config.rb +1 -9
- data/lib/vonage/conversations/events.rb +0 -12
- data/lib/vonage/conversations/legs.rb +0 -6
- data/lib/vonage/conversations/members.rb +0 -15
- data/lib/vonage/conversations/users.rb +0 -15
- data/lib/vonage/conversations.rb +0 -30
- data/lib/vonage/errors.rb +20 -37
- data/lib/vonage/gsm7.rb +1 -1
- data/lib/vonage/http.rb +3 -3
- data/lib/vonage/jwt.rb +0 -17
- data/lib/vonage/key_secret_params.rb +2 -3
- data/lib/vonage/keys.rb +1 -14
- data/lib/vonage/logger.rb +3 -5
- data/lib/vonage/messaging/channels/viber.rb +2 -9
- data/lib/vonage/messaging/channels/whats_app.rb +1 -3
- data/lib/vonage/messaging/message.rb +0 -1
- data/lib/vonage/messaging.rb +4 -34
- data/lib/vonage/namespace.rb +68 -137
- data/lib/vonage/numbers.rb +17 -40
- data/lib/vonage/server_error.rb +1 -1
- data/lib/vonage/signature.rb +5 -5
- data/lib/vonage/sms.rb +20 -20
- data/lib/vonage/version.rb +1 -1
- data/lib/vonage/video/archives.rb +58 -25
- data/lib/vonage/video/list_response.rb +11 -0
- data/lib/vonage/video/moderation.rb +22 -7
- data/lib/vonage/video/signals.rb +9 -4
- data/lib/vonage/video/streams.rb +12 -6
- data/lib/vonage/video.rb +13 -50
- data/lib/vonage/voice/actions/connect.rb +5 -34
- data/lib/vonage/voice/actions/conversation.rb +4 -10
- data/lib/vonage/voice/actions/input.rb +3 -19
- data/lib/vonage/voice/actions/notify.rb +3 -8
- data/lib/vonage/voice/actions/pay.rb +107 -0
- data/lib/vonage/voice/actions/record.rb +4 -52
- data/lib/vonage/voice/actions/stream.rb +4 -48
- data/lib/vonage/voice/actions/talk.rb +4 -54
- data/lib/vonage/voice/talk.rb +1 -11
- data/lib/vonage/voice.rb +0 -24
- data/lib/vonage.rb +0 -4
- data/vonage.gemspec +1 -3
- metadata +12 -108
- data/lib/vonage/api_error.rb +0 -33
- data/lib/vonage/conversation/event/list_response.rb +0 -11
- data/lib/vonage/conversation/event.rb +0 -108
- data/lib/vonage/conversation/list_response.rb +0 -11
- data/lib/vonage/conversation/member/list_response.rb +0 -11
- data/lib/vonage/conversation/member.rb +0 -134
- data/lib/vonage/conversation/user/conversations_list_response.rb +0 -11
- data/lib/vonage/conversation/user/sessions_list_response.rb +0 -11
- data/lib/vonage/conversation/user.rb +0 -67
- data/lib/vonage/conversation.rb +0 -164
- data/lib/vonage/meetings/applications.rb +0 -28
- data/lib/vonage/meetings/dial_in_numbers/list_response.rb +0 -11
- data/lib/vonage/meetings/dial_in_numbers.rb +0 -26
- data/lib/vonage/meetings/recordings.rb +0 -42
- data/lib/vonage/meetings/rooms/list_response.rb +0 -11
- data/lib/vonage/meetings/rooms.rb +0 -167
- data/lib/vonage/meetings/sessions/list_response.rb +0 -11
- data/lib/vonage/meetings/sessions.rb +0 -31
- data/lib/vonage/meetings/themes/list_response.rb +0 -11
- data/lib/vonage/meetings/themes.rb +0 -239
- data/lib/vonage/meetings.rb +0 -50
- data/lib/vonage/messaging/channels/rcs.rb +0 -42
- data/lib/vonage/network_authentication/client_authentication.rb +0 -39
- data/lib/vonage/network_authentication/server_authentication.rb +0 -47
- data/lib/vonage/network_authentication.rb +0 -22
- data/lib/vonage/network_number_verification.rb +0 -92
- data/lib/vonage/network_sim_swap.rb +0 -84
- data/lib/vonage/number_insight_2.rb +0 -36
- data/lib/vonage/proactive_connect/events/list_response.rb +0 -11
- data/lib/vonage/proactive_connect/events.rb +0 -71
- data/lib/vonage/proactive_connect/item.rb +0 -116
- data/lib/vonage/proactive_connect/items/file_response.rb +0 -32
- data/lib/vonage/proactive_connect/items/list_response.rb +0 -11
- data/lib/vonage/proactive_connect/items.rb +0 -116
- data/lib/vonage/proactive_connect/list.rb +0 -186
- data/lib/vonage/proactive_connect/lists/list_response.rb +0 -11
- data/lib/vonage/proactive_connect/lists.rb +0 -38
- data/lib/vonage/proactive_connect.rb +0 -43
- data/lib/vonage/subaccounts/balance_transfers/list_response.rb +0 -11
- data/lib/vonage/subaccounts/credit_transfers/list_response.rb +0 -11
- data/lib/vonage/subaccounts/list_response.rb +0 -15
- data/lib/vonage/subaccounts.rb +0 -203
- data/lib/vonage/users/list_response.rb +0 -11
- data/lib/vonage/users.rb +0 -156
- data/lib/vonage/verify2/channels/email.rb +0 -36
- data/lib/vonage/verify2/channels/silent_auth.rb +0 -45
- data/lib/vonage/verify2/channels/sms.rb +0 -63
- data/lib/vonage/verify2/channels/voice.rb +0 -32
- data/lib/vonage/verify2/channels/whats_app.rb +0 -39
- data/lib/vonage/verify2/channels/whats_app_interactive.rb +0 -32
- data/lib/vonage/verify2/start_verification_options.rb +0 -63
- data/lib/vonage/verify2/template_fragments/list_response.rb +0 -11
- data/lib/vonage/verify2/template_fragments.rb +0 -125
- data/lib/vonage/verify2/templates/list_response.rb +0 -11
- data/lib/vonage/verify2/templates.rb +0 -86
- data/lib/vonage/verify2/workflow.rb +0 -39
- data/lib/vonage/verify2/workflow_builder.rb +0 -25
- data/lib/vonage/verify2.rb +0 -112
- data/lib/vonage/video/archives/list_response.rb +0 -11
- data/lib/vonage/video/broadcasts/list_response.rb +0 -11
- data/lib/vonage/video/broadcasts.rb +0 -75
- data/lib/vonage/video/captions.rb +0 -67
- data/lib/vonage/video/renders/list_response.rb +0 -11
- data/lib/vonage/video/renders.rb +0 -107
- data/lib/vonage/video/sip.rb +0 -48
- data/lib/vonage/video/streams/list_response.rb +0 -11
- data/lib/vonage/video/web_socket.rb +0 -61
data/lib/vonage/applications.rb
CHANGED
@@ -33,8 +33,6 @@ module Vonage
|
|
33
33
|
#
|
34
34
|
# response = client.applications.create(params)
|
35
35
|
#
|
36
|
-
# @param [Hash] params
|
37
|
-
#
|
38
36
|
# @option params [required, String] :name
|
39
37
|
# Application name.
|
40
38
|
#
|
@@ -46,9 +44,7 @@ module Vonage
|
|
46
44
|
# This contains the configuration for each product.
|
47
45
|
# This replaces the application `type` from version 1 of the Application API.
|
48
46
|
#
|
49
|
-
# @
|
50
|
-
# - **:improve_ai** (Boolean) If set to `true``, Vonage may store and use your content and data for the improvement
|
51
|
-
# of Vonage's AI based services and technologies.
|
47
|
+
# @param [Hash] params
|
52
48
|
#
|
53
49
|
# @return [Response]
|
54
50
|
#
|
@@ -77,7 +73,7 @@ module Vonage
|
|
77
73
|
# Set this to `false` to not auto-advance through all the pages in the record
|
78
74
|
# and collect all the data. The default is `true`.
|
79
75
|
# @param [Hash] params
|
80
|
-
#
|
76
|
+
#
|
81
77
|
# @return [ListResponse]
|
82
78
|
#
|
83
79
|
# @see https://developer.nexmo.com/api/application.v2#listApplication
|
@@ -113,9 +109,6 @@ module Vonage
|
|
113
109
|
# @example
|
114
110
|
# response = client.applications.update(id, answer_method: 'POST')
|
115
111
|
#
|
116
|
-
# @param [String] id
|
117
|
-
# @param [Hash] params
|
118
|
-
#
|
119
112
|
# @option params [required, String] :name
|
120
113
|
# Application name.
|
121
114
|
#
|
@@ -127,9 +120,8 @@ module Vonage
|
|
127
120
|
# This contains the configuration for each product.
|
128
121
|
# This replaces the application `type` from version 1 of the Application API.
|
129
122
|
#
|
130
|
-
# @
|
131
|
-
#
|
132
|
-
# of Vonage's AI based services and technologies.
|
123
|
+
# @param [String] id
|
124
|
+
# @param [Hash] params
|
133
125
|
#
|
134
126
|
# @return [Response]
|
135
127
|
#
|
data/lib/vonage/basic.rb
CHANGED
data/lib/vonage/bearer_token.rb
CHANGED
data/lib/vonage/client.rb
CHANGED
@@ -40,17 +40,8 @@ module Vonage
|
|
40
40
|
@applications ||= T.let(Applications.new(config), T.nilable(Vonage::Applications))
|
41
41
|
end
|
42
42
|
|
43
|
-
# @return [Conversation]
|
44
|
-
#
|
45
|
-
sig { returns(T.nilable(Vonage::Conversation)) }
|
46
|
-
def conversation
|
47
|
-
@conversation ||= T.let(Conversation.new(config), T.nilable(Vonage::Conversation))
|
48
|
-
end
|
49
|
-
|
50
43
|
# @return [Conversations]
|
51
44
|
#
|
52
|
-
# @deprecated Please use {#conversation} instead
|
53
|
-
#
|
54
45
|
sig { returns(T.nilable(Vonage::Conversations)) }
|
55
46
|
def conversations
|
56
47
|
@conversations ||= T.let(Conversations.new(config), T.nilable(Vonage::Conversations))
|
@@ -70,13 +61,6 @@ module Vonage
|
|
70
61
|
@files ||= T.let(Files.new(config), T.nilable(Vonage::Files))
|
71
62
|
end
|
72
63
|
|
73
|
-
# @return [Meetings]
|
74
|
-
#
|
75
|
-
sig { returns(T.nilable(Vonage::Meetings)) }
|
76
|
-
def meetings
|
77
|
-
@meetings ||= T.let(Meetings.new(config), T.nilable(Vonage::Meetings))
|
78
|
-
end
|
79
|
-
|
80
64
|
# @return [Messages]
|
81
65
|
#
|
82
66
|
sig { returns(T.nilable(Vonage::Messages)) }
|
@@ -91,20 +75,6 @@ module Vonage
|
|
91
75
|
@messaging ||= T.let(Messaging.new(config), T.nilable(Vonage::Messaging))
|
92
76
|
end
|
93
77
|
|
94
|
-
# @return [NetworkNumberVerification]
|
95
|
-
#
|
96
|
-
sig { returns(T.nilable(Vonage::NetworkNumberVerification)) }
|
97
|
-
def network_number_verification
|
98
|
-
@network_number_verification ||= T.let(NetworkNumberVerification.new(config), T.nilable(Vonage::NetworkNumberVerification))
|
99
|
-
end
|
100
|
-
|
101
|
-
# @return [NetworkSIMSwap]
|
102
|
-
#
|
103
|
-
sig { returns(T.nilable(Vonage::NetworkSIMSwap)) }
|
104
|
-
def network_sim_swap
|
105
|
-
@network_sim_swap ||= T.let(NetworkSIMSwap.new(config), T.nilable(Vonage::NetworkSIMSwap))
|
106
|
-
end
|
107
|
-
|
108
78
|
# @return [NumberInsight]
|
109
79
|
#
|
110
80
|
sig { returns(T.nilable(Vonage::NumberInsight)) }
|
@@ -112,13 +82,6 @@ module Vonage
|
|
112
82
|
@number_insight ||= T.let(NumberInsight.new(config), T.nilable(Vonage::NumberInsight))
|
113
83
|
end
|
114
84
|
|
115
|
-
# @return [NumberInsight2]
|
116
|
-
#
|
117
|
-
sig { returns(T.nilable(Vonage::NumberInsight2)) }
|
118
|
-
def number_insight_2
|
119
|
-
@number_insight_2 ||= T.let(NumberInsight2.new(config), T.nilable(Vonage::NumberInsight2))
|
120
|
-
end
|
121
|
-
|
122
85
|
# @return [Numbers]
|
123
86
|
#
|
124
87
|
sig { returns(T.nilable(Vonage::Numbers)) }
|
@@ -133,13 +96,6 @@ module Vonage
|
|
133
96
|
@pricing ||= T.let(PricingTypes.new(config), T.nilable(Vonage::PricingTypes))
|
134
97
|
end
|
135
98
|
|
136
|
-
# @return [ProactiveConnect]
|
137
|
-
#
|
138
|
-
sig { returns(T.nilable(Vonage::ProactiveConnect)) }
|
139
|
-
def proactive_connect
|
140
|
-
@proactive_connect ||= T.let(ProactiveConnect.new(config), T.nilable(Vonage::ProactiveConnect))
|
141
|
-
end
|
142
|
-
|
143
99
|
# @return [Redact]
|
144
100
|
#
|
145
101
|
sig { returns(T.nilable(Vonage::Redact)) }
|
@@ -161,13 +117,6 @@ module Vonage
|
|
161
117
|
@sms ||= T.let(SMS.new(config), T.nilable(Vonage::SMS))
|
162
118
|
end
|
163
119
|
|
164
|
-
# @return [Subaccounts]
|
165
|
-
#
|
166
|
-
sig { returns(T.nilable(Vonage::Subaccounts)) }
|
167
|
-
def subaccounts
|
168
|
-
@subaccounts ||= T.let(Subaccounts.new(config), T.nilable(Vonage::Subaccounts))
|
169
|
-
end
|
170
|
-
|
171
120
|
# @return [TFA]
|
172
121
|
#
|
173
122
|
sig { returns(T.nilable(Vonage::TFA)) }
|
@@ -175,13 +124,6 @@ module Vonage
|
|
175
124
|
@tfa ||= T.let(TFA.new(config), T.nilable(Vonage::TFA))
|
176
125
|
end
|
177
126
|
|
178
|
-
# @return [Users]
|
179
|
-
#
|
180
|
-
sig { returns(T.nilable(Vonage::Users)) }
|
181
|
-
def users
|
182
|
-
@users ||= T.let(Users.new(config), T.nilable(Vonage::Users))
|
183
|
-
end
|
184
|
-
|
185
127
|
# @return [Verify]
|
186
128
|
#
|
187
129
|
sig { returns(T.nilable(Vonage::Verify)) }
|
@@ -189,13 +131,6 @@ module Vonage
|
|
189
131
|
@verify ||= T.let(Verify.new(config), T.nilable(Vonage::Verify))
|
190
132
|
end
|
191
133
|
|
192
|
-
# @return [Verify2]
|
193
|
-
#
|
194
|
-
sig { returns(T.nilable(Vonage::Verify2)) }
|
195
|
-
def verify2
|
196
|
-
@verify2 ||= T.let(Verify2.new(config), T.nilable(Vonage::Verify2))
|
197
|
-
end
|
198
|
-
|
199
134
|
# @return [Video]
|
200
135
|
#
|
201
136
|
sig { returns(T.nilable(Vonage::Video)) }
|
data/lib/vonage/client_error.rb
CHANGED
data/lib/vonage/config.rb
CHANGED
@@ -19,7 +19,6 @@ module Vonage
|
|
19
19
|
self.signature_method = ENV['VONAGE_SIGNATURE_METHOD'] || 'md5hash'
|
20
20
|
self.token = T.let(nil, T.nilable(String))
|
21
21
|
self.video_host = 'video.api.vonage.com'
|
22
|
-
self.vonage_host = 'api-eu.vonage.com'
|
23
22
|
end
|
24
23
|
|
25
24
|
# Merges the config with the given options hash.
|
@@ -131,11 +130,7 @@ module Vonage
|
|
131
130
|
|
132
131
|
# @return [Vonage::Logger]
|
133
132
|
#
|
134
|
-
sig { params(logger: T.nilable(
|
135
|
-
defined?(ActiveSupport::BroadcastLogger) ?
|
136
|
-
T.any(::Logger, Vonage::Logger, ActiveSupport::BroadcastLogger)
|
137
|
-
: T.any(::Logger, Vonage::Logger)
|
138
|
-
)).returns(T.nilable(Vonage::Logger)) }
|
133
|
+
sig { params(logger: T.nilable(T.any(::Logger, Vonage::Logger))).returns(T.nilable(Vonage::Logger)) }
|
139
134
|
def logger=(logger)
|
140
135
|
@logger = T.let(Logger.new(logger), T.nilable(Vonage::Logger))
|
141
136
|
end
|
@@ -206,9 +201,6 @@ module Vonage
|
|
206
201
|
|
207
202
|
sig { returns(String) }
|
208
203
|
attr_accessor :video_host
|
209
|
-
|
210
|
-
sig { returns(String) }
|
211
|
-
attr_accessor :vonage_host
|
212
204
|
|
213
205
|
protected
|
214
206
|
|
@@ -9,8 +9,6 @@ module Vonage
|
|
9
9
|
|
10
10
|
# Create an event.
|
11
11
|
#
|
12
|
-
# @deprecated Please use {Vonage::Conversation::Event#create} instead
|
13
|
-
#
|
14
12
|
# @option params [required, String] :type
|
15
13
|
# Event type.
|
16
14
|
#
|
@@ -31,14 +29,11 @@ module Vonage
|
|
31
29
|
# @see https://developer.nexmo.com/api/conversation#createEvent
|
32
30
|
#
|
33
31
|
def create(conversation_id, params)
|
34
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation::Event#create` instead.')
|
35
32
|
request('/beta/conversations/' + conversation_id + '/events', params: params, type: Post)
|
36
33
|
end
|
37
34
|
|
38
35
|
# List events.
|
39
36
|
#
|
40
|
-
# @deprecated Please use {Vonage::Conversation::Event#list} instead
|
41
|
-
#
|
42
37
|
# @param [String] conversation_id
|
43
38
|
#
|
44
39
|
# @option params [Boolean] :auto_advance
|
@@ -50,14 +45,11 @@ module Vonage
|
|
50
45
|
# @see https://developer.nexmo.com/api/conversation#getEvents
|
51
46
|
#
|
52
47
|
def list(conversation_id, params = nil, auto_advance = true)
|
53
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation::Event#list` instead.')
|
54
48
|
request('/beta/conversations/' + conversation_id + '/events', params: params)
|
55
49
|
end
|
56
50
|
|
57
51
|
# Retrieve an event.
|
58
52
|
#
|
59
|
-
# @deprecated Please use {Vonage::Conversation::Event#find} instead
|
60
|
-
#
|
61
53
|
# @param [String] conversation_id
|
62
54
|
# @param [String] event_id
|
63
55
|
#
|
@@ -66,14 +58,11 @@ module Vonage
|
|
66
58
|
# @see https://developer.nexmo.com/api/conversation#getEvent
|
67
59
|
#
|
68
60
|
def get(conversation_id, event_id)
|
69
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation::Event#find` instead.')
|
70
61
|
request('/beta/conversations/' + conversation_id + '/events/' + event_id.to_s)
|
71
62
|
end
|
72
63
|
|
73
64
|
# Delete an event.
|
74
65
|
#
|
75
|
-
# @deprecated Please use {Vonage::Conversation::Event#delete} instead
|
76
|
-
#
|
77
66
|
# @param [String] conversation_id
|
78
67
|
# @param [String] event_id
|
79
68
|
#
|
@@ -82,7 +71,6 @@ module Vonage
|
|
82
71
|
# @see https://developer.nexmo.com/api/conversation#deleteEvent
|
83
72
|
#
|
84
73
|
def delete(conversation_id, event_id)
|
85
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation::Event#delete` instead.')
|
86
74
|
request('/beta/conversations/' + conversation_id + '/events/' + event_id.to_s, type: Delete)
|
87
75
|
end
|
88
76
|
end
|
@@ -7,8 +7,6 @@ module Vonage
|
|
7
7
|
|
8
8
|
# List legs.
|
9
9
|
#
|
10
|
-
# @deprecated
|
11
|
-
#
|
12
10
|
# @option params [Boolean] :auto_advance
|
13
11
|
# Set this to `false` to not auto-advance through all the pages in the record
|
14
12
|
# and collect all the data. The default is `true`.
|
@@ -18,14 +16,11 @@ module Vonage
|
|
18
16
|
# @see https://developer.nexmo.com/api/conversation#listLegs
|
19
17
|
#
|
20
18
|
def list(params = nil, auto_advance = true)
|
21
|
-
logger.info('This method is deprecated and will be removed in a future release.')
|
22
19
|
request('/beta/legs', params: params)
|
23
20
|
end
|
24
21
|
|
25
22
|
# Delete a leg.
|
26
23
|
#
|
27
|
-
# @deprecated
|
28
|
-
#
|
29
24
|
# @param [String] leg_id
|
30
25
|
#
|
31
26
|
# @return [Response]
|
@@ -33,7 +28,6 @@ module Vonage
|
|
33
28
|
# @see https://developer.nexmo.com/api/conversation#deleteLeg
|
34
29
|
#
|
35
30
|
def delete(leg_id)
|
36
|
-
logger.info('This method is deprecated and will be removed in a future release.')
|
37
31
|
request('/beta/legs/' + leg_id, type: Delete)
|
38
32
|
end
|
39
33
|
end
|
@@ -9,8 +9,6 @@ module Vonage
|
|
9
9
|
|
10
10
|
# Create a member.
|
11
11
|
#
|
12
|
-
# @deprecated Please use {Vonage::Conversation::Member#create} instead
|
13
|
-
#
|
14
12
|
# @option params [String] :action
|
15
13
|
# Invite or join a member to a conversation.
|
16
14
|
# Must be one of: `invite` or `join`.
|
@@ -42,14 +40,11 @@ module Vonage
|
|
42
40
|
# @see https://developer.nexmo.com/api/conversation#createMember
|
43
41
|
#
|
44
42
|
def create(conversation_id, params)
|
45
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation::Member#create` instead.')
|
46
43
|
request('/beta/conversations/' + conversation_id + '/members', params: params, type: Post)
|
47
44
|
end
|
48
45
|
|
49
46
|
# List members.
|
50
47
|
#
|
51
|
-
# @deprecated Please use {Vonage::Conversation::Member#list} instead
|
52
|
-
#
|
53
48
|
# @param [String] conversation_id
|
54
49
|
#
|
55
50
|
# @option params [Boolean] :auto_advance
|
@@ -61,14 +56,11 @@ module Vonage
|
|
61
56
|
# @see https://developer.nexmo.com/api/conversation#getMembers
|
62
57
|
#
|
63
58
|
def list(conversation_id, params = nil, auto_advance = true)
|
64
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation::Member#list` instead.')
|
65
59
|
request('/beta/conversations/' + conversation_id + '/members', params: params)
|
66
60
|
end
|
67
61
|
|
68
62
|
# Retrieve a member.
|
69
63
|
#
|
70
|
-
# @deprecated Please use {Vonage::Conversation::Member#find} instead
|
71
|
-
#
|
72
64
|
# @param [String] conversation_id
|
73
65
|
# @param [String] member_id
|
74
66
|
#
|
@@ -77,14 +69,11 @@ module Vonage
|
|
77
69
|
# @see https://developer.nexmo.com/api/conversation#getMember
|
78
70
|
#
|
79
71
|
def get(conversation_id, member_id)
|
80
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation::Member#find` instead.')
|
81
72
|
request('/beta/conversations/' + conversation_id + '/members/' + member_id)
|
82
73
|
end
|
83
74
|
|
84
75
|
# Update a member.
|
85
76
|
#
|
86
|
-
# @deprecated Please use {Vonage::Conversation::Member#update} instead
|
87
|
-
#
|
88
77
|
# @option params [String] :action
|
89
78
|
# Invite or join a member to a conversation.
|
90
79
|
#
|
@@ -100,14 +89,11 @@ module Vonage
|
|
100
89
|
# @see https://developer.nexmo.com/api/conversation#updateMember
|
101
90
|
#
|
102
91
|
def update(conversation_id, member_id, params)
|
103
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation::Member#update` instead.')
|
104
92
|
request('/beta/conversations/' + conversation_id + '/members/' + member_id, params: params, type: Put)
|
105
93
|
end
|
106
94
|
|
107
95
|
# Delete a member.
|
108
96
|
#
|
109
|
-
# @deprecated
|
110
|
-
#
|
111
97
|
# @param [String] conversation_id
|
112
98
|
# @param [String] member_id
|
113
99
|
#
|
@@ -116,7 +102,6 @@ module Vonage
|
|
116
102
|
# @see https://developer.nexmo.com/api/conversation#deleteMember
|
117
103
|
#
|
118
104
|
def delete(conversation_id, member_id)
|
119
|
-
logger.info('This method is deprecated and will be removed in a future release.')
|
120
105
|
request('/beta/conversations/' + conversation_id + '/members/' + member_id, type: Delete)
|
121
106
|
end
|
122
107
|
end
|
@@ -9,8 +9,6 @@ module Vonage
|
|
9
9
|
|
10
10
|
# Create a user.
|
11
11
|
#
|
12
|
-
# @deprecated Please use {Vonage::Users#create} instead
|
13
|
-
#
|
14
12
|
# @option params [String] :name
|
15
13
|
# Unique name for a user.
|
16
14
|
#
|
@@ -28,14 +26,11 @@ module Vonage
|
|
28
26
|
# @see https://developer.nexmo.com/api/conversation#createUser
|
29
27
|
#
|
30
28
|
def create(params)
|
31
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Users#create` instead.')
|
32
29
|
request('/beta/users', params: params, type: Post)
|
33
30
|
end
|
34
31
|
|
35
32
|
# List users.
|
36
33
|
#
|
37
|
-
# @deprecated Please use {Vonage::Users#list} instead
|
38
|
-
#
|
39
34
|
# @option params [Boolean] :auto_advance
|
40
35
|
# Set this to `false` to not auto-advance through all the pages in the record
|
41
36
|
# and collect all the data. The default is `true`.
|
@@ -45,14 +40,11 @@ module Vonage
|
|
45
40
|
# @see https://developer.nexmo.com/api/conversation#getUsers
|
46
41
|
#
|
47
42
|
def list(params = nil, auto_advance = true)
|
48
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Users#list` instead.')
|
49
43
|
request('/beta/users', params: params)
|
50
44
|
end
|
51
45
|
|
52
46
|
# Retrieve a user.
|
53
47
|
#
|
54
|
-
# @deprecated Please use {Vonage::Users#find} instead
|
55
|
-
#
|
56
48
|
# @param [String] id
|
57
49
|
#
|
58
50
|
# @return [Response]
|
@@ -60,14 +52,11 @@ module Vonage
|
|
60
52
|
# @see https://developer.nexmo.com/api/conversation#getUser
|
61
53
|
#
|
62
54
|
def get(id)
|
63
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Users#find` instead.')
|
64
55
|
request('/beta/users/' + id)
|
65
56
|
end
|
66
57
|
|
67
58
|
# Update a user.
|
68
59
|
#
|
69
|
-
# @deprecated Please use {Vonage::Users#update} instead
|
70
|
-
#
|
71
60
|
# @option params [String] :name
|
72
61
|
# Unique name for a user.
|
73
62
|
#
|
@@ -90,14 +79,11 @@ module Vonage
|
|
90
79
|
# @see https://developer.nexmo.com/api/conversation#updateUser
|
91
80
|
#
|
92
81
|
def update(id, params)
|
93
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Users#update` instead.')
|
94
82
|
request('/beta/users/' + id, params: params, type: Put)
|
95
83
|
end
|
96
84
|
|
97
85
|
# Delete a user.
|
98
86
|
#
|
99
|
-
# @deprecated Please use {Vonage::Users#delete} instead
|
100
|
-
#
|
101
87
|
# @param [String] id
|
102
88
|
#
|
103
89
|
# @return [Response]
|
@@ -105,7 +91,6 @@ module Vonage
|
|
105
91
|
# @see https://developer.nexmo.com/api/conversation#deleteUser
|
106
92
|
#
|
107
93
|
def delete(id)
|
108
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Users#delete` instead.')
|
109
94
|
request('/beta/users/' + id, type: Delete)
|
110
95
|
end
|
111
96
|
end
|
data/lib/vonage/conversations.rb
CHANGED
@@ -11,8 +11,6 @@ module Vonage
|
|
11
11
|
|
12
12
|
# Create a conversation.
|
13
13
|
#
|
14
|
-
# @deprecated Please use {Vonage::Conversation#create} instead
|
15
|
-
#
|
16
14
|
# @example
|
17
15
|
# response = client.conversations.create(name: 'Example Conversation', display_name: 'Example Display Name')
|
18
16
|
#
|
@@ -39,14 +37,11 @@ module Vonage
|
|
39
37
|
#
|
40
38
|
sig { params(params: T::Hash[Symbol, T.untyped]).returns(Vonage::Response) }
|
41
39
|
def create(params)
|
42
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation#create` instead.')
|
43
40
|
request('/beta/conversations', params: params, type: Post)
|
44
41
|
end
|
45
42
|
|
46
43
|
# List all conversations associated with your application.
|
47
44
|
#
|
48
|
-
# @deprecated Please use {Vonage::Conversation#list} instead
|
49
|
-
#
|
50
45
|
# @example
|
51
46
|
# response = client.conversations.list
|
52
47
|
#
|
@@ -76,7 +71,6 @@ module Vonage
|
|
76
71
|
#
|
77
72
|
sig { params(params: T.nilable(T::Hash[Symbol, T.untyped]), auto_advance: T::Boolean).returns(Vonage::Response) }
|
78
73
|
def list(params = nil, auto_advance = true)
|
79
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation#list` instead.')
|
80
74
|
if params && !params.key?(:auto_advance)
|
81
75
|
params.merge!(auto_advance: true)
|
82
76
|
end
|
@@ -86,8 +80,6 @@ module Vonage
|
|
86
80
|
|
87
81
|
# Retrieve a conversation.
|
88
82
|
#
|
89
|
-
# @deprecated Please use {Vonage::Conversation#find} instead
|
90
|
-
#
|
91
83
|
# @example
|
92
84
|
# response = client.conversations.get(id)
|
93
85
|
#
|
@@ -99,14 +91,11 @@ module Vonage
|
|
99
91
|
#
|
100
92
|
sig { params(id: String).returns(Vonage::Response) }
|
101
93
|
def get(id)
|
102
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation#find` instead.')
|
103
94
|
request('/beta/conversations/' + id)
|
104
95
|
end
|
105
96
|
|
106
97
|
# Update a conversation.
|
107
98
|
#
|
108
|
-
# @deprecated Please use {Vonage::Conversation#update} instead
|
109
|
-
#
|
110
99
|
# @example
|
111
100
|
# response = client.conversations.update(id, display_name: 'Updated conversation')
|
112
101
|
#
|
@@ -138,14 +127,11 @@ module Vonage
|
|
138
127
|
params: T::Hash[Symbol, T.untyped]
|
139
128
|
).returns(Vonage::Response) }
|
140
129
|
def update(id, params)
|
141
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation#update` instead.')
|
142
130
|
request('/beta/conversations/' + id, params: params, type: Put)
|
143
131
|
end
|
144
132
|
|
145
133
|
# Delete a conversation.
|
146
134
|
#
|
147
|
-
# @deprecated Please use {Vonage::Conversation#delete} instead
|
148
|
-
#
|
149
135
|
# @example
|
150
136
|
# response = client.conversations.delete(id)
|
151
137
|
#
|
@@ -157,14 +143,11 @@ module Vonage
|
|
157
143
|
#
|
158
144
|
sig { params(id: String).returns(Vonage::Response) }
|
159
145
|
def delete(id)
|
160
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation#delete` instead.')
|
161
146
|
request('/beta/conversations/' + id, type: Delete)
|
162
147
|
end
|
163
148
|
|
164
149
|
# Record a conversation.
|
165
150
|
#
|
166
|
-
# @deprecated
|
167
|
-
#
|
168
151
|
# @example
|
169
152
|
# response = client.conversations.record(id, action: 'start')
|
170
153
|
#
|
@@ -195,17 +178,13 @@ module Vonage
|
|
195
178
|
params: T::Hash[Symbol, T.untyped]
|
196
179
|
).returns(Vonage::Response) }
|
197
180
|
def record(id, params)
|
198
|
-
logger.info('This method is deprecated and will be removed in a future release.')
|
199
181
|
request('/v1/conversations/' + id + '/record', params: params, type: Put)
|
200
182
|
end
|
201
183
|
|
202
184
|
# @return [Events]
|
203
185
|
#
|
204
|
-
# @deprecated Please use {Vonage::Conversation#event} instead
|
205
|
-
#
|
206
186
|
sig { returns(T.nilable(Vonage::Conversations::Events)) }
|
207
187
|
def events
|
208
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation#event` instead.')
|
209
188
|
@events = T.let(@events, T.nilable(Vonage::Conversations::Events))
|
210
189
|
@config = T.let(@config, T.nilable(Vonage::Config))
|
211
190
|
@events ||= Events.new(@config)
|
@@ -213,33 +192,24 @@ module Vonage
|
|
213
192
|
|
214
193
|
# @return [Legs]
|
215
194
|
#
|
216
|
-
# @deprecated
|
217
|
-
#
|
218
195
|
sig { returns(T.nilable(Vonage::Conversations::Legs)) }
|
219
196
|
def legs
|
220
|
-
logger.info('This method is deprecated and will be removed in a future release.')
|
221
197
|
@legs = T.let(@legs, T.nilable(Vonage::Conversations::Legs))
|
222
198
|
@legs ||= Legs.new(@config)
|
223
199
|
end
|
224
200
|
|
225
201
|
# @return [Members]
|
226
202
|
#
|
227
|
-
# @deprecated Please use {Vonage::Conversation#member} instead
|
228
|
-
#
|
229
203
|
sig { returns(T.nilable(Vonage::Conversations::Members)) }
|
230
204
|
def members
|
231
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation#member` instead.')
|
232
205
|
@members = T.let(@members, T.nilable(Vonage::Conversations::Members))
|
233
206
|
@members ||= Members.new(@config)
|
234
207
|
end
|
235
208
|
|
236
209
|
# @return [Users]
|
237
210
|
#
|
238
|
-
# @deprecated Please use {Vonage::Conversation#user} instead
|
239
|
-
#
|
240
211
|
sig { returns(T.nilable(Vonage::Conversations::Users)) }
|
241
212
|
def users
|
242
|
-
logger.info('This method is deprecated and will be removed in a future release. Please use `Vonage::Conversation#user` instead.')
|
243
213
|
@users = T.let(@users, T.nilable(Vonage::Conversations::Users))
|
244
214
|
@users ||= Users.new(@config)
|
245
215
|
end
|