twilio-ruby 5.74.5 → 5.75.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +15 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +240 -0
- data/lib/twilio-ruby/rest/content/v1.rb +7 -0
- data/lib/twilio-ruby/rest/content.rb +6 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +216 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +4 -4
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +226 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +218 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +41 -0
- data/lib/twilio-ruby/rest/messaging.rb +18 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a57741b264ef9fc43e6be40e817be88de8db660
|
4
|
+
data.tar.gz: 34ecc7f79c806fbc514bb8fd4931e9440a1ede56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7504504307b32b86498a8ec7848a018951c5e1d4bbd657e9f9cd91e463431502b0f38c2b2d05fd866a83b91feda322a50d4de5e2de5a566671ccc1a994c194a4
|
7
|
+
data.tar.gz: aa97372cf161a1b53a7101646c8412cc4c350e13a8076bc547a1310ab2feac255365022b6034cc78630548911c70f778edf7758cb5593ee196c38c7c75186555
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,21 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2023-03-22] Version 5.75.0
|
5
|
+
---------------------------
|
6
|
+
**Library - Chore**
|
7
|
+
- [PR #630](https://github.com/twilio/twilio-ruby/pull/630): Accommodate jwt's minor and patch updates. Thanks to [@sato11](https://github.com/sato11)!
|
8
|
+
|
9
|
+
**Api**
|
10
|
+
- Revert Corrected the data type for `friendly_name` in Available Phone Number Local, Mobile and TollFree resources
|
11
|
+
- Corrected the data type for `friendly_name` in Available Phone Number Local, Mobile and TollFree resources **(breaking change)**
|
12
|
+
|
13
|
+
**Messaging**
|
14
|
+
- Add `linkshortening_messaging_service` resource
|
15
|
+
- Add new endpoint for GetDomainConfigByMessagingServiceSid
|
16
|
+
- Remove `validated` parameter and add `cert_in_validation` parameter to Link Shortening API **(breaking change)**
|
17
|
+
|
18
|
+
|
4
19
|
[2023-03-09] Version 5.74.5
|
5
20
|
---------------------------
|
6
21
|
**Api**
|
data/README.md
CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
|
|
34
34
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 5.
|
37
|
+
gem 'twilio-ruby', '~> 5.75.0'
|
38
38
|
```
|
39
39
|
|
40
40
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
41
|
|
42
42
|
```bash
|
43
|
-
gem install twilio-ruby -v 5.
|
43
|
+
gem install twilio-ruby -v 5.75.0
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -112,7 +112,7 @@ module Twilio
|
|
112
112
|
# @param [String] friendly_name A descriptive string that you created to describe
|
113
113
|
# this resource. It can be up to 64 characters long.
|
114
114
|
# @param [String] max_size The maximum number of calls allowed to be in the queue.
|
115
|
-
# The default is
|
115
|
+
# The default is 1000. The maximum is 5000.
|
116
116
|
# @return [QueueInstance] Created QueueInstance
|
117
117
|
def create(friendly_name: nil, max_size: :unset)
|
118
118
|
data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size, })
|
@@ -193,7 +193,7 @@ module Twilio
|
|
193
193
|
# @param [String] friendly_name A descriptive string that you created to describe
|
194
194
|
# this resource. It can be up to 64 characters long.
|
195
195
|
# @param [String] max_size The maximum number of calls allowed to be in the queue.
|
196
|
-
# The default is
|
196
|
+
# The default is 1000. The maximum is 5000.
|
197
197
|
# @return [QueueInstance] Updated QueueInstance
|
198
198
|
def update(friendly_name: :unset, max_size: :unset)
|
199
199
|
data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size, })
|
@@ -356,7 +356,7 @@ module Twilio
|
|
356
356
|
# @param [String] friendly_name A descriptive string that you created to describe
|
357
357
|
# this resource. It can be up to 64 characters long.
|
358
358
|
# @param [String] max_size The maximum number of calls allowed to be in the queue.
|
359
|
-
# The default is
|
359
|
+
# The default is 1000. The maximum is 5000.
|
360
360
|
# @return [QueueInstance] Updated QueueInstance
|
361
361
|
def update(friendly_name: :unset, max_size: :unset)
|
362
362
|
context.update(friendly_name: friendly_name, max_size: max_size, )
|
@@ -0,0 +1,240 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Content < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
+
class ContentAndApprovalsList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the ContentAndApprovalsList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [ContentAndApprovalsList] ContentAndApprovalsList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/ContentAndApprovals"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists ContentAndApprovalsInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
|
+
# guarantees to never return more than limit. Default is no limit
|
34
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
35
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
36
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
|
+
# efficient page size, i.e. min(limit, 1000)
|
38
|
+
# @return [Array] Array of up to limit results
|
39
|
+
def list(limit: nil, page_size: nil)
|
40
|
+
self.stream(limit: limit, page_size: page_size).entries
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Streams ContentAndApprovalsInstance records from the API as an Enumerable.
|
45
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
46
|
+
# is reached.
|
47
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
|
+
# guarantees to never return more than limit. Default is no limit.
|
49
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
50
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
51
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
|
+
# efficient page size, i.e. min(limit, 1000)
|
53
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
54
|
+
def stream(limit: nil, page_size: nil)
|
55
|
+
limits = @version.read_limits(limit, page_size)
|
56
|
+
|
57
|
+
page = self.page(page_size: limits[:page_size], )
|
58
|
+
|
59
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# When passed a block, yields ContentAndApprovalsInstance records from the API.
|
64
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
65
|
+
# is reached.
|
66
|
+
def each
|
67
|
+
limits = @version.read_limits
|
68
|
+
|
69
|
+
page = self.page(page_size: limits[:page_size], )
|
70
|
+
|
71
|
+
@version.stream(page,
|
72
|
+
limit: limits[:limit],
|
73
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Retrieve a single page of ContentAndApprovalsInstance records from the API.
|
78
|
+
# Request is executed immediately.
|
79
|
+
# @param [String] page_token PageToken provided by the API
|
80
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
81
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
82
|
+
# @return [Page] Page of ContentAndApprovalsInstance
|
83
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
84
|
+
params = Twilio::Values.of({
|
85
|
+
'PageToken' => page_token,
|
86
|
+
'Page' => page_number,
|
87
|
+
'PageSize' => page_size,
|
88
|
+
})
|
89
|
+
|
90
|
+
response = @version.page('GET', @uri, params: params)
|
91
|
+
|
92
|
+
ContentAndApprovalsPage.new(@version, response, @solution)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieve a single page of ContentAndApprovalsInstance records from the API.
|
97
|
+
# Request is executed immediately.
|
98
|
+
# @param [String] target_url API-generated URL for the requested results page
|
99
|
+
# @return [Page] Page of ContentAndApprovalsInstance
|
100
|
+
def get_page(target_url)
|
101
|
+
response = @version.domain.request(
|
102
|
+
'GET',
|
103
|
+
target_url
|
104
|
+
)
|
105
|
+
ContentAndApprovalsPage.new(@version, response, @solution)
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Provide a user friendly representation
|
110
|
+
def to_s
|
111
|
+
'#<Twilio.Content.V1.ContentAndApprovalsList>'
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
117
|
+
class ContentAndApprovalsPage < Page
|
118
|
+
##
|
119
|
+
# Initialize the ContentAndApprovalsPage
|
120
|
+
# @param [Version] version Version that contains the resource
|
121
|
+
# @param [Response] response Response from the API
|
122
|
+
# @param [Hash] solution Path solution for the resource
|
123
|
+
# @return [ContentAndApprovalsPage] ContentAndApprovalsPage
|
124
|
+
def initialize(version, response, solution)
|
125
|
+
super(version, response)
|
126
|
+
|
127
|
+
# Path Solution
|
128
|
+
@solution = solution
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Build an instance of ContentAndApprovalsInstance
|
133
|
+
# @param [Hash] payload Payload response from the API
|
134
|
+
# @return [ContentAndApprovalsInstance] ContentAndApprovalsInstance
|
135
|
+
def get_instance(payload)
|
136
|
+
ContentAndApprovalsInstance.new(@version, payload, )
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Provide a user friendly representation
|
141
|
+
def to_s
|
142
|
+
'<Twilio.Content.V1.ContentAndApprovalsPage>'
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
148
|
+
class ContentAndApprovalsInstance < InstanceResource
|
149
|
+
##
|
150
|
+
# Initialize the ContentAndApprovalsInstance
|
151
|
+
# @param [Version] version Version that contains the resource
|
152
|
+
# @param [Hash] payload payload that contains response from Twilio
|
153
|
+
# @return [ContentAndApprovalsInstance] ContentAndApprovalsInstance
|
154
|
+
def initialize(version, payload)
|
155
|
+
super(version)
|
156
|
+
|
157
|
+
# Marshaled Properties
|
158
|
+
@properties = {
|
159
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
160
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
161
|
+
'sid' => payload['sid'],
|
162
|
+
'account_sid' => payload['account_sid'],
|
163
|
+
'friendly_name' => payload['friendly_name'],
|
164
|
+
'language' => payload['language'],
|
165
|
+
'variables' => payload['variables'],
|
166
|
+
'types' => payload['types'],
|
167
|
+
'approval_requests' => payload['approval_requests'],
|
168
|
+
}
|
169
|
+
end
|
170
|
+
|
171
|
+
##
|
172
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
173
|
+
def date_created
|
174
|
+
@properties['date_created']
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
179
|
+
def date_updated
|
180
|
+
@properties['date_updated']
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# @return [String] The unique string that identifies the resource
|
185
|
+
def sid
|
186
|
+
@properties['sid']
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# @return [String] The SID of the Account that created the resource
|
191
|
+
def account_sid
|
192
|
+
@properties['account_sid']
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [String] A string name used to describe the Content resource
|
197
|
+
def friendly_name
|
198
|
+
@properties['friendly_name']
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# @return [String] Two-letter language code identifying the language the Content resource is in.
|
203
|
+
def language
|
204
|
+
@properties['language']
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# @return [Hash] Defines the default placeholder values for variables included in the Content resource
|
209
|
+
def variables
|
210
|
+
@properties['variables']
|
211
|
+
end
|
212
|
+
|
213
|
+
##
|
214
|
+
# @return [Hash] The Content types (e.g. twilio/text) for this Content resource
|
215
|
+
def types
|
216
|
+
@properties['types']
|
217
|
+
end
|
218
|
+
|
219
|
+
##
|
220
|
+
# @return [Hash] The approval status of the Content resource.
|
221
|
+
def approval_requests
|
222
|
+
@properties['approval_requests']
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# Provide a user friendly representation
|
227
|
+
def to_s
|
228
|
+
"<Twilio.Content.V1.ContentAndApprovalsInstance>"
|
229
|
+
end
|
230
|
+
|
231
|
+
##
|
232
|
+
# Provide a detailed, user friendly representation
|
233
|
+
def inspect
|
234
|
+
"<Twilio.Content.V1.ContentAndApprovalsInstance>"
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
@@ -16,6 +16,7 @@ module Twilio
|
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
18
|
@contents = nil
|
19
|
+
@content_and_approvals = nil
|
19
20
|
@legacy_contents = nil
|
20
21
|
end
|
21
22
|
|
@@ -35,6 +36,12 @@ module Twilio
|
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
39
|
+
##
|
40
|
+
# @return [Twilio::REST::Content::V1::ContentAndApprovalsContext]
|
41
|
+
def content_and_approvals
|
42
|
+
@content_and_approvals ||= ContentAndApprovalsList.new self
|
43
|
+
end
|
44
|
+
|
38
45
|
##
|
39
46
|
# @return [Twilio::REST::Content::V1::LegacyContentContext]
|
40
47
|
def legacy_contents
|
@@ -37,6 +37,12 @@ module Twilio
|
|
37
37
|
self.v1.contents(sid)
|
38
38
|
end
|
39
39
|
|
40
|
+
##
|
41
|
+
# @return [Twilio::REST::Content::V1::ContentAndApprovalsInstance]
|
42
|
+
def content_and_approvals
|
43
|
+
self.v1.content_and_approvals()
|
44
|
+
end
|
45
|
+
|
40
46
|
##
|
41
47
|
# @return [Twilio::REST::Content::V1::LegacyContentInstance]
|
42
48
|
def legacy_contents
|
@@ -0,0 +1,216 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
+
class InsightsConversationsList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the InsightsConversationsList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [InsightsConversationsList] InsightsConversationsList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Insights/Conversations"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists InsightsConversationsInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [String] segment_id Unique Id of the segment for which conversation
|
33
|
+
# details needs to be fetched
|
34
|
+
# @param [String] token The Token HTTP request header
|
35
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
36
|
+
# guarantees to never return more than limit. Default is no limit
|
37
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
38
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
39
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
40
|
+
# efficient page size, i.e. min(limit, 1000)
|
41
|
+
# @return [Array] Array of up to limit results
|
42
|
+
def list(segment_id: :unset, token: :unset, limit: nil, page_size: nil)
|
43
|
+
self.stream(segment_id: segment_id, token: token, limit: limit, page_size: page_size).entries
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Streams InsightsConversationsInstance records from the API as an Enumerable.
|
48
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
49
|
+
# is reached.
|
50
|
+
# @param [String] segment_id Unique Id of the segment for which conversation
|
51
|
+
# details needs to be fetched
|
52
|
+
# @param [String] token The Token HTTP request header
|
53
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
54
|
+
# guarantees to never return more than limit. Default is no limit.
|
55
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
56
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
57
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
58
|
+
# efficient page size, i.e. min(limit, 1000)
|
59
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
60
|
+
def stream(segment_id: :unset, token: :unset, limit: nil, page_size: nil)
|
61
|
+
limits = @version.read_limits(limit, page_size)
|
62
|
+
|
63
|
+
page = self.page(segment_id: segment_id, token: token, page_size: limits[:page_size], )
|
64
|
+
|
65
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# When passed a block, yields InsightsConversationsInstance records from the API.
|
70
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
71
|
+
# is reached.
|
72
|
+
def each
|
73
|
+
limits = @version.read_limits
|
74
|
+
|
75
|
+
page = self.page(page_size: limits[:page_size], )
|
76
|
+
|
77
|
+
@version.stream(page,
|
78
|
+
limit: limits[:limit],
|
79
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# Retrieve a single page of InsightsConversationsInstance records from the API.
|
84
|
+
# Request is executed immediately.
|
85
|
+
# @param [String] segment_id Unique Id of the segment for which conversation
|
86
|
+
# details needs to be fetched
|
87
|
+
# @param [String] token The Token HTTP request header
|
88
|
+
# @param [String] page_token PageToken provided by the API
|
89
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
90
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
91
|
+
# @return [Page] Page of InsightsConversationsInstance
|
92
|
+
def page(segment_id: :unset, token: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
93
|
+
params = Twilio::Values.of({
|
94
|
+
'SegmentId' => segment_id,
|
95
|
+
'PageToken' => page_token,
|
96
|
+
'Page' => page_number,
|
97
|
+
'PageSize' => page_size,
|
98
|
+
})
|
99
|
+
headers = Twilio::Values.of({'Token' => token, })
|
100
|
+
|
101
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
102
|
+
|
103
|
+
InsightsConversationsPage.new(@version, response, @solution)
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Retrieve a single page of InsightsConversationsInstance records from the API.
|
108
|
+
# Request is executed immediately.
|
109
|
+
# @param [String] target_url API-generated URL for the requested results page
|
110
|
+
# @return [Page] Page of InsightsConversationsInstance
|
111
|
+
def get_page(target_url)
|
112
|
+
response = @version.domain.request(
|
113
|
+
'GET',
|
114
|
+
target_url
|
115
|
+
)
|
116
|
+
InsightsConversationsPage.new(@version, response, @solution)
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# Provide a user friendly representation
|
121
|
+
def to_s
|
122
|
+
'#<Twilio.FlexApi.V1.InsightsConversationsList>'
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
128
|
+
class InsightsConversationsPage < Page
|
129
|
+
##
|
130
|
+
# Initialize the InsightsConversationsPage
|
131
|
+
# @param [Version] version Version that contains the resource
|
132
|
+
# @param [Response] response Response from the API
|
133
|
+
# @param [Hash] solution Path solution for the resource
|
134
|
+
# @return [InsightsConversationsPage] InsightsConversationsPage
|
135
|
+
def initialize(version, response, solution)
|
136
|
+
super(version, response)
|
137
|
+
|
138
|
+
# Path Solution
|
139
|
+
@solution = solution
|
140
|
+
end
|
141
|
+
|
142
|
+
##
|
143
|
+
# Build an instance of InsightsConversationsInstance
|
144
|
+
# @param [Hash] payload Payload response from the API
|
145
|
+
# @return [InsightsConversationsInstance] InsightsConversationsInstance
|
146
|
+
def get_instance(payload)
|
147
|
+
InsightsConversationsInstance.new(@version, payload, )
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# Provide a user friendly representation
|
152
|
+
def to_s
|
153
|
+
'<Twilio.FlexApi.V1.InsightsConversationsPage>'
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
159
|
+
class InsightsConversationsInstance < InstanceResource
|
160
|
+
##
|
161
|
+
# Initialize the InsightsConversationsInstance
|
162
|
+
# @param [Version] version Version that contains the resource
|
163
|
+
# @param [Hash] payload payload that contains response from Twilio
|
164
|
+
# @return [InsightsConversationsInstance] InsightsConversationsInstance
|
165
|
+
def initialize(version, payload)
|
166
|
+
super(version)
|
167
|
+
|
168
|
+
# Marshaled Properties
|
169
|
+
@properties = {
|
170
|
+
'account_id' => payload['account_id'],
|
171
|
+
'conversation_id' => payload['conversation_id'],
|
172
|
+
'segment_count' => payload['segment_count'] == nil ? payload['segment_count'] : payload['segment_count'].to_i,
|
173
|
+
'segments' => payload['segments'],
|
174
|
+
}
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# @return [String] The account id
|
179
|
+
def account_id
|
180
|
+
@properties['account_id']
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# @return [String] Unique conversation Id
|
185
|
+
def conversation_id
|
186
|
+
@properties['conversation_id']
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# @return [String] The segment count
|
191
|
+
def segment_count
|
192
|
+
@properties['segment_count']
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [Array[Hash]] The conversation segments
|
197
|
+
def segments
|
198
|
+
@properties['segments']
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# Provide a user friendly representation
|
203
|
+
def to_s
|
204
|
+
"<Twilio.FlexApi.V1.InsightsConversationsInstance>"
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# Provide a detailed, user friendly representation
|
209
|
+
def inspect
|
210
|
+
"<Twilio.FlexApi.V1.InsightsConversationsInstance>"
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
@@ -20,6 +20,7 @@ module Twilio
|
|
20
20
|
@flex_flow = nil
|
21
21
|
@assessments = nil
|
22
22
|
@insights_assessments_comment = nil
|
23
|
+
@insights_conversations = nil
|
23
24
|
@insights_questionnaires = nil
|
24
25
|
@insights_questionnaires_category = nil
|
25
26
|
@insights_questionnaires_question = nil
|
@@ -89,6 +90,12 @@ module Twilio
|
|
89
90
|
@insights_assessments_comment ||= InsightsAssessmentsCommentList.new self
|
90
91
|
end
|
91
92
|
|
93
|
+
##
|
94
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsConversationsContext]
|
95
|
+
def insights_conversations
|
96
|
+
@insights_conversations ||= InsightsConversationsList.new self
|
97
|
+
end
|
98
|
+
|
92
99
|
##
|
93
100
|
# @param [String] id The unique ID of the questionnaire
|
94
101
|
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesContext] if id was passed.
|
@@ -73,6 +73,12 @@ module Twilio
|
|
73
73
|
self.v1.insights_assessments_comment()
|
74
74
|
end
|
75
75
|
|
76
|
+
##
|
77
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsConversationsInstance]
|
78
|
+
def insights_conversations
|
79
|
+
self.v1.insights_conversations()
|
80
|
+
end
|
81
|
+
|
76
82
|
##
|
77
83
|
# @param [String] id The unique id of this questionnaire
|
78
84
|
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesInstance] if id was passed.
|
@@ -146,7 +146,7 @@ module Twilio
|
|
146
146
|
'domain_name' => payload['domain_name'],
|
147
147
|
'certificate_sid' => payload['certificate_sid'],
|
148
148
|
'url' => payload['url'],
|
149
|
-
'
|
149
|
+
'cert_in_validation' => payload['cert_in_validation'],
|
150
150
|
}
|
151
151
|
|
152
152
|
# Context
|
@@ -208,9 +208,9 @@ module Twilio
|
|
208
208
|
end
|
209
209
|
|
210
210
|
##
|
211
|
-
# @return [
|
212
|
-
def
|
213
|
-
@properties['
|
211
|
+
# @return [Hash] New certificate in process of validation field
|
212
|
+
def cert_in_validation
|
213
|
+
@properties['cert_in_validation']
|
214
214
|
end
|
215
215
|
|
216
216
|
##
|
@@ -0,0 +1,226 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Messaging < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class DomainConfigMessagingServiceList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the DomainConfigMessagingServiceList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [DomainConfigMessagingServiceList] DomainConfigMessagingServiceList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Provide a user friendly representation
|
29
|
+
def to_s
|
30
|
+
'#<Twilio.Messaging.V1.DomainConfigMessagingServiceList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
36
|
+
class DomainConfigMessagingServicePage < Page
|
37
|
+
##
|
38
|
+
# Initialize the DomainConfigMessagingServicePage
|
39
|
+
# @param [Version] version Version that contains the resource
|
40
|
+
# @param [Response] response Response from the API
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
42
|
+
# @return [DomainConfigMessagingServicePage] DomainConfigMessagingServicePage
|
43
|
+
def initialize(version, response, solution)
|
44
|
+
super(version, response)
|
45
|
+
|
46
|
+
# Path Solution
|
47
|
+
@solution = solution
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Build an instance of DomainConfigMessagingServiceInstance
|
52
|
+
# @param [Hash] payload Payload response from the API
|
53
|
+
# @return [DomainConfigMessagingServiceInstance] DomainConfigMessagingServiceInstance
|
54
|
+
def get_instance(payload)
|
55
|
+
DomainConfigMessagingServiceInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Provide a user friendly representation
|
60
|
+
def to_s
|
61
|
+
'<Twilio.Messaging.V1.DomainConfigMessagingServicePage>'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
67
|
+
class DomainConfigMessagingServiceContext < InstanceContext
|
68
|
+
##
|
69
|
+
# Initialize the DomainConfigMessagingServiceContext
|
70
|
+
# @param [Version] version Version that contains the resource
|
71
|
+
# @param [String] messaging_service_sid Unique string used to identify the
|
72
|
+
# Messaging service that this domain should be associated with.
|
73
|
+
# @return [DomainConfigMessagingServiceContext] DomainConfigMessagingServiceContext
|
74
|
+
def initialize(version, messaging_service_sid)
|
75
|
+
super(version)
|
76
|
+
|
77
|
+
# Path Solution
|
78
|
+
@solution = {messaging_service_sid: messaging_service_sid, }
|
79
|
+
@uri = "/LinkShortening/MessagingService/#{@solution[:messaging_service_sid]}/DomainConfig"
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# Fetch the DomainConfigMessagingServiceInstance
|
84
|
+
# @return [DomainConfigMessagingServiceInstance] Fetched DomainConfigMessagingServiceInstance
|
85
|
+
def fetch
|
86
|
+
payload = @version.fetch('GET', @uri)
|
87
|
+
|
88
|
+
DomainConfigMessagingServiceInstance.new(
|
89
|
+
@version,
|
90
|
+
payload,
|
91
|
+
messaging_service_sid: @solution[:messaging_service_sid],
|
92
|
+
)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Provide a user friendly representation
|
97
|
+
def to_s
|
98
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
99
|
+
"#<Twilio.Messaging.V1.DomainConfigMessagingServiceContext #{context}>"
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# Provide a detailed, user friendly representation
|
104
|
+
def inspect
|
105
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
106
|
+
"#<Twilio.Messaging.V1.DomainConfigMessagingServiceContext #{context}>"
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
112
|
+
class DomainConfigMessagingServiceInstance < InstanceResource
|
113
|
+
##
|
114
|
+
# Initialize the DomainConfigMessagingServiceInstance
|
115
|
+
# @param [Version] version Version that contains the resource
|
116
|
+
# @param [Hash] payload payload that contains response from Twilio
|
117
|
+
# @param [String] messaging_service_sid Unique string used to identify the
|
118
|
+
# Messaging service that this domain should be associated with.
|
119
|
+
# @return [DomainConfigMessagingServiceInstance] DomainConfigMessagingServiceInstance
|
120
|
+
def initialize(version, payload, messaging_service_sid: nil)
|
121
|
+
super(version)
|
122
|
+
|
123
|
+
# Marshaled Properties
|
124
|
+
@properties = {
|
125
|
+
'domain_sid' => payload['domain_sid'],
|
126
|
+
'config_sid' => payload['config_sid'],
|
127
|
+
'messaging_service_sid' => payload['messaging_service_sid'],
|
128
|
+
'fallback_url' => payload['fallback_url'],
|
129
|
+
'callback_url' => payload['callback_url'],
|
130
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
131
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
132
|
+
'url' => payload['url'],
|
133
|
+
}
|
134
|
+
|
135
|
+
# Context
|
136
|
+
@instance_context = nil
|
137
|
+
@params = {'messaging_service_sid' => messaging_service_sid || @properties['messaging_service_sid'], }
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# Generate an instance context for the instance, the context is capable of
|
142
|
+
# performing various actions. All instance actions are proxied to the context
|
143
|
+
# @return [DomainConfigMessagingServiceContext] DomainConfigMessagingServiceContext for this DomainConfigMessagingServiceInstance
|
144
|
+
def context
|
145
|
+
unless @instance_context
|
146
|
+
@instance_context = DomainConfigMessagingServiceContext.new(
|
147
|
+
@version,
|
148
|
+
@params['messaging_service_sid'],
|
149
|
+
)
|
150
|
+
end
|
151
|
+
@instance_context
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [String] The unique string that we created to identify the Domain resource.
|
156
|
+
def domain_sid
|
157
|
+
@properties['domain_sid']
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# @return [String] The unique string that we created to identify the Domain config (prefix ZK).
|
162
|
+
def config_sid
|
163
|
+
@properties['config_sid']
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# @return [String] The unique string that identifies the messaging service
|
168
|
+
def messaging_service_sid
|
169
|
+
@properties['messaging_service_sid']
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# @return [String] We will redirect requests to urls we are unable to identify to this url.
|
174
|
+
def fallback_url
|
175
|
+
@properties['fallback_url']
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# @return [String] URL to receive click events to your webhook whenever the recipients click on the shortened links.
|
180
|
+
def callback_url
|
181
|
+
@properties['callback_url']
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# @return [Time] Date this Domain Config was created.
|
186
|
+
def date_created
|
187
|
+
@properties['date_created']
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# @return [Time] Date that this Domain Config was last updated.
|
192
|
+
def date_updated
|
193
|
+
@properties['date_updated']
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [String] The url
|
198
|
+
def url
|
199
|
+
@properties['url']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Fetch the DomainConfigMessagingServiceInstance
|
204
|
+
# @return [DomainConfigMessagingServiceInstance] Fetched DomainConfigMessagingServiceInstance
|
205
|
+
def fetch
|
206
|
+
context.fetch
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# Provide a user friendly representation
|
211
|
+
def to_s
|
212
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
213
|
+
"<Twilio.Messaging.V1.DomainConfigMessagingServiceInstance #{values}>"
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# Provide a detailed, user friendly representation
|
218
|
+
def inspect
|
219
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
220
|
+
"<Twilio.Messaging.V1.DomainConfigMessagingServiceInstance #{values}>"
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
@@ -0,0 +1,218 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Messaging < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class LinkshorteningMessagingServiceList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the LinkshorteningMessagingServiceList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [LinkshorteningMessagingServiceList] LinkshorteningMessagingServiceList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Provide a user friendly representation
|
29
|
+
def to_s
|
30
|
+
'#<Twilio.Messaging.V1.LinkshorteningMessagingServiceList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
36
|
+
class LinkshorteningMessagingServicePage < Page
|
37
|
+
##
|
38
|
+
# Initialize the LinkshorteningMessagingServicePage
|
39
|
+
# @param [Version] version Version that contains the resource
|
40
|
+
# @param [Response] response Response from the API
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
42
|
+
# @return [LinkshorteningMessagingServicePage] LinkshorteningMessagingServicePage
|
43
|
+
def initialize(version, response, solution)
|
44
|
+
super(version, response)
|
45
|
+
|
46
|
+
# Path Solution
|
47
|
+
@solution = solution
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Build an instance of LinkshorteningMessagingServiceInstance
|
52
|
+
# @param [Hash] payload Payload response from the API
|
53
|
+
# @return [LinkshorteningMessagingServiceInstance] LinkshorteningMessagingServiceInstance
|
54
|
+
def get_instance(payload)
|
55
|
+
LinkshorteningMessagingServiceInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Provide a user friendly representation
|
60
|
+
def to_s
|
61
|
+
'<Twilio.Messaging.V1.LinkshorteningMessagingServicePage>'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
67
|
+
class LinkshorteningMessagingServiceContext < InstanceContext
|
68
|
+
##
|
69
|
+
# Initialize the LinkshorteningMessagingServiceContext
|
70
|
+
# @param [Version] version Version that contains the resource
|
71
|
+
# @param [String] domain_sid The domain SID to dissociate from a messaging
|
72
|
+
# service. With URL shortening enabled, links in messages sent with the associated
|
73
|
+
# messaging service will be shortened to the provided domain
|
74
|
+
# @param [String] messaging_service_sid A messaging service SID to dissociate from
|
75
|
+
# a domain. With URL shortening enabled, links in messages sent with the provided
|
76
|
+
# messaging service will be shortened to the associated domain
|
77
|
+
# @return [LinkshorteningMessagingServiceContext] LinkshorteningMessagingServiceContext
|
78
|
+
def initialize(version, domain_sid, messaging_service_sid)
|
79
|
+
super(version)
|
80
|
+
|
81
|
+
# Path Solution
|
82
|
+
@solution = {domain_sid: domain_sid, messaging_service_sid: messaging_service_sid, }
|
83
|
+
@uri = "/LinkShortening/Domains/#{@solution[:domain_sid]}/MessagingServices/#{@solution[:messaging_service_sid]}"
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Create the LinkshorteningMessagingServiceInstance
|
88
|
+
# @return [LinkshorteningMessagingServiceInstance] Created LinkshorteningMessagingServiceInstance
|
89
|
+
def create
|
90
|
+
payload = @version.create('POST', @uri)
|
91
|
+
|
92
|
+
LinkshorteningMessagingServiceInstance.new(
|
93
|
+
@version,
|
94
|
+
payload,
|
95
|
+
domain_sid: @solution[:domain_sid],
|
96
|
+
messaging_service_sid: @solution[:messaging_service_sid],
|
97
|
+
)
|
98
|
+
end
|
99
|
+
|
100
|
+
##
|
101
|
+
# Delete the LinkshorteningMessagingServiceInstance
|
102
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
103
|
+
def delete
|
104
|
+
@version.delete('DELETE', @uri)
|
105
|
+
end
|
106
|
+
|
107
|
+
##
|
108
|
+
# Provide a user friendly representation
|
109
|
+
def to_s
|
110
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
111
|
+
"#<Twilio.Messaging.V1.LinkshorteningMessagingServiceContext #{context}>"
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Provide a detailed, user friendly representation
|
116
|
+
def inspect
|
117
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
118
|
+
"#<Twilio.Messaging.V1.LinkshorteningMessagingServiceContext #{context}>"
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
##
|
123
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
124
|
+
class LinkshorteningMessagingServiceInstance < InstanceResource
|
125
|
+
##
|
126
|
+
# Initialize the LinkshorteningMessagingServiceInstance
|
127
|
+
# @param [Version] version Version that contains the resource
|
128
|
+
# @param [Hash] payload payload that contains response from Twilio
|
129
|
+
# @param [String] domain_sid The domain SID to dissociate from a messaging
|
130
|
+
# service. With URL shortening enabled, links in messages sent with the associated
|
131
|
+
# messaging service will be shortened to the provided domain
|
132
|
+
# @param [String] messaging_service_sid A messaging service SID to dissociate from
|
133
|
+
# a domain. With URL shortening enabled, links in messages sent with the provided
|
134
|
+
# messaging service will be shortened to the associated domain
|
135
|
+
# @return [LinkshorteningMessagingServiceInstance] LinkshorteningMessagingServiceInstance
|
136
|
+
def initialize(version, payload, domain_sid: nil, messaging_service_sid: nil)
|
137
|
+
super(version)
|
138
|
+
|
139
|
+
# Marshaled Properties
|
140
|
+
@properties = {
|
141
|
+
'domain_sid' => payload['domain_sid'],
|
142
|
+
'messaging_service_sid' => payload['messaging_service_sid'],
|
143
|
+
'url' => payload['url'],
|
144
|
+
}
|
145
|
+
|
146
|
+
# Context
|
147
|
+
@instance_context = nil
|
148
|
+
@params = {
|
149
|
+
'domain_sid' => domain_sid || @properties['domain_sid'],
|
150
|
+
'messaging_service_sid' => messaging_service_sid || @properties['messaging_service_sid'],
|
151
|
+
}
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Generate an instance context for the instance, the context is capable of
|
156
|
+
# performing various actions. All instance actions are proxied to the context
|
157
|
+
# @return [LinkshorteningMessagingServiceContext] LinkshorteningMessagingServiceContext for this LinkshorteningMessagingServiceInstance
|
158
|
+
def context
|
159
|
+
unless @instance_context
|
160
|
+
@instance_context = LinkshorteningMessagingServiceContext.new(
|
161
|
+
@version,
|
162
|
+
@params['domain_sid'],
|
163
|
+
@params['messaging_service_sid'],
|
164
|
+
)
|
165
|
+
end
|
166
|
+
@instance_context
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# @return [String] The unique string that identifies the domain resource
|
171
|
+
def domain_sid
|
172
|
+
@properties['domain_sid']
|
173
|
+
end
|
174
|
+
|
175
|
+
##
|
176
|
+
# @return [String] The unique string that identifies the messaging service
|
177
|
+
def messaging_service_sid
|
178
|
+
@properties['messaging_service_sid']
|
179
|
+
end
|
180
|
+
|
181
|
+
##
|
182
|
+
# @return [String] The url
|
183
|
+
def url
|
184
|
+
@properties['url']
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Create the LinkshorteningMessagingServiceInstance
|
189
|
+
# @return [LinkshorteningMessagingServiceInstance] Created LinkshorteningMessagingServiceInstance
|
190
|
+
def create
|
191
|
+
context.create
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Delete the LinkshorteningMessagingServiceInstance
|
196
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
197
|
+
def delete
|
198
|
+
context.delete
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# Provide a user friendly representation
|
203
|
+
def to_s
|
204
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
205
|
+
"<Twilio.Messaging.V1.LinkshorteningMessagingServiceInstance #{values}>"
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# Provide a detailed, user friendly representation
|
210
|
+
def inspect
|
211
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
212
|
+
"<Twilio.Messaging.V1.LinkshorteningMessagingServiceInstance #{values}>"
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
@@ -19,7 +19,9 @@ module Twilio
|
|
19
19
|
@deactivations = nil
|
20
20
|
@domain_certs = nil
|
21
21
|
@domain_config = nil
|
22
|
+
@domain_config_messaging_service = nil
|
22
23
|
@external_campaign = nil
|
24
|
+
@linkshortening_messaging_service = nil
|
23
25
|
@services = nil
|
24
26
|
@tollfree_verifications = nil
|
25
27
|
@usecases = nil
|
@@ -78,12 +80,51 @@ module Twilio
|
|
78
80
|
end
|
79
81
|
end
|
80
82
|
|
83
|
+
##
|
84
|
+
# @param [String] messaging_service_sid Unique string used to identify the
|
85
|
+
# Messaging service that this domain should be associated with.
|
86
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigMessagingServiceContext] if messaging_service_sid was passed.
|
87
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigMessagingServiceList]
|
88
|
+
def domain_config_messaging_service(messaging_service_sid=:unset)
|
89
|
+
if messaging_service_sid.nil?
|
90
|
+
raise ArgumentError, 'messaging_service_sid cannot be nil'
|
91
|
+
end
|
92
|
+
if messaging_service_sid == :unset
|
93
|
+
@domain_config_messaging_service ||= DomainConfigMessagingServiceList.new self
|
94
|
+
else
|
95
|
+
DomainConfigMessagingServiceContext.new(self, messaging_service_sid)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
81
99
|
##
|
82
100
|
# @return [Twilio::REST::Messaging::V1::ExternalCampaignContext]
|
83
101
|
def external_campaign
|
84
102
|
@external_campaign ||= ExternalCampaignList.new self
|
85
103
|
end
|
86
104
|
|
105
|
+
##
|
106
|
+
# @param [String] domain_sid The domain SID to dissociate from a messaging
|
107
|
+
# service. With URL shortening enabled, links in messages sent with the associated
|
108
|
+
# messaging service will be shortened to the provided domain
|
109
|
+
# @param [String] messaging_service_sid A messaging service SID to dissociate from
|
110
|
+
# a domain. With URL shortening enabled, links in messages sent with the provided
|
111
|
+
# messaging service will be shortened to the associated domain
|
112
|
+
# @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceContext] if messaging_service_sid was passed.
|
113
|
+
# @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceList]
|
114
|
+
def linkshortening_messaging_service(domain_sid=:unset, messaging_service_sid=:unset)
|
115
|
+
if domain_sid.nil?
|
116
|
+
raise ArgumentError, 'domain_sid cannot be nil'
|
117
|
+
end
|
118
|
+
if messaging_service_sid.nil?
|
119
|
+
raise ArgumentError, 'messaging_service_sid cannot be nil'
|
120
|
+
end
|
121
|
+
if domain_sid == :unset && messaging_service_sid == :unset
|
122
|
+
@linkshortening_messaging_service ||= LinkshorteningMessagingServiceList.new self
|
123
|
+
else
|
124
|
+
LinkshorteningMessagingServiceContext.new(self, domain_sid, messaging_service_sid)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
87
128
|
##
|
88
129
|
# @param [String] sid The SID of the Service resource to fetch.
|
89
130
|
# @return [Twilio::REST::Messaging::V1::ServiceContext] if sid was passed.
|
@@ -60,12 +60,30 @@ module Twilio
|
|
60
60
|
self.v1.domain_config(domain_sid)
|
61
61
|
end
|
62
62
|
|
63
|
+
##
|
64
|
+
# @param [String] messaging_service_sid The unique string that identifies the
|
65
|
+
# messaging service
|
66
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigMessagingServiceInstance] if messaging_service_sid was passed.
|
67
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigMessagingServiceList]
|
68
|
+
def domain_config_messaging_service(messaging_service_sid=:unset)
|
69
|
+
self.v1.domain_config_messaging_service(messaging_service_sid)
|
70
|
+
end
|
71
|
+
|
63
72
|
##
|
64
73
|
# @return [Twilio::REST::Messaging::V1::ExternalCampaignInstance]
|
65
74
|
def external_campaign
|
66
75
|
self.v1.external_campaign()
|
67
76
|
end
|
68
77
|
|
78
|
+
##
|
79
|
+
# @param [String] messaging_service_sid The unique string that identifies the
|
80
|
+
# messaging service
|
81
|
+
# @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceInstance] if messaging_service_sid was passed.
|
82
|
+
# @return [Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceList]
|
83
|
+
def linkshortening_messaging_service(domain_sid=:unset, messaging_service_sid=:unset)
|
84
|
+
self.v1.linkshortening_messaging_service(domain_sid, messaging_service_sid)
|
85
|
+
end
|
86
|
+
|
69
87
|
##
|
70
88
|
# @param [String] sid The unique string that we created to identify the Service
|
71
89
|
# resource.
|
@@ -74,8 +74,9 @@ module Twilio
|
|
74
74
|
# @param [String] template_custom_substitutions A stringified JSON object in which
|
75
75
|
# the keys are the template's special variables and the values are the variables
|
76
76
|
# substitutions.
|
77
|
-
# @param [String] device_ip
|
78
|
-
# has to be a valid IPv4 or IPv6
|
77
|
+
# @param [String] device_ip Strongly encouraged if using the auto channel. The IP
|
78
|
+
# address of the client's device. If provided, it has to be a valid IPv4 or IPv6
|
79
|
+
# address.
|
79
80
|
# @return [VerificationInstance] Created VerificationInstance
|
80
81
|
def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset, device_ip: :unset)
|
81
82
|
data = Twilio::Values.of({
|
data/lib/twilio-ruby/version.rb
CHANGED
data/twilio-ruby.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.extra_rdoc_files = ['README.md', 'LICENSE']
|
25
25
|
spec.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'twilio-ruby', '--main', 'README.md']
|
26
26
|
|
27
|
-
spec.add_dependency('jwt', '>= 1.5', '
|
27
|
+
spec.add_dependency('jwt', '>= 1.5', '< 3.0')
|
28
28
|
spec.add_dependency('nokogiri', '>= 1.6', '< 2.0')
|
29
29
|
spec.add_dependency('faraday', '>= 0.9', '< 3.0')
|
30
30
|
# Workaround for RBX <= 2.2.1, should be fixed in next version
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.75.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -17,9 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
|
-
- - "
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '3.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +27,9 @@ dependencies:
|
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '1.5'
|
30
|
-
- - "
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '3.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: nokogiri
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -385,6 +385,7 @@ files:
|
|
385
385
|
- lib/twilio-ruby/rest/content/v1.rb
|
386
386
|
- lib/twilio-ruby/rest/content/v1/content.rb
|
387
387
|
- lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb
|
388
|
+
- lib/twilio-ruby/rest/content/v1/content_and_approvals.rb
|
388
389
|
- lib/twilio-ruby/rest/content/v1/legacy_content.rb
|
389
390
|
- lib/twilio-ruby/rest/conversations.rb
|
390
391
|
- lib/twilio-ruby/rest/conversations/v1.rb
|
@@ -432,6 +433,7 @@ files:
|
|
432
433
|
- lib/twilio-ruby/rest/flex_api/v1/configuration.rb
|
433
434
|
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
|
434
435
|
- lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb
|
436
|
+
- lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb
|
435
437
|
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb
|
436
438
|
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb
|
437
439
|
- lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb
|
@@ -505,7 +507,9 @@ files:
|
|
505
507
|
- lib/twilio-ruby/rest/messaging/v1/deactivation.rb
|
506
508
|
- lib/twilio-ruby/rest/messaging/v1/domain_cert.rb
|
507
509
|
- lib/twilio-ruby/rest/messaging/v1/domain_config.rb
|
510
|
+
- lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb
|
508
511
|
- lib/twilio-ruby/rest/messaging/v1/external_campaign.rb
|
512
|
+
- lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb
|
509
513
|
- lib/twilio-ruby/rest/messaging/v1/service.rb
|
510
514
|
- lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
|
511
515
|
- lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb
|