twilio-ruby 5.19.0 → 5.20.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/CHANGES.md +13 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api.rb +16 -13
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +85 -88
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +135 -146
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +21 -17
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +14 -8
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +150 -166
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +147 -160
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +147 -160
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +51 -51
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +246 -251
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +31 -26
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +34 -26
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +109 -112
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +108 -112
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +108 -112
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +21 -11
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +32 -25
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +36 -36
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +70 -66
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +10 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +14 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +12 -12
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +11 -9
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +56 -47
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +59 -47
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +76 -74
- data/lib/twilio-ruby/rest/authy.rb +8 -8
- data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
- data/lib/twilio-ruby/rest/client.rb +16 -13
- data/lib/twilio-ruby/rest/messaging.rb +15 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +23 -0
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +482 -0
- data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +434 -0
- data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +458 -0
- data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +285 -0
- data/lib/twilio-ruby/rest/preview.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -2
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -6
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +37 -21
- data/lib/twilio-ruby/rest/video/v1/recording.rb +12 -3
- data/lib/twilio-ruby/security/request_validator.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/messaging/v1/session/message_spec.rb +238 -0
- data/spec/integration/messaging/v1/session/participant_spec.rb +256 -0
- data/spec/integration/messaging/v1/session_spec.rb +223 -0
- data/spec/integration/messaging/v1/webhook_spec.rb +92 -0
- data/spec/integration/video/v1/composition_hook_spec.rb +1 -1
- data/spec/security/request_validator_spec.rb +5 -7
- metadata +14 -2
@@ -15,9 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the ApplicationList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] account_sid The
|
19
|
-
# [Account](https://www.twilio.com/docs/
|
20
|
-
#
|
18
|
+
# @param [String] account_sid The SID of the
|
19
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
20
|
+
# Application resource.
|
21
21
|
# @return [ApplicationList] ApplicationList
|
22
22
|
def initialize(version, account_sid: nil)
|
23
23
|
super(version)
|
@@ -30,45 +30,38 @@ module Twilio
|
|
30
30
|
##
|
31
31
|
# Retrieve a single page of ApplicationInstance records from the API.
|
32
32
|
# Request is executed immediately.
|
33
|
-
# @param [String] friendly_name A
|
34
|
-
# application
|
35
|
-
# @param [String] api_version
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# @param [String] voice_url The URL
|
39
|
-
#
|
40
|
-
# @param [String] voice_method The HTTP method
|
41
|
-
#
|
42
|
-
# @param [String] voice_fallback_url The URL that
|
43
|
-
# occurs retrieving or executing the TwiML requested by `
|
44
|
-
# @param [String] voice_fallback_method The HTTP method
|
45
|
-
#
|
46
|
-
# @param [String] status_callback The URL
|
47
|
-
#
|
48
|
-
# @param [String] status_callback_method The HTTP method
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
# @param [String]
|
64
|
-
#
|
65
|
-
# you specify this application's `Sid` as the `ApplicationSid` on an [outgoing SMS
|
66
|
-
# request](https://www.twilio.com/docs/sms/send-messages).
|
67
|
-
# @param [String] message_status_callback Twilio will make a `POST` request to
|
68
|
-
# this URL to pass status parameters (such as sent or failed) to your application
|
69
|
-
# if you use the `/Messages` endpoint to send the message and specify this
|
70
|
-
# application's `Sid` as the `ApplicationSid` on an [outgoing SMS
|
71
|
-
# request](https://www.twilio.com/docs/sms/send-messages).
|
33
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
34
|
+
# the new application. It can be up to 64 characters long.
|
35
|
+
# @param [String] api_version The API version to use to start a new TwiML session.
|
36
|
+
# Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default
|
37
|
+
# API version.
|
38
|
+
# @param [String] voice_url The URL we should call when the phone number assigned
|
39
|
+
# to this application receives a call.
|
40
|
+
# @param [String] voice_method The HTTP method we should use to call `voice_url`.
|
41
|
+
# Can be: `GET` or `POST`.
|
42
|
+
# @param [String] voice_fallback_url The URL that we should call when an error
|
43
|
+
# occurs retrieving or executing the TwiML requested by `url`.
|
44
|
+
# @param [String] voice_fallback_method The HTTP method we should use to call
|
45
|
+
# `voice_fallback_url`. Can be: `GET` or `POST`.
|
46
|
+
# @param [String] status_callback The URL we should call using the
|
47
|
+
# `status_callback_method` to send status information to your application.
|
48
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
49
|
+
# `status_callback`. Can be: `GET` or `POST`.
|
50
|
+
# @param [Boolean] voice_caller_id_lookup Whether we should look up the caller's
|
51
|
+
# caller-ID name from the CNAM database (additional charges apply). Can be: `true`
|
52
|
+
# or `false`.
|
53
|
+
# @param [String] sms_url The URL we should call when the phone number receives an
|
54
|
+
# incoming SMS message.
|
55
|
+
# @param [String] sms_method The HTTP method we should use to call `sms_url`. Can
|
56
|
+
# be: `GET` or `POST`.
|
57
|
+
# @param [String] sms_fallback_url The URL that we should call when an error
|
58
|
+
# occurs while retrieving or executing the TwiML from `sms_url`.
|
59
|
+
# @param [String] sms_fallback_method The HTTP method we should use to call
|
60
|
+
# `sms_fallback_url`. Can be: `GET` or `POST`.
|
61
|
+
# @param [String] sms_status_callback The URL we should call using a POST method
|
62
|
+
# to send status information about SMS messages sent by the application.
|
63
|
+
# @param [String] message_status_callback The URL we should call using a POST
|
64
|
+
# method to send message status information to your application.
|
72
65
|
# @return [ApplicationInstance] Newly created ApplicationInstance
|
73
66
|
def create(friendly_name: nil, api_version: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, voice_caller_id_lookup: :unset, sms_url: :unset, sms_method: :unset, sms_fallback_url: :unset, sms_fallback_method: :unset, sms_status_callback: :unset, message_status_callback: :unset)
|
74
67
|
data = Twilio::Values.of({
|
@@ -102,8 +95,8 @@ module Twilio
|
|
102
95
|
# Lists ApplicationInstance records from the API as a list.
|
103
96
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
104
97
|
# memory before returning.
|
105
|
-
# @param [String] friendly_name
|
106
|
-
#
|
98
|
+
# @param [String] friendly_name The string that identifies the Application
|
99
|
+
# resources to read.
|
107
100
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
108
101
|
# guarantees to never return more than limit. Default is no limit
|
109
102
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -119,8 +112,8 @@ module Twilio
|
|
119
112
|
# Streams ApplicationInstance records from the API as an Enumerable.
|
120
113
|
# This operation lazily loads records as efficiently as possible until the limit
|
121
114
|
# is reached.
|
122
|
-
# @param [String] friendly_name
|
123
|
-
#
|
115
|
+
# @param [String] friendly_name The string that identifies the Application
|
116
|
+
# resources to read.
|
124
117
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
125
118
|
# guarantees to never return more than limit. Default is no limit.
|
126
119
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -153,8 +146,8 @@ module Twilio
|
|
153
146
|
##
|
154
147
|
# Retrieve a single page of ApplicationInstance records from the API.
|
155
148
|
# Request is executed immediately.
|
156
|
-
# @param [String] friendly_name
|
157
|
-
#
|
149
|
+
# @param [String] friendly_name The string that identifies the Application
|
150
|
+
# resources to read.
|
158
151
|
# @param [String] page_token PageToken provided by the API
|
159
152
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
160
153
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -227,9 +220,11 @@ module Twilio
|
|
227
220
|
##
|
228
221
|
# Initialize the ApplicationContext
|
229
222
|
# @param [Version] version Version that contains the resource
|
230
|
-
# @param [String] account_sid The
|
231
|
-
#
|
232
|
-
# resource
|
223
|
+
# @param [String] account_sid The SID of the
|
224
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
225
|
+
# Application resource to fetch.
|
226
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
227
|
+
# Application resource to fetch.
|
233
228
|
# @return [ApplicationContext] ApplicationContext
|
234
229
|
def initialize(version, account_sid, sid)
|
235
230
|
super(version)
|
@@ -268,41 +263,38 @@ module Twilio
|
|
268
263
|
|
269
264
|
##
|
270
265
|
# Update the ApplicationInstance
|
271
|
-
# @param [String] friendly_name A
|
272
|
-
#
|
273
|
-
# @param [String] api_version
|
274
|
-
#
|
275
|
-
#
|
276
|
-
#
|
277
|
-
#
|
278
|
-
#
|
279
|
-
#
|
280
|
-
#
|
281
|
-
#
|
282
|
-
#
|
283
|
-
#
|
284
|
-
#
|
285
|
-
#
|
286
|
-
#
|
287
|
-
#
|
288
|
-
#
|
289
|
-
#
|
290
|
-
#
|
291
|
-
# @param [String]
|
292
|
-
#
|
293
|
-
# @param [String]
|
294
|
-
#
|
295
|
-
# @param [String]
|
296
|
-
#
|
297
|
-
# @param [String]
|
298
|
-
#
|
299
|
-
#
|
300
|
-
#
|
301
|
-
# @param [String] message_status_callback
|
302
|
-
#
|
303
|
-
# if you use the `/Messages` endpoint to send the message and specify this
|
304
|
-
# application's `Sid` as the `ApplicationSid` on an [outgoing SMS
|
305
|
-
# request](https://www.twilio.com/docs/sms/send-messages).
|
266
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
267
|
+
# the resource. It can be up to 64 characters long.
|
268
|
+
# @param [String] api_version The API version to use to start a new TwiML session.
|
269
|
+
# Can be: `2010-04-01` or `2008-08-01`. The default value is your account's
|
270
|
+
# default API version.
|
271
|
+
# @param [String] voice_url The URL we should call when the phone number assigned
|
272
|
+
# to this application receives a call.
|
273
|
+
# @param [String] voice_method The HTTP method we should use to call `voice_url`.
|
274
|
+
# Can be: `GET` or `POST`.
|
275
|
+
# @param [String] voice_fallback_url The URL that we should call when an error
|
276
|
+
# occurs retrieving or executing the TwiML requested by `url`.
|
277
|
+
# @param [String] voice_fallback_method The HTTP method we should use to call
|
278
|
+
# `voice_fallback_url`. Can be: `GET` or `POST`.
|
279
|
+
# @param [String] status_callback The URL we should call using the
|
280
|
+
# `status_callback_method` to send status information to your application.
|
281
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
282
|
+
# `status_callback`. Can be: `GET` or `POST`.
|
283
|
+
# @param [Boolean] voice_caller_id_lookup Whether we should look up the caller's
|
284
|
+
# caller-ID name from the CNAM database (additional charges apply). Can be: `true`
|
285
|
+
# or `false`.
|
286
|
+
# @param [String] sms_url The URL we should call when the phone number receives an
|
287
|
+
# incoming SMS message.
|
288
|
+
# @param [String] sms_method The HTTP method we should use to call `sms_url`. Can
|
289
|
+
# be: `GET` or `POST`.
|
290
|
+
# @param [String] sms_fallback_url The URL that we should call when an error
|
291
|
+
# occurs while retrieving or executing the TwiML from `sms_url`.
|
292
|
+
# @param [String] sms_fallback_method The HTTP method we should use to call
|
293
|
+
# `sms_fallback_url`. Can be: `GET` or `POST`.
|
294
|
+
# @param [String] sms_status_callback The URL we should call using a POST method
|
295
|
+
# to send status information about SMS messages sent by the application.
|
296
|
+
# @param [String] message_status_callback The URL we should call using a POST
|
297
|
+
# method to send message status information to your application.
|
306
298
|
# @return [ApplicationInstance] Updated ApplicationInstance
|
307
299
|
def update(friendly_name: :unset, api_version: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, voice_caller_id_lookup: :unset, sms_url: :unset, sms_method: :unset, sms_fallback_url: :unset, sms_fallback_method: :unset, sms_status_callback: :unset, message_status_callback: :unset)
|
308
300
|
data = Twilio::Values.of({
|
@@ -350,11 +342,11 @@ module Twilio
|
|
350
342
|
# Initialize the ApplicationInstance
|
351
343
|
# @param [Version] version Version that contains the resource
|
352
344
|
# @param [Hash] payload payload that contains response from Twilio
|
353
|
-
# @param [String] account_sid The
|
354
|
-
# [Account](https://www.twilio.com/docs/
|
355
|
-
#
|
356
|
-
# @param [String] sid The
|
357
|
-
# resource
|
345
|
+
# @param [String] account_sid The SID of the
|
346
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
347
|
+
# Application resource.
|
348
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
349
|
+
# Application resource to fetch.
|
358
350
|
# @return [ApplicationInstance] ApplicationInstance
|
359
351
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
360
352
|
super(version)
|
@@ -400,121 +392,121 @@ module Twilio
|
|
400
392
|
end
|
401
393
|
|
402
394
|
##
|
403
|
-
# @return [String]
|
395
|
+
# @return [String] The SID of the Account that created the resource
|
404
396
|
def account_sid
|
405
397
|
@properties['account_sid']
|
406
398
|
end
|
407
399
|
|
408
400
|
##
|
409
|
-
# @return [String] The API version to
|
401
|
+
# @return [String] The API version used to start a new TwiML session
|
410
402
|
def api_version
|
411
403
|
@properties['api_version']
|
412
404
|
end
|
413
405
|
|
414
406
|
##
|
415
|
-
# @return [Time]
|
407
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
416
408
|
def date_created
|
417
409
|
@properties['date_created']
|
418
410
|
end
|
419
411
|
|
420
412
|
##
|
421
|
-
# @return [Time]
|
413
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
422
414
|
def date_updated
|
423
415
|
@properties['date_updated']
|
424
416
|
end
|
425
417
|
|
426
418
|
##
|
427
|
-
# @return [String]
|
419
|
+
# @return [String] The string that you assigned to describe the resource
|
428
420
|
def friendly_name
|
429
421
|
@properties['friendly_name']
|
430
422
|
end
|
431
423
|
|
432
424
|
##
|
433
|
-
# @return [String] URL to
|
425
|
+
# @return [String] The URL to send message status information to your application
|
434
426
|
def message_status_callback
|
435
427
|
@properties['message_status_callback']
|
436
428
|
end
|
437
429
|
|
438
430
|
##
|
439
|
-
# @return [String]
|
431
|
+
# @return [String] The unique string that identifies the resource
|
440
432
|
def sid
|
441
433
|
@properties['sid']
|
442
434
|
end
|
443
435
|
|
444
436
|
##
|
445
|
-
# @return [String] HTTP method
|
437
|
+
# @return [String] The HTTP method used with sms_fallback_url
|
446
438
|
def sms_fallback_method
|
447
439
|
@properties['sms_fallback_method']
|
448
440
|
end
|
449
441
|
|
450
442
|
##
|
451
|
-
# @return [String]
|
443
|
+
# @return [String] The URL that we call when an error occurs while retrieving or executing the TwiML
|
452
444
|
def sms_fallback_url
|
453
445
|
@properties['sms_fallback_url']
|
454
446
|
end
|
455
447
|
|
456
448
|
##
|
457
|
-
# @return [String] HTTP method to use with sms_url
|
449
|
+
# @return [String] The HTTP method to use with sms_url
|
458
450
|
def sms_method
|
459
451
|
@properties['sms_method']
|
460
452
|
end
|
461
453
|
|
462
454
|
##
|
463
|
-
# @return [String] URL
|
455
|
+
# @return [String] The URL to send status information to your application
|
464
456
|
def sms_status_callback
|
465
457
|
@properties['sms_status_callback']
|
466
458
|
end
|
467
459
|
|
468
460
|
##
|
469
|
-
# @return [String] URL
|
461
|
+
# @return [String] The URL we call when the phone number receives an incoming SMS message
|
470
462
|
def sms_url
|
471
463
|
@properties['sms_url']
|
472
464
|
end
|
473
465
|
|
474
466
|
##
|
475
|
-
# @return [String] URL to
|
467
|
+
# @return [String] The URL to send status information to your application
|
476
468
|
def status_callback
|
477
469
|
@properties['status_callback']
|
478
470
|
end
|
479
471
|
|
480
472
|
##
|
481
|
-
# @return [String] HTTP method
|
473
|
+
# @return [String] The HTTP method we use to call status_callback
|
482
474
|
def status_callback_method
|
483
475
|
@properties['status_callback_method']
|
484
476
|
end
|
485
477
|
|
486
478
|
##
|
487
|
-
# @return [String] URI
|
479
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`
|
488
480
|
def uri
|
489
481
|
@properties['uri']
|
490
482
|
end
|
491
483
|
|
492
484
|
##
|
493
|
-
# @return [Boolean]
|
485
|
+
# @return [Boolean] Whether to lookup the caller's name
|
494
486
|
def voice_caller_id_lookup
|
495
487
|
@properties['voice_caller_id_lookup']
|
496
488
|
end
|
497
489
|
|
498
490
|
##
|
499
|
-
# @return [String] HTTP method
|
491
|
+
# @return [String] The HTTP method used with voice_fallback_url
|
500
492
|
def voice_fallback_method
|
501
493
|
@properties['voice_fallback_method']
|
502
494
|
end
|
503
495
|
|
504
496
|
##
|
505
|
-
# @return [String]
|
497
|
+
# @return [String] The URL we call when a TwiML error occurs
|
506
498
|
def voice_fallback_url
|
507
499
|
@properties['voice_fallback_url']
|
508
500
|
end
|
509
501
|
|
510
502
|
##
|
511
|
-
# @return [String] HTTP method
|
503
|
+
# @return [String] The HTTP method used with the voice_url
|
512
504
|
def voice_method
|
513
505
|
@properties['voice_method']
|
514
506
|
end
|
515
507
|
|
516
508
|
##
|
517
|
-
# @return [String] URL
|
509
|
+
# @return [String] The URL we call when the phone number receives a call
|
518
510
|
def voice_url
|
519
511
|
@properties['voice_url']
|
520
512
|
end
|
@@ -535,41 +527,38 @@ module Twilio
|
|
535
527
|
|
536
528
|
##
|
537
529
|
# Update the ApplicationInstance
|
538
|
-
# @param [String] friendly_name A
|
539
|
-
#
|
540
|
-
# @param [String] api_version
|
541
|
-
#
|
542
|
-
#
|
543
|
-
#
|
544
|
-
#
|
545
|
-
#
|
546
|
-
#
|
547
|
-
#
|
548
|
-
#
|
549
|
-
#
|
550
|
-
#
|
551
|
-
#
|
552
|
-
#
|
553
|
-
#
|
554
|
-
#
|
555
|
-
#
|
556
|
-
#
|
557
|
-
#
|
558
|
-
# @param [String]
|
559
|
-
#
|
560
|
-
# @param [String]
|
561
|
-
#
|
562
|
-
# @param [String]
|
563
|
-
#
|
564
|
-
# @param [String]
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
# @param [String] message_status_callback
|
569
|
-
#
|
570
|
-
# if you use the `/Messages` endpoint to send the message and specify this
|
571
|
-
# application's `Sid` as the `ApplicationSid` on an [outgoing SMS
|
572
|
-
# request](https://www.twilio.com/docs/sms/send-messages).
|
530
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
531
|
+
# the resource. It can be up to 64 characters long.
|
532
|
+
# @param [String] api_version The API version to use to start a new TwiML session.
|
533
|
+
# Can be: `2010-04-01` or `2008-08-01`. The default value is your account's
|
534
|
+
# default API version.
|
535
|
+
# @param [String] voice_url The URL we should call when the phone number assigned
|
536
|
+
# to this application receives a call.
|
537
|
+
# @param [String] voice_method The HTTP method we should use to call `voice_url`.
|
538
|
+
# Can be: `GET` or `POST`.
|
539
|
+
# @param [String] voice_fallback_url The URL that we should call when an error
|
540
|
+
# occurs retrieving or executing the TwiML requested by `url`.
|
541
|
+
# @param [String] voice_fallback_method The HTTP method we should use to call
|
542
|
+
# `voice_fallback_url`. Can be: `GET` or `POST`.
|
543
|
+
# @param [String] status_callback The URL we should call using the
|
544
|
+
# `status_callback_method` to send status information to your application.
|
545
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
546
|
+
# `status_callback`. Can be: `GET` or `POST`.
|
547
|
+
# @param [Boolean] voice_caller_id_lookup Whether we should look up the caller's
|
548
|
+
# caller-ID name from the CNAM database (additional charges apply). Can be: `true`
|
549
|
+
# or `false`.
|
550
|
+
# @param [String] sms_url The URL we should call when the phone number receives an
|
551
|
+
# incoming SMS message.
|
552
|
+
# @param [String] sms_method The HTTP method we should use to call `sms_url`. Can
|
553
|
+
# be: `GET` or `POST`.
|
554
|
+
# @param [String] sms_fallback_url The URL that we should call when an error
|
555
|
+
# occurs while retrieving or executing the TwiML from `sms_url`.
|
556
|
+
# @param [String] sms_fallback_method The HTTP method we should use to call
|
557
|
+
# `sms_fallback_url`. Can be: `GET` or `POST`.
|
558
|
+
# @param [String] sms_status_callback The URL we should call using a POST method
|
559
|
+
# to send status information about SMS messages sent by the application.
|
560
|
+
# @param [String] message_status_callback The URL we should call using a POST
|
561
|
+
# method to send message status information to your application.
|
573
562
|
# @return [ApplicationInstance] Updated ApplicationInstance
|
574
563
|
def update(friendly_name: :unset, api_version: :unset, voice_url: :unset, voice_method: :unset, voice_fallback_url: :unset, voice_fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, voice_caller_id_lookup: :unset, sms_url: :unset, sms_method: :unset, sms_fallback_url: :unset, sms_fallback_method: :unset, sms_status_callback: :unset, message_status_callback: :unset)
|
575
564
|
context.update(
|
@@ -15,8 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the AuthorizedConnectAppList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] account_sid The
|
19
|
-
#
|
18
|
+
# @param [String] account_sid The SID of the
|
19
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
20
|
+
# AuthorizedConnectApp resource.
|
20
21
|
# @return [AuthorizedConnectAppList] AuthorizedConnectAppList
|
21
22
|
def initialize(version, account_sid: nil)
|
22
23
|
super(version)
|
@@ -148,8 +149,10 @@ module Twilio
|
|
148
149
|
##
|
149
150
|
# Initialize the AuthorizedConnectAppContext
|
150
151
|
# @param [Version] version Version that contains the resource
|
151
|
-
# @param [String] account_sid The
|
152
|
-
#
|
152
|
+
# @param [String] account_sid The SID of the
|
153
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
154
|
+
# AuthorizedConnectApp resource to fetch.
|
155
|
+
# @param [String] connect_app_sid The SID of the Connect App to fetch.
|
153
156
|
# @return [AuthorizedConnectAppContext] AuthorizedConnectAppContext
|
154
157
|
def initialize(version, account_sid, connect_app_sid)
|
155
158
|
super(version)
|
@@ -192,9 +195,10 @@ module Twilio
|
|
192
195
|
# Initialize the AuthorizedConnectAppInstance
|
193
196
|
# @param [Version] version Version that contains the resource
|
194
197
|
# @param [Hash] payload payload that contains response from Twilio
|
195
|
-
# @param [String] account_sid The
|
196
|
-
#
|
197
|
-
#
|
198
|
+
# @param [String] account_sid The SID of the
|
199
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
200
|
+
# AuthorizedConnectApp resource.
|
201
|
+
# @param [String] connect_app_sid The SID of the Connect App to fetch.
|
198
202
|
# @return [AuthorizedConnectAppInstance] AuthorizedConnectAppInstance
|
199
203
|
def initialize(version, payload, account_sid: nil, connect_app_sid: nil)
|
200
204
|
super(version)
|
@@ -237,61 +241,61 @@ module Twilio
|
|
237
241
|
end
|
238
242
|
|
239
243
|
##
|
240
|
-
# @return [String] The
|
244
|
+
# @return [String] The SID of the Account that created the resource
|
241
245
|
def account_sid
|
242
246
|
@properties['account_sid']
|
243
247
|
end
|
244
248
|
|
245
249
|
##
|
246
|
-
# @return [String] The company name set for
|
250
|
+
# @return [String] The company name set for the Connect App
|
247
251
|
def connect_app_company_name
|
248
252
|
@properties['connect_app_company_name']
|
249
253
|
end
|
250
254
|
|
251
255
|
##
|
252
|
-
# @return [String]
|
256
|
+
# @return [String] A detailed description of the app
|
253
257
|
def connect_app_description
|
254
258
|
@properties['connect_app_description']
|
255
259
|
end
|
256
260
|
|
257
261
|
##
|
258
|
-
# @return [String]
|
262
|
+
# @return [String] The name of the Connect App
|
259
263
|
def connect_app_friendly_name
|
260
264
|
@properties['connect_app_friendly_name']
|
261
265
|
end
|
262
266
|
|
263
267
|
##
|
264
|
-
# @return [String] The public URL for
|
268
|
+
# @return [String] The public URL for the Connect App
|
265
269
|
def connect_app_homepage_url
|
266
270
|
@properties['connect_app_homepage_url']
|
267
271
|
end
|
268
272
|
|
269
273
|
##
|
270
|
-
# @return [String]
|
274
|
+
# @return [String] The SID that we assigned to the Connect App
|
271
275
|
def connect_app_sid
|
272
276
|
@properties['connect_app_sid']
|
273
277
|
end
|
274
278
|
|
275
279
|
##
|
276
|
-
# @return [Time] The date
|
280
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
277
281
|
def date_created
|
278
282
|
@properties['date_created']
|
279
283
|
end
|
280
284
|
|
281
285
|
##
|
282
|
-
# @return [Time] The date
|
286
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
283
287
|
def date_updated
|
284
288
|
@properties['date_updated']
|
285
289
|
end
|
286
290
|
|
287
291
|
##
|
288
|
-
# @return [authorized_connect_app.Permission] Permissions authorized to
|
292
|
+
# @return [authorized_connect_app.Permission] Permissions authorized to the app
|
289
293
|
def permissions
|
290
294
|
@properties['permissions']
|
291
295
|
end
|
292
296
|
|
293
297
|
##
|
294
|
-
# @return [String] The URI
|
298
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`
|
295
299
|
def uri
|
296
300
|
@properties['uri']
|
297
301
|
end
|