twilio-ruby 5.72.1 → 5.73.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +45 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +22 -16
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -2
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +56 -0
- data/lib/twilio-ruby/rest/oauth.rb +62 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +240 -0
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +6 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/twiml/voice_response.rb +10 -6
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +11 -2
@@ -444,6 +444,8 @@ module Twilio
|
|
444
444
|
@payments = nil
|
445
445
|
@siprec = nil
|
446
446
|
@streams = nil
|
447
|
+
@user_defined_message_subscriptions = nil
|
448
|
+
@user_defined_messages = nil
|
447
449
|
end
|
448
450
|
|
449
451
|
##
|
@@ -636,6 +638,49 @@ module Twilio
|
|
636
638
|
@streams
|
637
639
|
end
|
638
640
|
|
641
|
+
##
|
642
|
+
# Access the user_defined_message_subscriptions
|
643
|
+
# @return [UserDefinedMessageSubscriptionList]
|
644
|
+
# @return [UserDefinedMessageSubscriptionContext] if sid was passed.
|
645
|
+
def user_defined_message_subscriptions(sid=:unset)
|
646
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
647
|
+
|
648
|
+
if sid != :unset
|
649
|
+
return UserDefinedMessageSubscriptionContext.new(
|
650
|
+
@version,
|
651
|
+
@solution[:account_sid],
|
652
|
+
@solution[:sid],
|
653
|
+
sid,
|
654
|
+
)
|
655
|
+
end
|
656
|
+
|
657
|
+
unless @user_defined_message_subscriptions
|
658
|
+
@user_defined_message_subscriptions = UserDefinedMessageSubscriptionList.new(
|
659
|
+
@version,
|
660
|
+
account_sid: @solution[:account_sid],
|
661
|
+
call_sid: @solution[:sid],
|
662
|
+
)
|
663
|
+
end
|
664
|
+
|
665
|
+
@user_defined_message_subscriptions
|
666
|
+
end
|
667
|
+
|
668
|
+
##
|
669
|
+
# Access the user_defined_messages
|
670
|
+
# @return [UserDefinedMessageList]
|
671
|
+
# @return [UserDefinedMessageContext]
|
672
|
+
def user_defined_messages
|
673
|
+
unless @user_defined_messages
|
674
|
+
@user_defined_messages = UserDefinedMessageList.new(
|
675
|
+
@version,
|
676
|
+
account_sid: @solution[:account_sid],
|
677
|
+
call_sid: @solution[:sid],
|
678
|
+
)
|
679
|
+
end
|
680
|
+
|
681
|
+
@user_defined_messages
|
682
|
+
end
|
683
|
+
|
639
684
|
##
|
640
685
|
# Provide a user friendly representation
|
641
686
|
def to_s
|
@@ -977,6 +1022,20 @@ module Twilio
|
|
977
1022
|
context.streams
|
978
1023
|
end
|
979
1024
|
|
1025
|
+
##
|
1026
|
+
# Access the user_defined_message_subscriptions
|
1027
|
+
# @return [user_defined_message_subscriptions] user_defined_message_subscriptions
|
1028
|
+
def user_defined_message_subscriptions
|
1029
|
+
context.user_defined_message_subscriptions
|
1030
|
+
end
|
1031
|
+
|
1032
|
+
##
|
1033
|
+
# Access the user_defined_messages
|
1034
|
+
# @return [user_defined_messages] user_defined_messages
|
1035
|
+
def user_defined_messages
|
1036
|
+
context.user_defined_messages
|
1037
|
+
end
|
1038
|
+
|
980
1039
|
##
|
981
1040
|
# Provide a user friendly representation
|
982
1041
|
def to_s
|
@@ -449,20 +449,23 @@ module Twilio
|
|
449
449
|
# @param [Boolean] hold Whether the participant should be on hold. Can be: `true`
|
450
450
|
# or `false`. `true` puts the participant on hold, and `false` lets them rejoin
|
451
451
|
# the conference.
|
452
|
-
# @param [String] hold_url The URL we call using the `hold_method` for
|
452
|
+
# @param [String] hold_url The URL we call using the `hold_method` for music that
|
453
453
|
# plays when the participant is on hold. The URL may return an MP3 file, a WAV
|
454
|
-
# file, or a TwiML document that contains
|
455
|
-
#
|
454
|
+
# file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or
|
455
|
+
# `<Redirect>` verbs.
|
456
456
|
# @param [String] hold_method The HTTP method we should use to call `hold_url`.
|
457
457
|
# Can be: `GET` or `POST` and the default is `GET`.
|
458
458
|
# @param [String] announce_url The URL we call using the `announce_method` for an
|
459
|
-
# announcement to the participant. The URL
|
460
|
-
# a TwiML document that contains `<Play
|
459
|
+
# announcement to the participant. The URL may return an MP3 file, a WAV file, or
|
460
|
+
# a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>`
|
461
|
+
# verbs.
|
461
462
|
# @param [String] announce_method The HTTP method we should use to call
|
462
463
|
# `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
463
|
-
# @param [String] wait_url The URL we
|
464
|
-
#
|
465
|
-
#
|
464
|
+
# @param [String] wait_url The URL we call using the `wait_method` for the music
|
465
|
+
# to play while participants are waiting for the conference to start. The URL may
|
466
|
+
# return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`,
|
467
|
+
# `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our
|
468
|
+
# standard hold music. {Learn more about hold
|
466
469
|
# music}[https://www.twilio.com/labs/twimlets/holdmusic].
|
467
470
|
# @param [String] wait_method The HTTP method we should use to call `wait_url`.
|
468
471
|
# Can be `GET` or `POST` and the default is `POST`. When using a static audio
|
@@ -686,20 +689,23 @@ module Twilio
|
|
686
689
|
# @param [Boolean] hold Whether the participant should be on hold. Can be: `true`
|
687
690
|
# or `false`. `true` puts the participant on hold, and `false` lets them rejoin
|
688
691
|
# the conference.
|
689
|
-
# @param [String] hold_url The URL we call using the `hold_method` for
|
692
|
+
# @param [String] hold_url The URL we call using the `hold_method` for music that
|
690
693
|
# plays when the participant is on hold. The URL may return an MP3 file, a WAV
|
691
|
-
# file, or a TwiML document that contains
|
692
|
-
#
|
694
|
+
# file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or
|
695
|
+
# `<Redirect>` verbs.
|
693
696
|
# @param [String] hold_method The HTTP method we should use to call `hold_url`.
|
694
697
|
# Can be: `GET` or `POST` and the default is `GET`.
|
695
698
|
# @param [String] announce_url The URL we call using the `announce_method` for an
|
696
|
-
# announcement to the participant. The URL
|
697
|
-
# a TwiML document that contains `<Play
|
699
|
+
# announcement to the participant. The URL may return an MP3 file, a WAV file, or
|
700
|
+
# a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>`
|
701
|
+
# verbs.
|
698
702
|
# @param [String] announce_method The HTTP method we should use to call
|
699
703
|
# `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
700
|
-
# @param [String] wait_url The URL we
|
701
|
-
#
|
702
|
-
#
|
704
|
+
# @param [String] wait_url The URL we call using the `wait_method` for the music
|
705
|
+
# to play while participants are waiting for the conference to start. The URL may
|
706
|
+
# return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`,
|
707
|
+
# `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our
|
708
|
+
# standard hold music. {Learn more about hold
|
703
709
|
# music}[https://www.twilio.com/labs/twimlets/holdmusic].
|
704
710
|
# @param [String] wait_method The HTTP method we should use to call `wait_url`.
|
705
711
|
# Can be `GET` or `POST` and the default is `POST`. When using a static audio
|
@@ -285,7 +285,7 @@ module Twilio
|
|
285
285
|
'price' => payload['price'],
|
286
286
|
'price_unit' => payload['price_unit'],
|
287
287
|
'status' => payload['status'],
|
288
|
-
'channels' => payload['channels'].to_i,
|
288
|
+
'channels' => payload['channels'] == nil ? payload['channels'] : payload['channels'].to_i,
|
289
289
|
'source' => payload['source'],
|
290
290
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
291
291
|
'encryption_details' => payload['encryption_details'],
|
@@ -244,8 +244,8 @@ module Twilio
|
|
244
244
|
# Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end
|
245
245
|
# the conference and hang up all participants
|
246
246
|
# @param [String] announce_url The URL we should call to announce something into
|
247
|
-
# the conference. The URL
|
248
|
-
# `<Play
|
247
|
+
# the conference. The URL may return an MP3 file, a WAV file, or a TwiML document
|
248
|
+
# that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs.
|
249
249
|
# @param [String] announce_method The HTTP method used to call `announce_url`. Can
|
250
250
|
# be: `GET` or `POST` and the default is `POST`
|
251
251
|
# @return [ConferenceInstance] Updated ConferenceInstance
|
@@ -456,8 +456,8 @@ module Twilio
|
|
456
456
|
# Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end
|
457
457
|
# the conference and hang up all participants
|
458
458
|
# @param [String] announce_url The URL we should call to announce something into
|
459
|
-
# the conference. The URL
|
460
|
-
# `<Play
|
459
|
+
# the conference. The URL may return an MP3 file, a WAV file, or a TwiML document
|
460
|
+
# that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs.
|
461
461
|
# @param [String] announce_method The HTTP method used to call `announce_url`. Can
|
462
462
|
# be: `GET` or `POST` and the default is `POST`
|
463
463
|
# @return [ConferenceInstance] Updated ConferenceInstance
|
@@ -78,12 +78,25 @@ module Twilio
|
|
78
78
|
# @param [Boolean] smart_encoded Whether to detect Unicode characters that have a
|
79
79
|
# similar GSM-7 character and replace them. Can be: `true` or `false`.
|
80
80
|
# @param [Array[String]] persistent_action Rich actions for Channels Messages.
|
81
|
+
# @param [Boolean] shorten_urls Determines the usage of Click Tracking. Setting it
|
82
|
+
# to `true` will instruct Twilio to replace all links in the Message with a
|
83
|
+
# shortened version based on the associated Domain Sid and track clicks on them.
|
84
|
+
# If this parameter is not set on an API call, we will use the value set on the
|
85
|
+
# Messaging Service. If this parameter is not set and the value is not configured
|
86
|
+
# on the Messaging Service used this will default to `false`.
|
81
87
|
# @param [message.ScheduleType] schedule_type Indicates your intent to schedule a
|
82
88
|
# message. Pass the value `fixed` to schedule a message at a fixed time.
|
83
89
|
# @param [Time] send_at The time that Twilio will send the message. Must be in ISO
|
84
90
|
# 8601 format.
|
85
91
|
# @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as
|
86
92
|
# a single MMS message, regardless of the presence of media.
|
93
|
+
# @param [String] content_sid The SID of the Content object returned at Content
|
94
|
+
# API content create time
|
95
|
+
# (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template).
|
96
|
+
# If this parameter is not specified, then the Content API will not be utilized.
|
97
|
+
# @param [String] content_variables Key-value pairs of variable names to
|
98
|
+
# substitution values, used alongside a content_sid. If not specified, Content API
|
99
|
+
# will default to the default variables defined at create time.
|
87
100
|
# @param [String] from A Twilio phone number in
|
88
101
|
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, an {alphanumeric
|
89
102
|
# sender
|
@@ -114,7 +127,7 @@ module Twilio
|
|
114
127
|
# parameters in the POST request. You can include up to 10 `media_url` parameters
|
115
128
|
# per message. You can send images in an SMS message in only the US and Canada.
|
116
129
|
# @return [MessageInstance] Created MessageInstance
|
117
|
-
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
130
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, shorten_urls: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, content_sid: :unset, content_variables: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
118
131
|
data = Twilio::Values.of({
|
119
132
|
'To' => to,
|
120
133
|
'From' => from,
|
@@ -132,9 +145,12 @@ module Twilio
|
|
132
145
|
'AddressRetention' => address_retention,
|
133
146
|
'SmartEncoded' => smart_encoded,
|
134
147
|
'PersistentAction' => Twilio.serialize_list(persistent_action) { |e| e },
|
148
|
+
'ShortenUrls' => shorten_urls,
|
135
149
|
'ScheduleType' => schedule_type,
|
136
150
|
'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
|
137
151
|
'SendAsMms' => send_as_mms,
|
152
|
+
'ContentSid' => content_sid,
|
153
|
+
'ContentVariables' => content_variables,
|
138
154
|
})
|
139
155
|
|
140
156
|
payload = @version.create('POST', @uri, data: data)
|
@@ -242,9 +242,9 @@ module Twilio
|
|
242
242
|
@properties = {
|
243
243
|
'call_sid' => payload['call_sid'],
|
244
244
|
'date_enqueued' => Twilio.deserialize_rfc2822(payload['date_enqueued']),
|
245
|
-
'position' => payload['position'].to_i,
|
245
|
+
'position' => payload['position'] == nil ? payload['position'] : payload['position'].to_i,
|
246
246
|
'uri' => payload['uri'],
|
247
|
-
'wait_time' => payload['wait_time'].to_i,
|
247
|
+
'wait_time' => payload['wait_time'] == nil ? payload['wait_time'] : payload['wait_time'].to_i,
|
248
248
|
'queue_sid' => payload['queue_sid'],
|
249
249
|
}
|
250
250
|
|
@@ -264,14 +264,14 @@ module Twilio
|
|
264
264
|
# Marshaled Properties
|
265
265
|
@properties = {
|
266
266
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
267
|
-
'current_size' => payload['current_size'].to_i,
|
267
|
+
'current_size' => payload['current_size'] == nil ? payload['current_size'] : payload['current_size'].to_i,
|
268
268
|
'friendly_name' => payload['friendly_name'],
|
269
269
|
'uri' => payload['uri'],
|
270
270
|
'account_sid' => payload['account_sid'],
|
271
|
-
'average_wait_time' => payload['average_wait_time'].to_i,
|
271
|
+
'average_wait_time' => payload['average_wait_time'] == nil ? payload['average_wait_time'] : payload['average_wait_time'].to_i,
|
272
272
|
'sid' => payload['sid'],
|
273
273
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
274
|
-
'max_size' => payload['max_size'].to_i,
|
274
|
+
'max_size' => payload['max_size'] == nil ? payload['max_size'] : payload['max_size'].to_i,
|
275
275
|
}
|
276
276
|
|
277
277
|
# Context
|
@@ -234,7 +234,7 @@ module Twilio
|
|
234
234
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
235
235
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
236
236
|
'duration' => payload['duration'],
|
237
|
-
'price' => payload['price'].to_f,
|
237
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
238
238
|
'price_unit' => payload['price_unit'],
|
239
239
|
'recording_sid' => payload['recording_sid'],
|
240
240
|
'sid' => payload['sid'],
|
@@ -329,7 +329,7 @@ module Twilio
|
|
329
329
|
'price' => payload['price'],
|
330
330
|
'price_unit' => payload['price_unit'],
|
331
331
|
'status' => payload['status'],
|
332
|
-
'channels' => payload['channels'].to_i,
|
332
|
+
'channels' => payload['channels'] == nil ? payload['channels'] : payload['channels'].to_i,
|
333
333
|
'source' => payload['source'],
|
334
334
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
335
335
|
'uri' => payload['uri'],
|
@@ -290,7 +290,7 @@ module Twilio
|
|
290
290
|
'account_sid' => payload['account_sid'],
|
291
291
|
'friendly_name' => payload['friendly_name'],
|
292
292
|
'ip_address' => payload['ip_address'],
|
293
|
-
'cidr_prefix_length' => payload['cidr_prefix_length'].to_i,
|
293
|
+
'cidr_prefix_length' => payload['cidr_prefix_length'] == nil ? payload['cidr_prefix_length'] : payload['cidr_prefix_length'].to_i,
|
294
294
|
'ip_access_control_list_sid' => payload['ip_access_control_list_sid'],
|
295
295
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
296
296
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
@@ -218,7 +218,7 @@ module Twilio
|
|
218
218
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
219
219
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
220
220
|
'duration' => payload['duration'],
|
221
|
-
'price' => payload['price'].to_f,
|
221
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
222
222
|
'price_unit' => payload['price_unit'],
|
223
223
|
'recording_sid' => payload['recording_sid'],
|
224
224
|
'sid' => payload['sid'],
|
@@ -230,7 +230,7 @@ module Twilio
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
231
231
|
'description' => payload['description'],
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
233
|
-
'price' => payload['price'].to_f,
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
234
234
|
'price_unit' => payload['price_unit'],
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -230,7 +230,7 @@ module Twilio
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
231
231
|
'description' => payload['description'],
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
233
|
-
'price' => payload['price'].to_f,
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
234
234
|
'price_unit' => payload['price_unit'],
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -230,7 +230,7 @@ module Twilio
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
231
231
|
'description' => payload['description'],
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
233
|
-
'price' => payload['price'].to_f,
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
234
234
|
'price_unit' => payload['price_unit'],
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -230,7 +230,7 @@ module Twilio
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
231
231
|
'description' => payload['description'],
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
233
|
-
'price' => payload['price'].to_f,
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
234
234
|
'price_unit' => payload['price_unit'],
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -230,7 +230,7 @@ module Twilio
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
231
231
|
'description' => payload['description'],
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
233
|
-
'price' => payload['price'].to_f,
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
234
234
|
'price_unit' => payload['price_unit'],
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -230,7 +230,7 @@ module Twilio
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
231
231
|
'description' => payload['description'],
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
233
|
-
'price' => payload['price'].to_f,
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
234
234
|
'price_unit' => payload['price_unit'],
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -230,7 +230,7 @@ module Twilio
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
231
231
|
'description' => payload['description'],
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
233
|
-
'price' => payload['price'].to_f,
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
234
234
|
'price_unit' => payload['price_unit'],
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -230,7 +230,7 @@ module Twilio
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
231
231
|
'description' => payload['description'],
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
233
|
-
'price' => payload['price'].to_f,
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
234
234
|
'price_unit' => payload['price_unit'],
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -303,7 +303,7 @@ module Twilio
|
|
303
303
|
'count_unit' => payload['count_unit'],
|
304
304
|
'description' => payload['description'],
|
305
305
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
306
|
-
'price' => payload['price'].to_f,
|
306
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
307
307
|
'price_unit' => payload['price_unit'],
|
308
308
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
309
309
|
'subresource_uris' => payload['subresource_uris'],
|
@@ -147,8 +147,8 @@ module Twilio
|
|
147
147
|
'account_sid' => payload['account_sid'],
|
148
148
|
'assistant_sid' => payload['assistant_sid'],
|
149
149
|
'task_sid' => payload['task_sid'],
|
150
|
-
'samples_count' => payload['samples_count'].to_i,
|
151
|
-
'fields_count' => payload['fields_count'].to_i,
|
150
|
+
'samples_count' => payload['samples_count'] == nil ? payload['samples_count'] : payload['samples_count'].to_i,
|
151
|
+
'fields_count' => payload['fields_count'] == nil ? payload['fields_count'] : payload['fields_count'].to_i,
|
152
152
|
'url' => payload['url'],
|
153
153
|
}
|
154
154
|
|
@@ -200,7 +200,7 @@ module Twilio
|
|
200
200
|
@properties = {
|
201
201
|
'redirect_to' => payload['redirect_to'],
|
202
202
|
'day' => payload['day'],
|
203
|
-
'size' => payload['size'].to_i,
|
203
|
+
'size' => payload['size'] == nil ? payload['size'] : payload['size'].to_i,
|
204
204
|
'create_date' => payload['create_date'],
|
205
205
|
'friendly_name' => payload['friendly_name'],
|
206
206
|
'resource_type' => payload['resource_type'],
|
@@ -293,7 +293,7 @@ module Twilio
|
|
293
293
|
'was_edited' => payload['was_edited'],
|
294
294
|
'from' => payload['from'],
|
295
295
|
'body' => payload['body'],
|
296
|
-
'index' => payload['index'].to_i,
|
296
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
297
297
|
'url' => payload['url'],
|
298
298
|
}
|
299
299
|
|
@@ -345,8 +345,8 @@ module Twilio
|
|
345
345
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
346
346
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
347
347
|
'created_by' => payload['created_by'],
|
348
|
-
'members_count' => payload['members_count'].to_i,
|
349
|
-
'messages_count' => payload['messages_count'].to_i,
|
348
|
+
'members_count' => payload['members_count'] == nil ? payload['members_count'] : payload['members_count'].to_i,
|
349
|
+
'messages_count' => payload['messages_count'] == nil ? payload['messages_count'] : payload['messages_count'].to_i,
|
350
350
|
'url' => payload['url'],
|
351
351
|
'links' => payload['links'],
|
352
352
|
}
|
@@ -287,7 +287,7 @@ module Twilio
|
|
287
287
|
'is_notifiable' => payload['is_notifiable'],
|
288
288
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
289
289
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
290
|
-
'joined_channels_count' => payload['joined_channels_count'].to_i,
|
290
|
+
'joined_channels_count' => payload['joined_channels_count'] == nil ? payload['joined_channels_count'] : payload['joined_channels_count'].to_i,
|
291
291
|
'links' => payload['links'],
|
292
292
|
'url' => payload['url'],
|
293
293
|
}
|
@@ -489,8 +489,8 @@ module Twilio
|
|
489
489
|
'default_channel_creator_role_sid' => payload['default_channel_creator_role_sid'],
|
490
490
|
'read_status_enabled' => payload['read_status_enabled'],
|
491
491
|
'reachability_enabled' => payload['reachability_enabled'],
|
492
|
-
'typing_indicator_timeout' => payload['typing_indicator_timeout'].to_i,
|
493
|
-
'consumption_report_interval' => payload['consumption_report_interval'].to_i,
|
492
|
+
'typing_indicator_timeout' => payload['typing_indicator_timeout'] == nil ? payload['typing_indicator_timeout'] : payload['typing_indicator_timeout'].to_i,
|
493
|
+
'consumption_report_interval' => payload['consumption_report_interval'] == nil ? payload['consumption_report_interval'] : payload['consumption_report_interval'].to_i,
|
494
494
|
'limits' => payload['limits'],
|
495
495
|
'webhooks' => payload['webhooks'],
|
496
496
|
'pre_webhook_url' => payload['pre_webhook_url'],
|
@@ -344,7 +344,7 @@ module Twilio
|
|
344
344
|
'was_edited' => payload['was_edited'],
|
345
345
|
'from' => payload['from'],
|
346
346
|
'body' => payload['body'],
|
347
|
-
'index' => payload['index'].to_i,
|
347
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
348
348
|
'type' => payload['type'],
|
349
349
|
'media' => payload['media'],
|
350
350
|
'url' => payload['url'],
|
@@ -406,8 +406,8 @@ module Twilio
|
|
406
406
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
407
407
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
408
408
|
'created_by' => payload['created_by'],
|
409
|
-
'members_count' => payload['members_count'].to_i,
|
410
|
-
'messages_count' => payload['messages_count'].to_i,
|
409
|
+
'members_count' => payload['members_count'] == nil ? payload['members_count'] : payload['members_count'].to_i,
|
410
|
+
'messages_count' => payload['messages_count'] == nil ? payload['messages_count'] : payload['messages_count'].to_i,
|
411
411
|
'url' => payload['url'],
|
412
412
|
'links' => payload['links'],
|
413
413
|
}
|
@@ -323,7 +323,7 @@ module Twilio
|
|
323
323
|
'is_notifiable' => payload['is_notifiable'],
|
324
324
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
325
325
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
326
|
-
'joined_channels_count' => payload['joined_channels_count'].to_i,
|
326
|
+
'joined_channels_count' => payload['joined_channels_count'] == nil ? payload['joined_channels_count'] : payload['joined_channels_count'].to_i,
|
327
327
|
'links' => payload['links'],
|
328
328
|
'url' => payload['url'],
|
329
329
|
}
|
@@ -429,15 +429,15 @@ module Twilio
|
|
429
429
|
'default_channel_creator_role_sid' => payload['default_channel_creator_role_sid'],
|
430
430
|
'read_status_enabled' => payload['read_status_enabled'],
|
431
431
|
'reachability_enabled' => payload['reachability_enabled'],
|
432
|
-
'typing_indicator_timeout' => payload['typing_indicator_timeout'].to_i,
|
433
|
-
'consumption_report_interval' => payload['consumption_report_interval'].to_i,
|
432
|
+
'typing_indicator_timeout' => payload['typing_indicator_timeout'] == nil ? payload['typing_indicator_timeout'] : payload['typing_indicator_timeout'].to_i,
|
433
|
+
'consumption_report_interval' => payload['consumption_report_interval'] == nil ? payload['consumption_report_interval'] : payload['consumption_report_interval'].to_i,
|
434
434
|
'limits' => payload['limits'],
|
435
435
|
'pre_webhook_url' => payload['pre_webhook_url'],
|
436
436
|
'post_webhook_url' => payload['post_webhook_url'],
|
437
437
|
'webhook_method' => payload['webhook_method'],
|
438
438
|
'webhook_filters' => payload['webhook_filters'],
|
439
|
-
'pre_webhook_retry_count' => payload['pre_webhook_retry_count'].to_i,
|
440
|
-
'post_webhook_retry_count' => payload['post_webhook_retry_count'].to_i,
|
439
|
+
'pre_webhook_retry_count' => payload['pre_webhook_retry_count'] == nil ? payload['pre_webhook_retry_count'] : payload['pre_webhook_retry_count'].to_i,
|
440
|
+
'post_webhook_retry_count' => payload['post_webhook_retry_count'] == nil ? payload['post_webhook_retry_count'] : payload['post_webhook_retry_count'].to_i,
|
441
441
|
'notifications' => payload['notifications'],
|
442
442
|
'media' => payload['media'],
|
443
443
|
'url' => payload['url'],
|
@@ -129,8 +129,8 @@ module Twilio
|
|
129
129
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
130
130
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
131
131
|
'created_by' => payload['created_by'],
|
132
|
-
'members_count' => payload['members_count'].to_i,
|
133
|
-
'messages_count' => payload['messages_count'].to_i,
|
132
|
+
'members_count' => payload['members_count'] == nil ? payload['members_count'] : payload['members_count'].to_i,
|
133
|
+
'messages_count' => payload['messages_count'] == nil ? payload['messages_count'] : payload['messages_count'].to_i,
|
134
134
|
'messaging_service_sid' => payload['messaging_service_sid'],
|
135
135
|
'url' => payload['url'],
|
136
136
|
}
|
@@ -46,6 +46,7 @@ module Twilio
|
|
46
46
|
@monitor = nil
|
47
47
|
@notify = nil
|
48
48
|
@numbers = nil
|
49
|
+
@oauth = nil
|
49
50
|
@preview = nil
|
50
51
|
@pricing = nil
|
51
52
|
@proxy = nil
|
@@ -259,6 +260,12 @@ module Twilio
|
|
259
260
|
@numbers ||= Numbers.new self
|
260
261
|
end
|
261
262
|
|
263
|
+
##
|
264
|
+
# Access the Oauth Twilio Domain
|
265
|
+
def oauth
|
266
|
+
@oauth ||= Oauth.new self
|
267
|
+
end
|
268
|
+
|
262
269
|
##
|
263
270
|
# Access the Preview Twilio Domain
|
264
271
|
def preview
|
@@ -229,7 +229,7 @@ module Twilio
|
|
229
229
|
'channel_message_sid' => payload['channel_message_sid'],
|
230
230
|
'participant_sid' => payload['participant_sid'],
|
231
231
|
'status' => payload['status'],
|
232
|
-
'error_code' => payload['error_code'].to_i,
|
232
|
+
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
233
233
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
234
234
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
235
235
|
'url' => payload['url'],
|
@@ -319,7 +319,7 @@ module Twilio
|
|
319
319
|
'account_sid' => payload['account_sid'],
|
320
320
|
'conversation_sid' => payload['conversation_sid'],
|
321
321
|
'sid' => payload['sid'],
|
322
|
-
'index' => payload['index'].to_i,
|
322
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
323
323
|
'author' => payload['author'],
|
324
324
|
'body' => payload['body'],
|
325
325
|
'media' => payload['media'],
|
@@ -251,7 +251,7 @@ module Twilio
|
|
251
251
|
'channel_message_sid' => payload['channel_message_sid'],
|
252
252
|
'participant_sid' => payload['participant_sid'],
|
253
253
|
'status' => payload['status'],
|
254
|
-
'error_code' => payload['error_code'].to_i,
|
254
|
+
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
255
255
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
256
256
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
257
257
|
'url' => payload['url'],
|
@@ -349,7 +349,7 @@ module Twilio
|
|
349
349
|
'chat_service_sid' => payload['chat_service_sid'],
|
350
350
|
'conversation_sid' => payload['conversation_sid'],
|
351
351
|
'sid' => payload['sid'],
|
352
|
-
'index' => payload['index'].to_i,
|
352
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
353
353
|
'author' => payload['author'],
|
354
354
|
'body' => payload['body'],
|
355
355
|
'media' => payload['media'],
|