vonage 7.12.0 → 7.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vonage/client.rb +14 -0
- data/lib/vonage/config.rb +4 -0
- data/lib/vonage/errors.rb +31 -17
- data/lib/vonage/meetings/applications.rb +25 -0
- data/lib/vonage/meetings/dial_in_numbers/list_response.rb +11 -0
- data/lib/vonage/meetings/dial_in_numbers.rb +23 -0
- data/lib/vonage/meetings/recordings.rb +36 -0
- data/lib/vonage/meetings/rooms/list_response.rb +11 -0
- data/lib/vonage/meetings/rooms.rb +155 -0
- data/lib/vonage/meetings/sessions/list_response.rb +11 -0
- data/lib/vonage/meetings/sessions.rb +28 -0
- data/lib/vonage/meetings/themes/list_response.rb +11 -0
- data/lib/vonage/meetings/themes.rb +218 -0
- data/lib/vonage/meetings.rb +38 -0
- data/lib/vonage/namespace.rb +139 -56
- data/lib/vonage/proactive_connect/events/list_response.rb +11 -0
- data/lib/vonage/proactive_connect/events.rb +68 -0
- data/lib/vonage/proactive_connect/item.rb +104 -0
- data/lib/vonage/proactive_connect/items/file_response.rb +32 -0
- data/lib/vonage/proactive_connect/items/list_response.rb +11 -0
- data/lib/vonage/proactive_connect/items.rb +107 -0
- data/lib/vonage/proactive_connect/list.rb +168 -0
- data/lib/vonage/proactive_connect/lists/list_response.rb +11 -0
- data/lib/vonage/proactive_connect/lists.rb +35 -0
- data/lib/vonage/proactive_connect.rb +33 -0
- data/lib/vonage/version.rb +1 -1
- data/vonage.gemspec +1 -0
- metadata +37 -2
@@ -0,0 +1,168 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Vonage
|
5
|
+
class ProactiveConnect::List < Namespace
|
6
|
+
extend T::Sig
|
7
|
+
|
8
|
+
self.authentication = BearerToken
|
9
|
+
|
10
|
+
self.host = :vonage_host
|
11
|
+
|
12
|
+
self.request_body = JSON
|
13
|
+
|
14
|
+
# Create list
|
15
|
+
#
|
16
|
+
# @example
|
17
|
+
# response = proactive_connect.list.create(name: 'List Number 1')
|
18
|
+
#
|
19
|
+
# @param [required, String] :name
|
20
|
+
# A name for the list
|
21
|
+
#
|
22
|
+
# @param [optional, String] :description
|
23
|
+
# A description of the list
|
24
|
+
#
|
25
|
+
# @param [optional, Array] :tags
|
26
|
+
# An Array of up to 10 Strings assigining tags to the list. Each String must be between 1 and 15 characters
|
27
|
+
#
|
28
|
+
# @param [optional, Array] :attributes
|
29
|
+
# Array of Hash objects. Each Hash represents an attribute for the list.
|
30
|
+
#
|
31
|
+
# @option attributes [required, String] :name
|
32
|
+
# The name of the attribute
|
33
|
+
#
|
34
|
+
# @option attributes [optional, String] :alias
|
35
|
+
# Alternative name to use for this attribute.
|
36
|
+
# Use when you wish to correlate between 2 or more list that are using different attribute names for the same semantic data
|
37
|
+
#
|
38
|
+
# @option attributes [optional, Boolean] :key
|
39
|
+
# Set to `true` if this attribute should be used to correlate between 2 or more lists. Default is `false`
|
40
|
+
#
|
41
|
+
# @param [optional, Hash] :datasource
|
42
|
+
# Datasource for the list
|
43
|
+
#
|
44
|
+
# @option datasource [required, String] :type
|
45
|
+
# Must be set to `manual`, which is the default
|
46
|
+
#
|
47
|
+
# @see https://developer.vonage.com/en/api/proactive-connect#listsCreate
|
48
|
+
#
|
49
|
+
def create(name:, **params)
|
50
|
+
request(
|
51
|
+
"/v0.1/bulk/lists",
|
52
|
+
params: params.merge({ name: name }),
|
53
|
+
type: Post
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Get list by id
|
58
|
+
#
|
59
|
+
# @example
|
60
|
+
# response = proactive_connect.list.find(id: 'e546eebe-8e23-4e4d-bb7c-29d4700c9865')
|
61
|
+
#
|
62
|
+
# @param [required, String] :id
|
63
|
+
# Unique identifier for the list
|
64
|
+
#
|
65
|
+
# @see https://developer.vonage.com/en/api/proactive-connect#listsGet
|
66
|
+
#
|
67
|
+
def find(id:)
|
68
|
+
request("/v0.1/bulk/lists/#{id}")
|
69
|
+
end
|
70
|
+
|
71
|
+
# Update list
|
72
|
+
#
|
73
|
+
# @example
|
74
|
+
# response = proactive_connect.list.update(name: 'List Number 1')
|
75
|
+
#
|
76
|
+
# @param [required, String] :id
|
77
|
+
# The id of the list to update
|
78
|
+
#
|
79
|
+
# @param [required, String] :name
|
80
|
+
# The name of the list
|
81
|
+
#
|
82
|
+
# @param [optional, String] :description
|
83
|
+
# A description of the list
|
84
|
+
#
|
85
|
+
# @param [optional, Array] :tags
|
86
|
+
# An Array of up to 10 Strings assigining tags to the list. Each String must be between 1 and 15 characters
|
87
|
+
#
|
88
|
+
# @param [optional, Array] :attributes
|
89
|
+
# Array of Hash objects. Each Hash represents an attribute for the list.
|
90
|
+
#
|
91
|
+
# @option attributes [required, String] :name
|
92
|
+
# The name of the attribute
|
93
|
+
#
|
94
|
+
# @option attributes [optional, String] :alias
|
95
|
+
# Alternative name to use for this attribute.
|
96
|
+
# Use when you wish to correlate between 2 or more list that are using different attribute names for the same semantic data
|
97
|
+
#
|
98
|
+
# @option attributes [optional, Boolean] :key
|
99
|
+
# Set to `true` if this attribute should be used to correlate between 2 or more lists. Default is `false`
|
100
|
+
#
|
101
|
+
# @param [optional, Hash] :datasource
|
102
|
+
# Datasource for the list
|
103
|
+
#
|
104
|
+
# @option datasource [required, String] :type
|
105
|
+
# Must be set to `manual`, which is the default
|
106
|
+
#
|
107
|
+
# @see https://developer.vonage.com/en/api/proactive-connect#listsUpdate
|
108
|
+
#
|
109
|
+
def update(id:, name:, **params)
|
110
|
+
request(
|
111
|
+
"/v0.1/bulk/lists/#{id}",
|
112
|
+
params: params.merge({ name: name }),
|
113
|
+
type: Put
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Delete a list by id
|
118
|
+
#
|
119
|
+
# @example
|
120
|
+
# response = proactive_connect.list.delete(id: '74ea1ecf-06c9-4072-a285-61677bd353e8')
|
121
|
+
#
|
122
|
+
# @param [required, String] :id
|
123
|
+
# Unique identifier for the list
|
124
|
+
#
|
125
|
+
# @see https://developer.vonage.com/en/api/proactive-connect#listsDelete
|
126
|
+
#
|
127
|
+
def delete(id:)
|
128
|
+
request(
|
129
|
+
"/v0.1/bulk/lists/#{id}",
|
130
|
+
type: Delete
|
131
|
+
)
|
132
|
+
end
|
133
|
+
|
134
|
+
# Clear list by deleting all items
|
135
|
+
#
|
136
|
+
# @example
|
137
|
+
# response = proactive_connect.list.clear_items(id: 'e546eebe-8e23-4e4d-bb7c-29d4700c9865')
|
138
|
+
#
|
139
|
+
# @param [required, String] :id
|
140
|
+
# Unique identifier for the list
|
141
|
+
#
|
142
|
+
# @see https://developer.vonage.com/en/api/proactive-connect#listsClear
|
143
|
+
#
|
144
|
+
def clear_items(id:)
|
145
|
+
request(
|
146
|
+
"/v0.1/bulk/lists/#{id}/clear",
|
147
|
+
type: Post
|
148
|
+
)
|
149
|
+
end
|
150
|
+
|
151
|
+
# Fetch and replace all items from datasource
|
152
|
+
#
|
153
|
+
# @example
|
154
|
+
# response = proactive_connect.list.fetch_and_replace_items(id: 'e546eebe-8e23-4e4d-bb7c-29d4700c9865')
|
155
|
+
#
|
156
|
+
# @param [required, String] :id
|
157
|
+
# Unique identifier for the list
|
158
|
+
#
|
159
|
+
# @see https://developer.vonage.com/en/api/proactive-connect#listsFetch
|
160
|
+
#
|
161
|
+
def fetch_and_replace_items(id:)
|
162
|
+
request(
|
163
|
+
"/v0.1/bulk/lists/#{id}/fetch",
|
164
|
+
type: Post
|
165
|
+
)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Vonage
|
5
|
+
class ProactiveConnect::Lists < Namespace
|
6
|
+
extend T::Sig
|
7
|
+
|
8
|
+
self.authentication = BearerToken
|
9
|
+
|
10
|
+
self.host = :vonage_host
|
11
|
+
|
12
|
+
# Find all lists
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# response = proactive_connect.lists.list
|
16
|
+
#
|
17
|
+
# @param [optional, String] :page
|
18
|
+
# Page of results to jump to
|
19
|
+
#
|
20
|
+
# @param [optional, String] :page_size
|
21
|
+
# Number of results per page
|
22
|
+
#
|
23
|
+
# @param [optional, String] order
|
24
|
+
# Sort in either ascending (asc, the default) or descending (desc) order
|
25
|
+
#
|
26
|
+
# @see https://developer.vonage.com/en/api/proactive-connect#listsFindAll
|
27
|
+
#
|
28
|
+
def list(**params)
|
29
|
+
path = "/v0.1/bulk/lists"
|
30
|
+
path += "?#{Params.encode(params)}" unless params.empty?
|
31
|
+
|
32
|
+
request(path, response_class: ListResponse)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Vonage
|
5
|
+
class ProactiveConnect < Namespace
|
6
|
+
extend T::Sig
|
7
|
+
|
8
|
+
sig { returns(T.nilable(Vonage::ProactiveConnect::Lists)) }
|
9
|
+
def lists
|
10
|
+
@lists ||= Lists.new(@config)
|
11
|
+
end
|
12
|
+
|
13
|
+
sig { returns(T.nilable(Vonage::ProactiveConnect::List)) }
|
14
|
+
def list
|
15
|
+
@list ||= List.new(@config)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig { returns(T.nilable(Vonage::ProactiveConnect::Items)) }
|
19
|
+
def items
|
20
|
+
@items ||= Items.new(@config)
|
21
|
+
end
|
22
|
+
|
23
|
+
sig { returns(T.nilable(Vonage::ProactiveConnect::Item)) }
|
24
|
+
def item
|
25
|
+
@item ||= Item.new(@config)
|
26
|
+
end
|
27
|
+
|
28
|
+
sig { returns(T.nilable(Vonage::ProactiveConnect::Events)) }
|
29
|
+
def events
|
30
|
+
@events ||= Events.new(@config)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/vonage/version.rb
CHANGED
data/vonage.gemspec
CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
|
|
15
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')
|
18
19
|
s.add_runtime_dependency('rexml')
|
19
20
|
s.add_runtime_dependency('phonelib')
|
20
21
|
s.require_path = 'lib'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vonage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vonage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vonage-jwt
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0.5'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: multipart-post
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '2.0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.0'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: rexml
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,6 +139,17 @@ files:
|
|
125
139
|
- lib/vonage/key_secret_params.rb
|
126
140
|
- lib/vonage/keys.rb
|
127
141
|
- lib/vonage/logger.rb
|
142
|
+
- lib/vonage/meetings.rb
|
143
|
+
- lib/vonage/meetings/applications.rb
|
144
|
+
- lib/vonage/meetings/dial_in_numbers.rb
|
145
|
+
- lib/vonage/meetings/dial_in_numbers/list_response.rb
|
146
|
+
- lib/vonage/meetings/recordings.rb
|
147
|
+
- lib/vonage/meetings/rooms.rb
|
148
|
+
- lib/vonage/meetings/rooms/list_response.rb
|
149
|
+
- lib/vonage/meetings/sessions.rb
|
150
|
+
- lib/vonage/meetings/sessions/list_response.rb
|
151
|
+
- lib/vonage/meetings/themes.rb
|
152
|
+
- lib/vonage/meetings/themes/list_response.rb
|
128
153
|
- lib/vonage/messages.rb
|
129
154
|
- lib/vonage/messaging.rb
|
130
155
|
- lib/vonage/messaging/channels/messenger.rb
|
@@ -141,6 +166,16 @@ files:
|
|
141
166
|
- lib/vonage/params.rb
|
142
167
|
- lib/vonage/pricing.rb
|
143
168
|
- lib/vonage/pricing_types.rb
|
169
|
+
- lib/vonage/proactive_connect.rb
|
170
|
+
- lib/vonage/proactive_connect/events.rb
|
171
|
+
- lib/vonage/proactive_connect/events/list_response.rb
|
172
|
+
- lib/vonage/proactive_connect/item.rb
|
173
|
+
- lib/vonage/proactive_connect/items.rb
|
174
|
+
- lib/vonage/proactive_connect/items/file_response.rb
|
175
|
+
- lib/vonage/proactive_connect/items/list_response.rb
|
176
|
+
- lib/vonage/proactive_connect/list.rb
|
177
|
+
- lib/vonage/proactive_connect/lists.rb
|
178
|
+
- lib/vonage/proactive_connect/lists/list_response.rb
|
144
179
|
- lib/vonage/redact.rb
|
145
180
|
- lib/vonage/response.rb
|
146
181
|
- lib/vonage/secrets.rb
|