twilio-ruby 5.58.1 → 5.60.0
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/.travis.yml +1 -0
- data/CHANGES.md +83 -0
- data/README.md +3 -3
- data/lib/twilio-ruby/http/http_client.rb +1 -1
- data/lib/twilio-ruby/jwt/access_token.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +35 -35
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +384 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +390 -0
- data/lib/twilio-ruby/rest/media/v1.rb +60 -0
- data/lib/twilio-ruby/rest/media.rb +56 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +272 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +79 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +9 -2
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +29 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +59 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +30 -20
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +6 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +11 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -5
- data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +7 -0
- data/lib/twilio-ruby/rest/verify.rb +6 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +12 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +13 -3
@@ -0,0 +1,272 @@
|
|
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
|
+
class BrandRegistrationContext < InstanceContext
|
14
|
+
##
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
16
|
+
class BrandVettingList < ListResource
|
17
|
+
##
|
18
|
+
# Initialize the BrandVettingList
|
19
|
+
# @param [Version] version Version that contains the resource
|
20
|
+
# @param [String] brand_sid The unique string to identify Brand Registration.
|
21
|
+
# @return [BrandVettingList] BrandVettingList
|
22
|
+
def initialize(version, brand_sid: nil)
|
23
|
+
super(version)
|
24
|
+
|
25
|
+
# Path Solution
|
26
|
+
@solution = {brand_sid: brand_sid}
|
27
|
+
@uri = "/a2p/BrandRegistrations/#{@solution[:brand_sid]}/Vettings"
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Create the BrandVettingInstance
|
32
|
+
# @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
|
33
|
+
# of the vettings to create .
|
34
|
+
# @param [String] vetting_id The unique ID of the vetting
|
35
|
+
# @return [BrandVettingInstance] Created BrandVettingInstance
|
36
|
+
def create(vetting_provider: nil, vetting_id: :unset)
|
37
|
+
data = Twilio::Values.of({'VettingProvider' => vetting_provider, 'VettingId' => vetting_id, })
|
38
|
+
|
39
|
+
payload = @version.create('POST', @uri, data: data)
|
40
|
+
|
41
|
+
BrandVettingInstance.new(@version, payload, brand_sid: @solution[:brand_sid], )
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# Lists BrandVettingInstance records from the API as a list.
|
46
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
47
|
+
# memory before returning.
|
48
|
+
# @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
|
49
|
+
# of the vettings to read
|
50
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
51
|
+
# guarantees to never return more than limit. Default is no limit
|
52
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
53
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
54
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
55
|
+
# efficient page size, i.e. min(limit, 1000)
|
56
|
+
# @return [Array] Array of up to limit results
|
57
|
+
def list(vetting_provider: :unset, limit: nil, page_size: nil)
|
58
|
+
self.stream(vetting_provider: vetting_provider, limit: limit, page_size: page_size).entries
|
59
|
+
end
|
60
|
+
|
61
|
+
##
|
62
|
+
# Streams BrandVettingInstance records from the API as an Enumerable.
|
63
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
64
|
+
# is reached.
|
65
|
+
# @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
|
66
|
+
# of the vettings to read
|
67
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
68
|
+
# guarantees to never return more than limit. Default is no limit.
|
69
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
70
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
71
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
72
|
+
# efficient page size, i.e. min(limit, 1000)
|
73
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
74
|
+
def stream(vetting_provider: :unset, limit: nil, page_size: nil)
|
75
|
+
limits = @version.read_limits(limit, page_size)
|
76
|
+
|
77
|
+
page = self.page(vetting_provider: vetting_provider, page_size: limits[:page_size], )
|
78
|
+
|
79
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# When passed a block, yields BrandVettingInstance records from the API.
|
84
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
85
|
+
# is reached.
|
86
|
+
def each
|
87
|
+
limits = @version.read_limits
|
88
|
+
|
89
|
+
page = self.page(page_size: limits[:page_size], )
|
90
|
+
|
91
|
+
@version.stream(page,
|
92
|
+
limit: limits[:limit],
|
93
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Retrieve a single page of BrandVettingInstance records from the API.
|
98
|
+
# Request is executed immediately.
|
99
|
+
# @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
|
100
|
+
# of the vettings to read
|
101
|
+
# @param [String] page_token PageToken provided by the API
|
102
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
103
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
104
|
+
# @return [Page] Page of BrandVettingInstance
|
105
|
+
def page(vetting_provider: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
106
|
+
params = Twilio::Values.of({
|
107
|
+
'VettingProvider' => vetting_provider,
|
108
|
+
'PageToken' => page_token,
|
109
|
+
'Page' => page_number,
|
110
|
+
'PageSize' => page_size,
|
111
|
+
})
|
112
|
+
|
113
|
+
response = @version.page('GET', @uri, params: params)
|
114
|
+
|
115
|
+
BrandVettingPage.new(@version, response, @solution)
|
116
|
+
end
|
117
|
+
|
118
|
+
##
|
119
|
+
# Retrieve a single page of BrandVettingInstance records from the API.
|
120
|
+
# Request is executed immediately.
|
121
|
+
# @param [String] target_url API-generated URL for the requested results page
|
122
|
+
# @return [Page] Page of BrandVettingInstance
|
123
|
+
def get_page(target_url)
|
124
|
+
response = @version.domain.request(
|
125
|
+
'GET',
|
126
|
+
target_url
|
127
|
+
)
|
128
|
+
BrandVettingPage.new(@version, response, @solution)
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Provide a user friendly representation
|
133
|
+
def to_s
|
134
|
+
'#<Twilio.Messaging.V1.BrandVettingList>'
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
140
|
+
class BrandVettingPage < Page
|
141
|
+
##
|
142
|
+
# Initialize the BrandVettingPage
|
143
|
+
# @param [Version] version Version that contains the resource
|
144
|
+
# @param [Response] response Response from the API
|
145
|
+
# @param [Hash] solution Path solution for the resource
|
146
|
+
# @return [BrandVettingPage] BrandVettingPage
|
147
|
+
def initialize(version, response, solution)
|
148
|
+
super(version, response)
|
149
|
+
|
150
|
+
# Path Solution
|
151
|
+
@solution = solution
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Build an instance of BrandVettingInstance
|
156
|
+
# @param [Hash] payload Payload response from the API
|
157
|
+
# @return [BrandVettingInstance] BrandVettingInstance
|
158
|
+
def get_instance(payload)
|
159
|
+
BrandVettingInstance.new(@version, payload, brand_sid: @solution[:brand_sid], )
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# Provide a user friendly representation
|
164
|
+
def to_s
|
165
|
+
'<Twilio.Messaging.V1.BrandVettingPage>'
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
171
|
+
class BrandVettingInstance < InstanceResource
|
172
|
+
##
|
173
|
+
# Initialize the BrandVettingInstance
|
174
|
+
# @param [Version] version Version that contains the resource
|
175
|
+
# @param [Hash] payload payload that contains response from Twilio
|
176
|
+
# @param [String] brand_sid The unique string to identify Brand Registration.
|
177
|
+
# @return [BrandVettingInstance] BrandVettingInstance
|
178
|
+
def initialize(version, payload, brand_sid: nil)
|
179
|
+
super(version)
|
180
|
+
|
181
|
+
# Marshaled Properties
|
182
|
+
@properties = {
|
183
|
+
'account_sid' => payload['account_sid'],
|
184
|
+
'brand_sid' => payload['brand_sid'],
|
185
|
+
'brand_vetting_sid' => payload['brand_vetting_sid'],
|
186
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
187
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
188
|
+
'vetting_id' => payload['vetting_id'],
|
189
|
+
'vetting_class' => payload['vetting_class'],
|
190
|
+
'vetting_status' => payload['vetting_status'],
|
191
|
+
'vetting_provider' => payload['vetting_provider'],
|
192
|
+
'url' => payload['url'],
|
193
|
+
}
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [String] The SID of the Account that created the vetting
|
198
|
+
def account_sid
|
199
|
+
@properties['account_sid']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# @return [String] A2P BrandRegistration Sid
|
204
|
+
def brand_sid
|
205
|
+
@properties['brand_sid']
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# @return [String] SID for third-party vetting record
|
210
|
+
def brand_vetting_sid
|
211
|
+
@properties['brand_vetting_sid']
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
216
|
+
def date_updated
|
217
|
+
@properties['date_updated']
|
218
|
+
end
|
219
|
+
|
220
|
+
##
|
221
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
222
|
+
def date_created
|
223
|
+
@properties['date_created']
|
224
|
+
end
|
225
|
+
|
226
|
+
##
|
227
|
+
# @return [String] The unique ID of the vetting
|
228
|
+
def vetting_id
|
229
|
+
@properties['vetting_id']
|
230
|
+
end
|
231
|
+
|
232
|
+
##
|
233
|
+
# @return [String] The type of vetting
|
234
|
+
def vetting_class
|
235
|
+
@properties['vetting_class']
|
236
|
+
end
|
237
|
+
|
238
|
+
##
|
239
|
+
# @return [String] Status of vetting attempt
|
240
|
+
def vetting_status
|
241
|
+
@properties['vetting_status']
|
242
|
+
end
|
243
|
+
|
244
|
+
##
|
245
|
+
# @return [brand_vetting.VettingProvider] Third-party provider that has conducted the vetting
|
246
|
+
def vetting_provider
|
247
|
+
@properties['vetting_provider']
|
248
|
+
end
|
249
|
+
|
250
|
+
##
|
251
|
+
# @return [String] The absolute URL of the Brand Vetting
|
252
|
+
def url
|
253
|
+
@properties['url']
|
254
|
+
end
|
255
|
+
|
256
|
+
##
|
257
|
+
# Provide a user friendly representation
|
258
|
+
def to_s
|
259
|
+
"<Twilio.Messaging.V1.BrandVettingInstance>"
|
260
|
+
end
|
261
|
+
|
262
|
+
##
|
263
|
+
# Provide a detailed, user friendly representation
|
264
|
+
def inspect
|
265
|
+
"<Twilio.Messaging.V1.BrandVettingInstance>"
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
end
|
@@ -112,12 +112,19 @@ module Twilio
|
|
112
112
|
# @param [String] brand_type Type of brand being created. One of: "STANDARD",
|
113
113
|
# "STARTER". STARTER is for low volume, starter use cases. STANDARD is for all
|
114
114
|
# other use cases.
|
115
|
+
# @param [Boolean] mock A boolean that specifies whether brand should be a mock or
|
116
|
+
# not. If true, brand will be registered as a mock brand. Defaults to false if no
|
117
|
+
# value is provided.
|
118
|
+
# @param [Boolean] skip_automatic_sec_vet A flag to disable automatic secondary
|
119
|
+
# vetting for brands which it would otherwise be done.
|
115
120
|
# @return [BrandRegistrationInstance] Created BrandRegistrationInstance
|
116
|
-
def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset)
|
121
|
+
def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset, mock: :unset, skip_automatic_sec_vet: :unset)
|
117
122
|
data = Twilio::Values.of({
|
118
123
|
'CustomerProfileBundleSid' => customer_profile_bundle_sid,
|
119
124
|
'A2PProfileBundleSid' => a2p_profile_bundle_sid,
|
120
125
|
'BrandType' => brand_type,
|
126
|
+
'Mock' => mock,
|
127
|
+
'SkipAutomaticSecVet' => skip_automatic_sec_vet,
|
121
128
|
})
|
122
129
|
|
123
130
|
payload = @version.create('POST', @uri, data: data)
|
@@ -177,6 +184,9 @@ module Twilio
|
|
177
184
|
# Path Solution
|
178
185
|
@solution = {sid: sid, }
|
179
186
|
@uri = "/a2p/BrandRegistrations/#{@solution[:sid]}"
|
187
|
+
|
188
|
+
# Dependents
|
189
|
+
@brand_vettings = nil
|
180
190
|
end
|
181
191
|
|
182
192
|
##
|
@@ -188,6 +198,18 @@ module Twilio
|
|
188
198
|
BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
|
189
199
|
end
|
190
200
|
|
201
|
+
##
|
202
|
+
# Access the brand_vettings
|
203
|
+
# @return [BrandVettingList]
|
204
|
+
# @return [BrandVettingContext]
|
205
|
+
def brand_vettings
|
206
|
+
unless @brand_vettings
|
207
|
+
@brand_vettings = BrandVettingList.new(@version, brand_sid: @solution[:sid], )
|
208
|
+
end
|
209
|
+
|
210
|
+
@brand_vettings
|
211
|
+
end
|
212
|
+
|
191
213
|
##
|
192
214
|
# Provide a user friendly representation
|
193
215
|
def to_s
|
@@ -229,6 +251,13 @@ module Twilio
|
|
229
251
|
'failure_reason' => payload['failure_reason'],
|
230
252
|
'url' => payload['url'],
|
231
253
|
'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
|
254
|
+
'brand_feedback' => payload['brand_feedback'],
|
255
|
+
'identity_status' => payload['identity_status'],
|
256
|
+
'russell_3000' => payload['russell_3000'],
|
257
|
+
'tax_exempt_status' => payload['tax_exempt_status'],
|
258
|
+
'skip_automatic_sec_vet' => payload['skip_automatic_sec_vet'],
|
259
|
+
'mock' => payload['mock'],
|
260
|
+
'links' => payload['links'],
|
232
261
|
}
|
233
262
|
|
234
263
|
# Context
|
@@ -319,6 +348,48 @@ module Twilio
|
|
319
348
|
@properties['brand_score']
|
320
349
|
end
|
321
350
|
|
351
|
+
##
|
352
|
+
# @return [Array[brand_registration.BrandFeedback]] Brand feedback
|
353
|
+
def brand_feedback
|
354
|
+
@properties['brand_feedback']
|
355
|
+
end
|
356
|
+
|
357
|
+
##
|
358
|
+
# @return [brand_registration.IdentityStatus] Identity Status
|
359
|
+
def identity_status
|
360
|
+
@properties['identity_status']
|
361
|
+
end
|
362
|
+
|
363
|
+
##
|
364
|
+
# @return [Boolean] Russell 3000
|
365
|
+
def russell_3000
|
366
|
+
@properties['russell_3000']
|
367
|
+
end
|
368
|
+
|
369
|
+
##
|
370
|
+
# @return [String] Tax Exempt Status
|
371
|
+
def tax_exempt_status
|
372
|
+
@properties['tax_exempt_status']
|
373
|
+
end
|
374
|
+
|
375
|
+
##
|
376
|
+
# @return [Boolean] Skip Automatic Secondary Vetting
|
377
|
+
def skip_automatic_sec_vet
|
378
|
+
@properties['skip_automatic_sec_vet']
|
379
|
+
end
|
380
|
+
|
381
|
+
##
|
382
|
+
# @return [Boolean] A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
|
383
|
+
def mock
|
384
|
+
@properties['mock']
|
385
|
+
end
|
386
|
+
|
387
|
+
##
|
388
|
+
# @return [String] The links
|
389
|
+
def links
|
390
|
+
@properties['links']
|
391
|
+
end
|
392
|
+
|
322
393
|
##
|
323
394
|
# Fetch the BrandRegistrationInstance
|
324
395
|
# @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
|
@@ -326,6 +397,13 @@ module Twilio
|
|
326
397
|
context.fetch
|
327
398
|
end
|
328
399
|
|
400
|
+
##
|
401
|
+
# Access the brand_vettings
|
402
|
+
# @return [brand_vettings] brand_vettings
|
403
|
+
def brand_vettings
|
404
|
+
context.brand_vettings
|
405
|
+
end
|
406
|
+
|
329
407
|
##
|
330
408
|
# Provide a user friendly representation
|
331
409
|
def to_s
|
@@ -33,8 +33,8 @@ module Twilio
|
|
33
33
|
# Create the UsAppToPersonInstance
|
34
34
|
# @param [String] brand_registration_sid A2P Brand Registration SID
|
35
35
|
# @param [String] description A short description of what this SMS campaign does.
|
36
|
-
# @param [Array[String]] message_samples Message samples, up to 5
|
37
|
-
# <=1024 chars each.
|
36
|
+
# @param [Array[String]] message_samples Message samples, at least 2 and up to 5
|
37
|
+
# sample messages, <=1024 chars each.
|
38
38
|
# @param [String] us_app_to_person_usecase A2P Campaign Use Case. Examples: [ 2FA,
|
39
39
|
# EMERGENCY, MARKETING..]
|
40
40
|
# @param [Boolean] has_embedded_links Indicates that this SMS campaign will send
|
@@ -273,6 +273,7 @@ module Twilio
|
|
273
273
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
274
274
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
275
275
|
'url' => payload['url'],
|
276
|
+
'mock' => payload['mock'],
|
276
277
|
}
|
277
278
|
|
278
279
|
# Context
|
@@ -391,6 +392,12 @@ module Twilio
|
|
391
392
|
@properties['url']
|
392
393
|
end
|
393
394
|
|
395
|
+
##
|
396
|
+
# @return [Boolean] A boolean that specifies whether campaign is a mock or not.
|
397
|
+
def mock
|
398
|
+
@properties['mock']
|
399
|
+
end
|
400
|
+
|
394
401
|
##
|
395
402
|
# Delete the UsAppToPersonInstance
|
396
403
|
# @return [Boolean] true if delete succeeds, false otherwise
|
@@ -67,6 +67,9 @@ module Twilio
|
|
67
67
|
# @param [String] validity_period How long, in seconds, messages sent from the
|
68
68
|
# Service are valid. Can be an integer from `1` to `14,400`.
|
69
69
|
# @param [Boolean] synchronous_validation Reserved.
|
70
|
+
# @param [String] usecase A string that describes the scenario in which the
|
71
|
+
# Messaging Service will be used. Examples: [notification, marketing,
|
72
|
+
# verification, poll ..].
|
70
73
|
# @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
|
71
74
|
# either the webhook url configured on the phone number will be used or
|
72
75
|
# `inbound_request_url`/`fallback_url` url will be called when a message is
|
@@ -74,7 +77,7 @@ module Twilio
|
|
74
77
|
# defined on the phone number will override the
|
75
78
|
# `inbound_request_url`/`fallback_url` defined for the Messaging Service.
|
76
79
|
# @return [ServiceInstance] Created ServiceInstance
|
77
|
-
def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
|
80
|
+
def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
|
78
81
|
data = Twilio::Values.of({
|
79
82
|
'FriendlyName' => friendly_name,
|
80
83
|
'InboundRequestUrl' => inbound_request_url,
|
@@ -90,6 +93,7 @@ module Twilio
|
|
90
93
|
'AreaCodeGeomatch' => area_code_geomatch,
|
91
94
|
'ValidityPeriod' => validity_period,
|
92
95
|
'SynchronousValidation' => synchronous_validation,
|
96
|
+
'Usecase' => usecase,
|
93
97
|
'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number,
|
94
98
|
})
|
95
99
|
|
@@ -281,6 +285,9 @@ module Twilio
|
|
281
285
|
# @param [String] validity_period How long, in seconds, messages sent from the
|
282
286
|
# Service are valid. Can be an integer from `1` to `14,400`.
|
283
287
|
# @param [Boolean] synchronous_validation Reserved.
|
288
|
+
# @param [String] usecase A string that describes the scenario in which the
|
289
|
+
# Messaging Service will be used. Examples: [notification, marketing,
|
290
|
+
# verification, poll ..]
|
284
291
|
# @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
|
285
292
|
# either the webhook url configured on the phone number will be used or
|
286
293
|
# `inbound_request_url`/`fallback_url` url will be called when a message is
|
@@ -288,7 +295,7 @@ module Twilio
|
|
288
295
|
# defined on the phone number will override the
|
289
296
|
# `inbound_request_url`/`fallback_url` defined for the Messaging Service.
|
290
297
|
# @return [ServiceInstance] Updated ServiceInstance
|
291
|
-
def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
|
298
|
+
def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
|
292
299
|
data = Twilio::Values.of({
|
293
300
|
'FriendlyName' => friendly_name,
|
294
301
|
'InboundRequestUrl' => inbound_request_url,
|
@@ -304,6 +311,7 @@ module Twilio
|
|
304
311
|
'AreaCodeGeomatch' => area_code_geomatch,
|
305
312
|
'ValidityPeriod' => validity_period,
|
306
313
|
'SynchronousValidation' => synchronous_validation,
|
314
|
+
'Usecase' => usecase,
|
307
315
|
'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number,
|
308
316
|
})
|
309
317
|
|
@@ -464,6 +472,8 @@ module Twilio
|
|
464
472
|
'validity_period' => payload['validity_period'].to_i,
|
465
473
|
'url' => payload['url'],
|
466
474
|
'links' => payload['links'],
|
475
|
+
'usecase' => payload['usecase'],
|
476
|
+
'us_app_to_person_registered' => payload['us_app_to_person_registered'],
|
467
477
|
'use_inbound_webhook_on_number' => payload['use_inbound_webhook_on_number'],
|
468
478
|
}
|
469
479
|
|
@@ -603,6 +613,18 @@ module Twilio
|
|
603
613
|
@properties['links']
|
604
614
|
end
|
605
615
|
|
616
|
+
##
|
617
|
+
# @return [String] A string describing the scenario in which the Messaging Service will be used
|
618
|
+
def usecase
|
619
|
+
@properties['usecase']
|
620
|
+
end
|
621
|
+
|
622
|
+
##
|
623
|
+
# @return [Boolean] Whether US A2P campaign is registered for this Service.
|
624
|
+
def us_app_to_person_registered
|
625
|
+
@properties['us_app_to_person_registered']
|
626
|
+
end
|
627
|
+
|
606
628
|
##
|
607
629
|
# @return [Boolean] If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
|
608
630
|
def use_inbound_webhook_on_number
|
@@ -651,6 +673,9 @@ module Twilio
|
|
651
673
|
# @param [String] validity_period How long, in seconds, messages sent from the
|
652
674
|
# Service are valid. Can be an integer from `1` to `14,400`.
|
653
675
|
# @param [Boolean] synchronous_validation Reserved.
|
676
|
+
# @param [String] usecase A string that describes the scenario in which the
|
677
|
+
# Messaging Service will be used. Examples: [notification, marketing,
|
678
|
+
# verification, poll ..]
|
654
679
|
# @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
|
655
680
|
# either the webhook url configured on the phone number will be used or
|
656
681
|
# `inbound_request_url`/`fallback_url` url will be called when a message is
|
@@ -658,7 +683,7 @@ module Twilio
|
|
658
683
|
# defined on the phone number will override the
|
659
684
|
# `inbound_request_url`/`fallback_url` defined for the Messaging Service.
|
660
685
|
# @return [ServiceInstance] Updated ServiceInstance
|
661
|
-
def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
|
686
|
+
def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
|
662
687
|
context.update(
|
663
688
|
friendly_name: friendly_name,
|
664
689
|
inbound_request_url: inbound_request_url,
|
@@ -674,6 +699,7 @@ module Twilio
|
|
674
699
|
area_code_geomatch: area_code_geomatch,
|
675
700
|
validity_period: validity_period,
|
676
701
|
synchronous_validation: synchronous_validation,
|
702
|
+
usecase: usecase,
|
677
703
|
use_inbound_webhook_on_number: use_inbound_webhook_on_number,
|
678
704
|
)
|
679
705
|
end
|