twilio-ruby 5.41.0 → 5.45.1
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 +99 -0
- data/{LICENSE.md → LICENSE} +0 -0
- data/PULL_REQUEST_TEMPLATE.md +3 -3
- data/README.md +18 -2
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/jwt/access_token.rb +7 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
- data/lib/twilio-ruby/rest/client.rb +29 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
- data/lib/twilio-ruby/rest/flex_api.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
- data/lib/twilio-ruby/rest/insights.rb +8 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
- data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
- data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
- data/lib/twilio-ruby/rest/preview.rb +0 -21
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
- data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +27 -49
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +24 -42
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
- data/lib/twilio-ruby/util/configuration.rb +5 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
- data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
- data/spec/integration/api/v2010/account/call_spec.rb +20 -10
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
- data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
- data/spec/integration/conversations/v1/user_spec.rb +9 -4
- data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
- data/spec/integration/events/v1/subscription_spec.rb +49 -0
- data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
- data/spec/integration/insights/v1/room_spec.rb +164 -0
- data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
- data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
- data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
- data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
- data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +4 -12
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +5 -15
- data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
- data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
- data/spec/integration/video/v1/room_spec.rb +10 -5
- data/spec/jwt/access_token_spec.rb +9 -1
- data/spec/rest/client_spec.rb +24 -2
- data/twilio-ruby.gemspec +2 -1
- metadata +30 -19
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
- data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
- data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -247,10 +247,16 @@ module Twilio
|
|
247
247
|
# number that the participant is in contact with. 'null' value will remove it.
|
248
248
|
# @param [String] messaging_binding_projected_address The address of the Twilio
|
249
249
|
# phone number that is used in Group MMS. 'null' value will remove it.
|
250
|
+
# @param [String] last_read_message_index Index of last “read” message in the
|
251
|
+
# {Conversation}[https://www.twilio.com/docs/conversations/api/conversation-resource]
|
252
|
+
# for the Participant.
|
253
|
+
# @param [String] last_read_timestamp Timestamp of last “read” message in the
|
254
|
+
# {Conversation}[https://www.twilio.com/docs/conversations/api/conversation-resource]
|
255
|
+
# for the Participant.
|
250
256
|
# @param [participant.WebhookEnabledType] x_twilio_webhook_enabled The
|
251
257
|
# X-Twilio-Webhook-Enabled HTTP request header
|
252
258
|
# @return [ParticipantInstance] Updated ParticipantInstance
|
253
|
-
def update(date_created: :unset, date_updated: :unset, identity: :unset, attributes: :unset, role_sid: :unset, messaging_binding_proxy_address: :unset, messaging_binding_projected_address: :unset, x_twilio_webhook_enabled: :unset)
|
259
|
+
def update(date_created: :unset, date_updated: :unset, identity: :unset, attributes: :unset, role_sid: :unset, messaging_binding_proxy_address: :unset, messaging_binding_projected_address: :unset, last_read_message_index: :unset, last_read_timestamp: :unset, x_twilio_webhook_enabled: :unset)
|
254
260
|
data = Twilio::Values.of({
|
255
261
|
'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
|
256
262
|
'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
|
@@ -259,6 +265,8 @@ module Twilio
|
|
259
265
|
'RoleSid' => role_sid,
|
260
266
|
'MessagingBinding.ProxyAddress' => messaging_binding_proxy_address,
|
261
267
|
'MessagingBinding.ProjectedAddress' => messaging_binding_projected_address,
|
268
|
+
'LastReadMessageIndex' => last_read_message_index,
|
269
|
+
'LastReadTimestamp' => last_read_timestamp,
|
262
270
|
})
|
263
271
|
headers = Twilio::Values.of({'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, })
|
264
272
|
|
@@ -344,6 +352,8 @@ module Twilio
|
|
344
352
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
345
353
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
346
354
|
'url' => payload['url'],
|
355
|
+
'last_read_message_index' => payload['last_read_message_index'] == nil ? payload['last_read_message_index'] : payload['last_read_message_index'].to_i,
|
356
|
+
'last_read_timestamp' => payload['last_read_timestamp'],
|
347
357
|
}
|
348
358
|
|
349
359
|
# Context
|
@@ -437,6 +447,18 @@ module Twilio
|
|
437
447
|
@properties['url']
|
438
448
|
end
|
439
449
|
|
450
|
+
##
|
451
|
+
# @return [String] Index of last “read” message in the Conversation for the Participant.
|
452
|
+
def last_read_message_index
|
453
|
+
@properties['last_read_message_index']
|
454
|
+
end
|
455
|
+
|
456
|
+
##
|
457
|
+
# @return [String] Timestamp of last “read” message in the Conversation for the Participant.
|
458
|
+
def last_read_timestamp
|
459
|
+
@properties['last_read_timestamp']
|
460
|
+
end
|
461
|
+
|
440
462
|
##
|
441
463
|
# Update the ParticipantInstance
|
442
464
|
# @param [Time] date_created The date that this resource was created.
|
@@ -457,10 +479,16 @@ module Twilio
|
|
457
479
|
# number that the participant is in contact with. 'null' value will remove it.
|
458
480
|
# @param [String] messaging_binding_projected_address The address of the Twilio
|
459
481
|
# phone number that is used in Group MMS. 'null' value will remove it.
|
482
|
+
# @param [String] last_read_message_index Index of last “read” message in the
|
483
|
+
# {Conversation}[https://www.twilio.com/docs/conversations/api/conversation-resource]
|
484
|
+
# for the Participant.
|
485
|
+
# @param [String] last_read_timestamp Timestamp of last “read” message in the
|
486
|
+
# {Conversation}[https://www.twilio.com/docs/conversations/api/conversation-resource]
|
487
|
+
# for the Participant.
|
460
488
|
# @param [participant.WebhookEnabledType] x_twilio_webhook_enabled The
|
461
489
|
# X-Twilio-Webhook-Enabled HTTP request header
|
462
490
|
# @return [ParticipantInstance] Updated ParticipantInstance
|
463
|
-
def update(date_created: :unset, date_updated: :unset, identity: :unset, attributes: :unset, role_sid: :unset, messaging_binding_proxy_address: :unset, messaging_binding_projected_address: :unset, x_twilio_webhook_enabled: :unset)
|
491
|
+
def update(date_created: :unset, date_updated: :unset, identity: :unset, attributes: :unset, role_sid: :unset, messaging_binding_proxy_address: :unset, messaging_binding_projected_address: :unset, last_read_message_index: :unset, last_read_timestamp: :unset, x_twilio_webhook_enabled: :unset)
|
464
492
|
context.update(
|
465
493
|
date_created: date_created,
|
466
494
|
date_updated: date_updated,
|
@@ -469,6 +497,8 @@ module Twilio
|
|
469
497
|
role_sid: role_sid,
|
470
498
|
messaging_binding_proxy_address: messaging_binding_proxy_address,
|
471
499
|
messaging_binding_projected_address: messaging_binding_projected_address,
|
500
|
+
last_read_message_index: last_read_message_index,
|
501
|
+
last_read_timestamp: last_read_timestamp,
|
472
502
|
x_twilio_webhook_enabled: x_twilio_webhook_enabled,
|
473
503
|
)
|
474
504
|
end
|
@@ -285,6 +285,7 @@ module Twilio
|
|
285
285
|
'friendly_name' => payload['friendly_name'],
|
286
286
|
'attributes' => payload['attributes'],
|
287
287
|
'is_online' => payload['is_online'],
|
288
|
+
'is_notifiable' => payload['is_notifiable'],
|
288
289
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
289
290
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
290
291
|
'url' => payload['url'],
|
@@ -349,11 +350,17 @@ module Twilio
|
|
349
350
|
end
|
350
351
|
|
351
352
|
##
|
352
|
-
# @return [Boolean] Whether the User is actively connected to
|
353
|
+
# @return [Boolean] Whether the User is actively connected to this Conversations Service and online
|
353
354
|
def is_online
|
354
355
|
@properties['is_online']
|
355
356
|
end
|
356
357
|
|
358
|
+
##
|
359
|
+
# @return [Boolean] Whether the User has a potentially valid Push Notification registration for this Conversations Service
|
360
|
+
def is_notifiable
|
361
|
+
@properties['is_notifiable']
|
362
|
+
end
|
363
|
+
|
357
364
|
##
|
358
365
|
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
359
366
|
def date_created
|
@@ -265,6 +265,7 @@ module Twilio
|
|
265
265
|
'friendly_name' => payload['friendly_name'],
|
266
266
|
'attributes' => payload['attributes'],
|
267
267
|
'is_online' => payload['is_online'],
|
268
|
+
'is_notifiable' => payload['is_notifiable'],
|
268
269
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
269
270
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
270
271
|
'url' => payload['url'],
|
@@ -329,11 +330,17 @@ module Twilio
|
|
329
330
|
end
|
330
331
|
|
331
332
|
##
|
332
|
-
# @return [Boolean] Whether the User is actively connected to
|
333
|
+
# @return [Boolean] Whether the User is actively connected to this Conversations Service and online
|
333
334
|
def is_online
|
334
335
|
@properties['is_online']
|
335
336
|
end
|
336
337
|
|
338
|
+
##
|
339
|
+
# @return [Boolean] Whether the User has a potentially valid Push Notification registration for this Conversations Service
|
340
|
+
def is_notifiable
|
341
|
+
@properties['is_notifiable']
|
342
|
+
end
|
343
|
+
|
337
344
|
##
|
338
345
|
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
339
346
|
def date_created
|
@@ -29,6 +29,8 @@ module Twilio
|
|
29
29
|
# Lists SubscriptionInstance records from the API as a list.
|
30
30
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
31
|
# memory before returning.
|
32
|
+
# @param [String] sink_sid The SID of the sink that the list of Subscriptions
|
33
|
+
# should be filtered by.
|
32
34
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
35
|
# guarantees to never return more than limit. Default is no limit
|
34
36
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -36,14 +38,16 @@ module Twilio
|
|
36
38
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
39
|
# efficient page size, i.e. min(limit, 1000)
|
38
40
|
# @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
|
+
def list(sink_sid: :unset, limit: nil, page_size: nil)
|
42
|
+
self.stream(sink_sid: sink_sid, limit: limit, page_size: page_size).entries
|
41
43
|
end
|
42
44
|
|
43
45
|
##
|
44
46
|
# Streams SubscriptionInstance records from the API as an Enumerable.
|
45
47
|
# This operation lazily loads records as efficiently as possible until the limit
|
46
48
|
# is reached.
|
49
|
+
# @param [String] sink_sid The SID of the sink that the list of Subscriptions
|
50
|
+
# should be filtered by.
|
47
51
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
52
|
# guarantees to never return more than limit. Default is no limit.
|
49
53
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -51,10 +55,10 @@ module Twilio
|
|
51
55
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
56
|
# efficient page size, i.e. min(limit, 1000)
|
53
57
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
54
|
-
def stream(limit: nil, page_size: nil)
|
58
|
+
def stream(sink_sid: :unset, limit: nil, page_size: nil)
|
55
59
|
limits = @version.read_limits(limit, page_size)
|
56
60
|
|
57
|
-
page = self.page(page_size: limits[:page_size], )
|
61
|
+
page = self.page(sink_sid: sink_sid, page_size: limits[:page_size], )
|
58
62
|
|
59
63
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
60
64
|
end
|
@@ -76,12 +80,15 @@ module Twilio
|
|
76
80
|
##
|
77
81
|
# Retrieve a single page of SubscriptionInstance records from the API.
|
78
82
|
# Request is executed immediately.
|
83
|
+
# @param [String] sink_sid The SID of the sink that the list of Subscriptions
|
84
|
+
# should be filtered by.
|
79
85
|
# @param [String] page_token PageToken provided by the API
|
80
86
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
81
87
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
82
88
|
# @return [Page] Page of SubscriptionInstance
|
83
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
89
|
+
def page(sink_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
84
90
|
params = Twilio::Values.of({
|
91
|
+
'SinkSid' => sink_sid,
|
85
92
|
'PageToken' => page_token,
|
86
93
|
'Page' => page_number,
|
87
94
|
'PageSize' => page_size,
|
@@ -44,7 +44,7 @@ module Twilio
|
|
44
44
|
end
|
45
45
|
|
46
46
|
##
|
47
|
-
# @param [String] sid The unique string that we created to identify the
|
47
|
+
# @param [String] sid The unique string that we created to identify the Flex Flow
|
48
48
|
# resource.
|
49
49
|
# @return [Twilio::REST::Flex_api::V1::FlexFlowInstance] if sid was passed.
|
50
50
|
# @return [Twilio::REST::Flex_api::V1::FlexFlowList]
|
@@ -42,7 +42,7 @@ module Twilio
|
|
42
42
|
end
|
43
43
|
|
44
44
|
##
|
45
|
-
# @param [String] sid The SID of the
|
45
|
+
# @param [String] sid The SID of the Flex Flow resource to fetch.
|
46
46
|
# @return [Twilio::REST::Flex_api::V1::FlexFlowContext] if sid was passed.
|
47
47
|
# @return [Twilio::REST::Flex_api::V1::FlexFlowList]
|
48
48
|
def flex_flow(sid=:unset)
|
@@ -105,7 +105,7 @@ module Twilio
|
|
105
105
|
|
106
106
|
##
|
107
107
|
# Create the ChannelInstance
|
108
|
-
# @param [String] flex_flow_sid The SID of the
|
108
|
+
# @param [String] flex_flow_sid The SID of the Flex Flow.
|
109
109
|
# @param [String] identity The `identity` value that uniquely identifies the new
|
110
110
|
# resource's chat User.
|
111
111
|
# @param [String] chat_user_friendly_name The chat participant's friendly name.
|
@@ -114,9 +114,9 @@ module Twilio
|
|
114
114
|
# of an SMS.
|
115
115
|
# @param [String] chat_unique_name The chat channel's unique name.
|
116
116
|
# @param [String] pre_engagement_data The pre-engagement data.
|
117
|
-
# @param [String] task_sid The SID of the TaskRouter
|
117
|
+
# @param [String] task_sid The SID of the TaskRouter Task. Only valid when
|
118
118
|
# integration type is `task`. `null` for integration types `studio` & `external`
|
119
|
-
# @param [String] task_attributes The
|
119
|
+
# @param [String] task_attributes The Task attributes to be added for the
|
120
120
|
# TaskRouter Task.
|
121
121
|
# @param [Boolean] long_lived Whether to create the channel as long-lived.
|
122
122
|
# @return [ChannelInstance] Created ChannelInstance
|
@@ -265,7 +265,7 @@ module Twilio
|
|
265
265
|
end
|
266
266
|
|
267
267
|
##
|
268
|
-
# @return [String] The SID of the
|
268
|
+
# @return [String] The SID of the Flex Flow
|
269
269
|
def flex_flow_sid
|
270
270
|
@properties['flex_flow_sid']
|
271
271
|
end
|
@@ -283,7 +283,7 @@ module Twilio
|
|
283
283
|
end
|
284
284
|
|
285
285
|
##
|
286
|
-
# @return [String] The SID of the TaskRouter
|
286
|
+
# @return [String] The SID of the TaskRouter Task
|
287
287
|
def task_sid
|
288
288
|
@properties['task_sid']
|
289
289
|
end
|
@@ -27,7 +27,7 @@ module Twilio
|
|
27
27
|
# Lists FlexFlowInstance records from the API as a list.
|
28
28
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
29
|
# memory before returning.
|
30
|
-
# @param [String] friendly_name The `friendly_name` of the
|
30
|
+
# @param [String] friendly_name The `friendly_name` of the Flex Flow resources to
|
31
31
|
# read.
|
32
32
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
33
|
# guarantees to never return more than limit. Default is no limit
|
@@ -44,7 +44,7 @@ module Twilio
|
|
44
44
|
# Streams FlexFlowInstance records from the API as an Enumerable.
|
45
45
|
# This operation lazily loads records as efficiently as possible until the limit
|
46
46
|
# is reached.
|
47
|
-
# @param [String] friendly_name The `friendly_name` of the
|
47
|
+
# @param [String] friendly_name The `friendly_name` of the Flex Flow resources to
|
48
48
|
# read.
|
49
49
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
50
50
|
# guarantees to never return more than limit. Default is no limit.
|
@@ -78,7 +78,7 @@ module Twilio
|
|
78
78
|
##
|
79
79
|
# Retrieve a single page of FlexFlowInstance records from the API.
|
80
80
|
# Request is executed immediately.
|
81
|
-
# @param [String] friendly_name The `friendly_name` of the
|
81
|
+
# @param [String] friendly_name The `friendly_name` of the Flex Flow resources to
|
82
82
|
# read.
|
83
83
|
# @param [String] page_token PageToken provided by the API
|
84
84
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
@@ -113,33 +113,36 @@ module Twilio
|
|
113
113
|
##
|
114
114
|
# Create the FlexFlowInstance
|
115
115
|
# @param [String] friendly_name A descriptive string that you create to describe
|
116
|
-
# the
|
116
|
+
# the Flex Flow resource.
|
117
117
|
# @param [String] chat_service_sid The SID of the chat service.
|
118
118
|
# @param [flex_flow.ChannelType] channel_type The channel type. Can be: `web`,
|
119
119
|
# `facebook`, `sms`, `whatsapp`, `line` or `custom`.
|
120
120
|
# @param [String] contact_identity The channel contact's Identity.
|
121
|
-
# @param [Boolean] enabled Whether the new
|
121
|
+
# @param [Boolean] enabled Whether the new Flex Flow is enabled.
|
122
122
|
# @param [flex_flow.IntegrationType] integration_type The integration type. Can
|
123
123
|
# be: `studio`, `external`, or `task`.
|
124
|
-
# @param [String] integration_flow_sid The SID of the Flow when
|
125
|
-
# is `studio`.
|
126
|
-
# @param [String] integration_url The
|
127
|
-
# is `external`.
|
128
|
-
# @param [String] integration_workspace_sid The Workspace SID for a new
|
129
|
-
#
|
130
|
-
# @param [String] integration_workflow_sid The Workflow SID for a new
|
131
|
-
# `
|
132
|
-
# @param [String] integration_channel The
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
# @param [
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
124
|
+
# @param [String] integration_flow_sid The SID of the Studio Flow. Required when
|
125
|
+
# `integrationType` is `studio`.
|
126
|
+
# @param [String] integration_url The URL of the external webhook. Required when
|
127
|
+
# `integrationType` is `external`.
|
128
|
+
# @param [String] integration_workspace_sid The Workspace SID for a new Task.
|
129
|
+
# Required when `integrationType` is `task`.
|
130
|
+
# @param [String] integration_workflow_sid The Workflow SID for a new Task.
|
131
|
+
# Required when `integrationType` is `task`.
|
132
|
+
# @param [String] integration_channel The Task Channel for the TaskRouter Task
|
133
|
+
# that will be created. Applicable and required when integrationType is `task`.
|
134
|
+
# Set to `sms` for SMS, and to `chat` otherwise. The default value is `default`
|
135
|
+
# @param [String] integration_timeout The Task timeout in seconds for a new Task.
|
136
|
+
# Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`,
|
137
|
+
# not applicable otherwise.
|
138
|
+
# @param [String] integration_priority The Task priority of a new Task. The
|
139
|
+
# default priority is 0. Optional when `integrationType` is `task`, not applicable
|
140
|
+
# otherwise.
|
141
|
+
# @param [Boolean] integration_creation_on_message In the context of outbound
|
142
|
+
# messaging, defines whether to create a Task immediately (and therefore reserve
|
143
|
+
# the conversation to current agent), or delay Task creation until the customer
|
144
|
+
# sends the first response. Set to false to create immediately, true to delay Task
|
145
|
+
# creation. This setting is only applicable for outbound messaging.
|
143
146
|
# @param [Boolean] long_lived When enabled, Flex will keep the chat channel active
|
144
147
|
# so that it may be used for subsequent interactions with a contact identity.
|
145
148
|
# Defaults to `false`.
|
@@ -147,8 +150,9 @@ module Twilio
|
|
147
150
|
# will remove active Proxy sessions if the associated Task is deleted outside of
|
148
151
|
# the Flex UI. Defaults to `false`.
|
149
152
|
# @param [String] integration_retry_count The number of times to retry the webhook
|
150
|
-
# if the first attempt fails. Can be an integer between 0 and 3
|
151
|
-
#
|
153
|
+
# if the first attempt fails. Can be an integer between 0 and 3 (included),
|
154
|
+
# default is 0. Optional when integrationType is `external`, not applicable
|
155
|
+
# otherwise.
|
152
156
|
# @return [FlexFlowInstance] Created FlexFlowInstance
|
153
157
|
def create(friendly_name: nil, chat_service_sid: nil, channel_type: nil, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
|
154
158
|
data = Twilio::Values.of({
|
@@ -216,7 +220,7 @@ module Twilio
|
|
216
220
|
##
|
217
221
|
# Initialize the FlexFlowContext
|
218
222
|
# @param [Version] version Version that contains the resource
|
219
|
-
# @param [String] sid The SID of the
|
223
|
+
# @param [String] sid The SID of the Flex Flow resource to fetch.
|
220
224
|
# @return [FlexFlowContext] FlexFlowContext
|
221
225
|
def initialize(version, sid)
|
222
226
|
super(version)
|
@@ -238,33 +242,36 @@ module Twilio
|
|
238
242
|
##
|
239
243
|
# Update the FlexFlowInstance
|
240
244
|
# @param [String] friendly_name A descriptive string that you create to describe
|
241
|
-
# the
|
245
|
+
# the Flex Flow resource.
|
242
246
|
# @param [String] chat_service_sid The SID of the chat service.
|
243
247
|
# @param [flex_flow.ChannelType] channel_type The channel type. Can be: `web`,
|
244
248
|
# `facebook`, `sms`, `whatsapp`, `line` or `custom`.
|
245
249
|
# @param [String] contact_identity The channel contact's Identity.
|
246
|
-
# @param [Boolean] enabled Whether the
|
250
|
+
# @param [Boolean] enabled Whether the new Flex Flow is enabled.
|
247
251
|
# @param [flex_flow.IntegrationType] integration_type The integration type. Can
|
248
252
|
# be: `studio`, `external`, or `task`.
|
249
|
-
# @param [String] integration_flow_sid The SID of the Flow when
|
250
|
-
# is `studio`.
|
251
|
-
# @param [String] integration_url The
|
252
|
-
# is `external`.
|
253
|
-
# @param [String] integration_workspace_sid The Workspace SID for a new
|
254
|
-
# `
|
255
|
-
# @param [String] integration_workflow_sid The Workflow SID for a new
|
256
|
-
# `
|
257
|
-
# @param [String] integration_channel The
|
258
|
-
#
|
259
|
-
#
|
260
|
-
#
|
261
|
-
#
|
262
|
-
#
|
263
|
-
# @param [
|
264
|
-
#
|
265
|
-
#
|
266
|
-
#
|
267
|
-
#
|
253
|
+
# @param [String] integration_flow_sid The SID of the Studio Flow. Required when
|
254
|
+
# `integrationType` is `studio`.
|
255
|
+
# @param [String] integration_url The URL of the external webhook. Required when
|
256
|
+
# `integrationType` is `external`.
|
257
|
+
# @param [String] integration_workspace_sid The Workspace SID for a new Task.
|
258
|
+
# Required when `integrationType` is `task`.
|
259
|
+
# @param [String] integration_workflow_sid The Workflow SID for a new Task.
|
260
|
+
# Required when `integrationType` is `task`.
|
261
|
+
# @param [String] integration_channel The Task Channel for the TaskRouter Task
|
262
|
+
# that will be created. Applicable and required when integrationType is `task`.
|
263
|
+
# Set to `sms` for SMS, and to `chat` otherwise. The default value is `default`
|
264
|
+
# @param [String] integration_timeout The Task timeout in seconds for a new Task.
|
265
|
+
# Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`,
|
266
|
+
# not applicable otherwise.
|
267
|
+
# @param [String] integration_priority The Task priority of a new Task. The
|
268
|
+
# default priority is 0. Optional when `integrationType` is `task`, not applicable
|
269
|
+
# otherwise.
|
270
|
+
# @param [Boolean] integration_creation_on_message In the context of outbound
|
271
|
+
# messaging, defines whether to create a Task immediately (and therefore reserve
|
272
|
+
# the conversation to current agent), or delay Task creation until the customer
|
273
|
+
# sends the first response. Set to false to create immediately, true to delay Task
|
274
|
+
# creation. This setting is only applicable for outbound messaging.
|
268
275
|
# @param [Boolean] long_lived When enabled, Flex will keep the chat channel active
|
269
276
|
# so that it may be used for subsequent interactions with a contact identity.
|
270
277
|
# Defaults to `false`.
|
@@ -272,8 +279,9 @@ module Twilio
|
|
272
279
|
# will remove active Proxy sessions if the associated Task is deleted outside of
|
273
280
|
# the Flex UI. Defaults to `false`.
|
274
281
|
# @param [String] integration_retry_count The number of times to retry the webhook
|
275
|
-
# if the first attempt fails. Can be an integer between 0 and 3
|
276
|
-
#
|
282
|
+
# if the first attempt fails. Can be an integer between 0 and 3 (included),
|
283
|
+
# default is 0. Optional when integrationType is `external`, not applicable
|
284
|
+
# otherwise.
|
277
285
|
# @return [FlexFlowInstance] Updated FlexFlowInstance
|
278
286
|
def update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
|
279
287
|
data = Twilio::Values.of({
|
@@ -328,7 +336,7 @@ module Twilio
|
|
328
336
|
# Initialize the FlexFlowInstance
|
329
337
|
# @param [Version] version Version that contains the resource
|
330
338
|
# @param [Hash] payload payload that contains response from Twilio
|
331
|
-
# @param [String] sid The SID of the
|
339
|
+
# @param [String] sid The SID of the Flex Flow resource to fetch.
|
332
340
|
# @return [FlexFlowInstance] FlexFlowInstance
|
333
341
|
def initialize(version, payload, sid: nil)
|
334
342
|
super(version)
|
@@ -416,7 +424,7 @@ module Twilio
|
|
416
424
|
end
|
417
425
|
|
418
426
|
##
|
419
|
-
# @return [Boolean] Whether the
|
427
|
+
# @return [Boolean] Whether the Flex Flow is enabled
|
420
428
|
def enabled
|
421
429
|
@properties['enabled']
|
422
430
|
end
|
@@ -446,7 +454,7 @@ module Twilio
|
|
446
454
|
end
|
447
455
|
|
448
456
|
##
|
449
|
-
# @return [String] The absolute URL of the
|
457
|
+
# @return [String] The absolute URL of the Flex Flow resource
|
450
458
|
def url
|
451
459
|
@properties['url']
|
452
460
|
end
|
@@ -461,33 +469,36 @@ module Twilio
|
|
461
469
|
##
|
462
470
|
# Update the FlexFlowInstance
|
463
471
|
# @param [String] friendly_name A descriptive string that you create to describe
|
464
|
-
# the
|
472
|
+
# the Flex Flow resource.
|
465
473
|
# @param [String] chat_service_sid The SID of the chat service.
|
466
474
|
# @param [flex_flow.ChannelType] channel_type The channel type. Can be: `web`,
|
467
475
|
# `facebook`, `sms`, `whatsapp`, `line` or `custom`.
|
468
476
|
# @param [String] contact_identity The channel contact's Identity.
|
469
|
-
# @param [Boolean] enabled Whether the
|
477
|
+
# @param [Boolean] enabled Whether the new Flex Flow is enabled.
|
470
478
|
# @param [flex_flow.IntegrationType] integration_type The integration type. Can
|
471
479
|
# be: `studio`, `external`, or `task`.
|
472
|
-
# @param [String] integration_flow_sid The SID of the Flow when
|
473
|
-
# is `studio`.
|
474
|
-
# @param [String] integration_url The
|
475
|
-
# is `external`.
|
476
|
-
# @param [String] integration_workspace_sid The Workspace SID for a new
|
477
|
-
# `
|
478
|
-
# @param [String] integration_workflow_sid The Workflow SID for a new
|
479
|
-
# `
|
480
|
-
# @param [String] integration_channel The
|
481
|
-
#
|
482
|
-
#
|
483
|
-
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
# @param [
|
487
|
-
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
480
|
+
# @param [String] integration_flow_sid The SID of the Studio Flow. Required when
|
481
|
+
# `integrationType` is `studio`.
|
482
|
+
# @param [String] integration_url The URL of the external webhook. Required when
|
483
|
+
# `integrationType` is `external`.
|
484
|
+
# @param [String] integration_workspace_sid The Workspace SID for a new Task.
|
485
|
+
# Required when `integrationType` is `task`.
|
486
|
+
# @param [String] integration_workflow_sid The Workflow SID for a new Task.
|
487
|
+
# Required when `integrationType` is `task`.
|
488
|
+
# @param [String] integration_channel The Task Channel for the TaskRouter Task
|
489
|
+
# that will be created. Applicable and required when integrationType is `task`.
|
490
|
+
# Set to `sms` for SMS, and to `chat` otherwise. The default value is `default`
|
491
|
+
# @param [String] integration_timeout The Task timeout in seconds for a new Task.
|
492
|
+
# Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`,
|
493
|
+
# not applicable otherwise.
|
494
|
+
# @param [String] integration_priority The Task priority of a new Task. The
|
495
|
+
# default priority is 0. Optional when `integrationType` is `task`, not applicable
|
496
|
+
# otherwise.
|
497
|
+
# @param [Boolean] integration_creation_on_message In the context of outbound
|
498
|
+
# messaging, defines whether to create a Task immediately (and therefore reserve
|
499
|
+
# the conversation to current agent), or delay Task creation until the customer
|
500
|
+
# sends the first response. Set to false to create immediately, true to delay Task
|
501
|
+
# creation. This setting is only applicable for outbound messaging.
|
491
502
|
# @param [Boolean] long_lived When enabled, Flex will keep the chat channel active
|
492
503
|
# so that it may be used for subsequent interactions with a contact identity.
|
493
504
|
# Defaults to `false`.
|
@@ -495,8 +506,9 @@ module Twilio
|
|
495
506
|
# will remove active Proxy sessions if the associated Task is deleted outside of
|
496
507
|
# the Flex UI. Defaults to `false`.
|
497
508
|
# @param [String] integration_retry_count The number of times to retry the webhook
|
498
|
-
# if the first attempt fails. Can be an integer between 0 and 3
|
499
|
-
#
|
509
|
+
# if the first attempt fails. Can be an integer between 0 and 3 (included),
|
510
|
+
# default is 0. Optional when integrationType is `external`, not applicable
|
511
|
+
# otherwise.
|
500
512
|
# @return [FlexFlowInstance] Updated FlexFlowInstance
|
501
513
|
def update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
|
502
514
|
context.update(
|