twilio-ruby 5.52.0 → 5.67.3

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.
Files changed (163) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/pr-lint.yml +15 -0
  3. data/.github/workflows/test-and-deploy.yml +129 -0
  4. data/.gitignore +5 -1
  5. data/.rubocop.yml +1 -1
  6. data/.rubocop_todo.yml +91 -28
  7. data/CHANGES.md +563 -0
  8. data/Gemfile +1 -0
  9. data/Makefile +8 -11
  10. data/README.md +13 -6
  11. data/examples/examples.rb +1 -1
  12. data/lib/rack/twilio_webhook_authentication.rb +25 -1
  13. data/lib/twilio-ruby/http/http_client.rb +20 -4
  14. data/lib/twilio-ruby/http.rb +5 -0
  15. data/lib/twilio-ruby/jwt/access_token.rb +13 -0
  16. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +23 -23
  17. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +8 -8
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +674 -0
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
  21. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +68 -14
  22. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +12 -8
  23. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  24. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
  25. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
  26. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
  27. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
  28. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +18 -5
  29. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +34 -7
  30. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
  31. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
  32. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -8
  33. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -6
  34. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -8
  35. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -8
  36. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -8
  37. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
  38. data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
  39. data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
  40. data/lib/twilio-ruby/rest/chat.rb +16 -0
  41. data/lib/twilio-ruby/rest/client.rb +21 -12
  42. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +454 -0
  43. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
  44. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
  45. data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
  46. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  47. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
  48. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
  49. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
  50. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
  51. data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
  52. data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
  53. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
  54. data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
  55. data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
  56. data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
  57. data/lib/twilio-ruby/rest/conversations/v1.rb +24 -0
  58. data/lib/twilio-ruby/rest/conversations.rb +15 -0
  59. data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
  60. data/lib/twilio-ruby/rest/events/v1/sink.rb +41 -5
  61. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +28 -0
  62. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +55 -34
  63. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
  64. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
  65. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +384 -0
  66. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
  67. data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
  68. data/lib/twilio-ruby/rest/flex_api.rb +9 -0
  69. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +258 -0
  70. data/lib/twilio-ruby/rest/{fax → frontline_api}/v1.rb +11 -11
  71. data/lib/twilio-ruby/rest/{fax.rb → frontline_api.rb} +11 -11
  72. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
  73. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
  74. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
  75. data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
  76. data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
  77. data/lib/twilio-ruby/rest/insights/v1.rb +46 -0
  78. data/lib/twilio-ruby/rest/insights.rb +28 -0
  79. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +268 -0
  80. data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
  81. data/lib/twilio-ruby/rest/lookups.rb +7 -0
  82. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +397 -0
  83. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
  84. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
  85. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +403 -0
  86. data/lib/twilio-ruby/rest/media/v1.rb +76 -0
  87. data/lib/twilio-ruby/rest/media.rb +65 -0
  88. data/lib/twilio-ruby/rest/{fax/v1/fax/fax_media.rb → messaging/v1/brand_registration/brand_vetting.rb} +134 -95
  89. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +127 -2
  90. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
  91. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +187 -20
  92. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
  93. data/lib/twilio-ruby/rest/messaging/v1/service.rb +37 -5
  94. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +268 -0
  95. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  96. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +128 -26
  97. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
  98. data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
  99. data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
  100. data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
  101. data/lib/twilio-ruby/rest/pricing.rb +19 -0
  102. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  103. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  104. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
  105. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
  106. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
  107. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +44 -55
  108. data/lib/twilio-ruby/rest/supersim/v1/{command.rb → ip_command.rb} +132 -84
  109. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
  110. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
  111. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
  112. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +23 -9
  113. data/lib/twilio-ruby/rest/supersim/v1.rb +23 -7
  114. data/lib/twilio-ruby/rest/supersim.rb +15 -6
  115. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
  116. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  117. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
  118. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  119. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  120. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
  121. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
  122. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +38 -22
  123. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  124. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +155 -10
  125. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +12 -9
  126. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +74 -22
  127. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +34 -15
  128. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +66 -31
  129. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
  130. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +25 -7
  131. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
  132. data/lib/twilio-ruby/rest/verify/v2/service.rb +40 -11
  133. data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
  134. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
  135. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
  136. data/lib/twilio-ruby/rest/verify/v2.rb +14 -0
  137. data/lib/twilio-ruby/rest/verify.rb +14 -2
  138. data/lib/twilio-ruby/rest/video/v1/composition.rb +21 -8
  139. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
  140. data/lib/twilio-ruby/rest/video/v1/recording.rb +21 -0
  141. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
  142. data/lib/twilio-ruby/rest/video/v1/room.rb +62 -5
  143. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
  144. data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
  145. data/lib/twilio-ruby/rest/voice.rb +8 -0
  146. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  147. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
  148. data/lib/twilio-ruby/rest.rb +13 -0
  149. data/lib/twilio-ruby/twiml/voice_response.rb +727 -87
  150. data/lib/twilio-ruby/version.rb +1 -1
  151. data/lib/twilio-ruby.rb +6 -16
  152. data/sonar-project.properties +13 -0
  153. data/twilio-ruby.gemspec +1 -2
  154. metadata +59 -32
  155. data/.travis.yml +0 -45
  156. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
  157. /data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
  158. /data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
  159. /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
  160. /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
  161. /data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
  162. /data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
  163. /data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +0 -0
@@ -144,13 +144,15 @@ module Twilio
144
144
  # Calls Beta)
145
145
  # @param [String] call_token A token string needed to invoke a forwarded call. A
146
146
  # call_token is generated when an incoming call is received on a Twilio number.
147
- # this field should be populated by the incoming call's call_token to make this
148
- # outgoing call as a forwarded call of incoming call. A forwarded call should bear
149
- # the same caller-id of incoming call.
147
+ # Pass an incoming call's call_token value to a forwarded call via the call_token
148
+ # parameter when creating a new call. A forwarded call should bear the same
149
+ # CallerID of the original incoming call.
150
150
  # @param [String] recording_track The audio track to record for the call. Can be:
151
151
  # `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
152
152
  # audio that is received by Twilio. `outbound` records the audio that is generated
153
153
  # from Twilio. `both` records the audio that is received and generated by Twilio.
154
+ # @param [String] time_limit The maximum duration of the call in seconds.
155
+ # Constraints depend on account and configuration.
154
156
  # @param [String] url The absolute URL that returns the TwiML instructions for the
155
157
  # call. We will call this URL using the `method` when the call connects. For more
156
158
  # information, see the {Url
@@ -158,11 +160,11 @@ module Twilio
158
160
  # section in {Making Calls}[https://www.twilio.com/docs/voice/make-calls].
159
161
  # @param [String] twiml TwiML instructions for the call Twilio will use without
160
162
  # fetching Twiml from url parameter. If both `twiml` and `url` are provided then
161
- # `twiml` parameter will be ignored.
163
+ # `twiml` parameter will be ignored. Max 4000 characters.
162
164
  # @param [String] application_sid The SID of the Application resource that will
163
165
  # handle the call, if the call will be handled by an application.
164
166
  # @return [CallInstance] Created CallInstance
165
- def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, url: :unset, twiml: :unset, application_sid: :unset)
167
+ def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
166
168
  data = Twilio::Values.of({
167
169
  'To' => to,
168
170
  'From' => from,
@@ -198,6 +200,7 @@ module Twilio
198
200
  'CallReason' => call_reason,
199
201
  'CallToken' => call_token,
200
202
  'RecordingTrack' => recording_track,
203
+ 'TimeLimit' => time_limit,
201
204
  })
202
205
 
203
206
  payload = @version.create('POST', @uri, data: data)
@@ -439,6 +442,8 @@ module Twilio
439
442
  @feedback = nil
440
443
  @events = nil
441
444
  @payments = nil
445
+ @siprec = nil
446
+ @streams = nil
442
447
  end
443
448
 
444
449
  ##
@@ -488,8 +493,10 @@ module Twilio
488
493
  # `POST`. If an `application_sid` parameter is present, this parameter is ignored.
489
494
  # @param [String] twiml TwiML instructions for the call Twilio will use without
490
495
  # fetching Twiml from url. Twiml and url parameters are mutually exclusive
496
+ # @param [String] time_limit The maximum duration of the call in seconds.
497
+ # Constraints depend on account and configuration.
491
498
  # @return [CallInstance] Updated CallInstance
492
- def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
499
+ def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
493
500
  data = Twilio::Values.of({
494
501
  'Url' => url,
495
502
  'Method' => method,
@@ -499,6 +506,7 @@ module Twilio
499
506
  'StatusCallback' => status_callback,
500
507
  'StatusCallbackMethod' => status_callback_method,
501
508
  'Twiml' => twiml,
509
+ 'TimeLimit' => time_limit,
502
510
  })
503
511
 
504
512
  payload = @version.update('POST', @uri, data: data)
@@ -592,6 +600,42 @@ module Twilio
592
600
  @payments
593
601
  end
594
602
 
603
+ ##
604
+ # Access the siprec
605
+ # @return [SiprecList]
606
+ # @return [SiprecContext] if sid was passed.
607
+ def siprec(sid=:unset)
608
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
609
+
610
+ if sid != :unset
611
+ return SiprecContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
612
+ end
613
+
614
+ unless @siprec
615
+ @siprec = SiprecList.new(@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
616
+ end
617
+
618
+ @siprec
619
+ end
620
+
621
+ ##
622
+ # Access the streams
623
+ # @return [StreamList]
624
+ # @return [StreamContext] if sid was passed.
625
+ def streams(sid=:unset)
626
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
627
+
628
+ if sid != :unset
629
+ return StreamContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
630
+ end
631
+
632
+ unless @streams
633
+ @streams = StreamList.new(@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
634
+ end
635
+
636
+ @streams
637
+ end
638
+
595
639
  ##
596
640
  # Provide a user friendly representation
597
641
  def to_s
@@ -640,7 +684,6 @@ module Twilio
640
684
  'price_unit' => payload['price_unit'],
641
685
  'direction' => payload['direction'],
642
686
  'answered_by' => payload['answered_by'],
643
- 'annotation' => payload['annotation'],
644
687
  'api_version' => payload['api_version'],
645
688
  'forwarded_from' => payload['forwarded_from'],
646
689
  'group_sid' => payload['group_sid'],
@@ -775,12 +818,6 @@ module Twilio
775
818
  @properties['answered_by']
776
819
  end
777
820
 
778
- ##
779
- # @return [String] The annotation provided for the call
780
- def annotation
781
- @properties['annotation']
782
- end
783
-
784
821
  ##
785
822
  # @return [String] The API Version used to create the call
786
823
  def api_version
@@ -874,8 +911,10 @@ module Twilio
874
911
  # `POST`. If an `application_sid` parameter is present, this parameter is ignored.
875
912
  # @param [String] twiml TwiML instructions for the call Twilio will use without
876
913
  # fetching Twiml from url. Twiml and url parameters are mutually exclusive
914
+ # @param [String] time_limit The maximum duration of the call in seconds.
915
+ # Constraints depend on account and configuration.
877
916
  # @return [CallInstance] Updated CallInstance
878
- def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
917
+ def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
879
918
  context.update(
880
919
  url: url,
881
920
  method: method,
@@ -885,6 +924,7 @@ module Twilio
885
924
  status_callback: status_callback,
886
925
  status_callback_method: status_callback_method,
887
926
  twiml: twiml,
927
+ time_limit: time_limit,
888
928
  )
889
929
  end
890
930
 
@@ -923,6 +963,20 @@ module Twilio
923
963
  context.payments
924
964
  end
925
965
 
966
+ ##
967
+ # Access the siprec
968
+ # @return [siprec] siprec
969
+ def siprec
970
+ context.siprec
971
+ end
972
+
973
+ ##
974
+ # Access the streams
975
+ # @return [streams] streams
976
+ def streams
977
+ context.streams
978
+ end
979
+
926
980
  ##
927
981
  # Provide a user friendly representation
928
982
  def to_s
@@ -107,8 +107,8 @@ module Twilio
107
107
  # `POST`.
108
108
  # @param [Array[String]] conference_status_callback_event The conference state
109
109
  # changes that should generate a call to `conference_status_callback`. Can be:
110
- # `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`, and `announcement`.
111
- # Separate multiple values with a space. Defaults to `start end`.
110
+ # `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and
111
+ # `announcement`. Separate multiple values with a space. Defaults to `start end`.
112
112
  # @param [String] recording_channels The recording channels for the final
113
113
  # recording. Can be: `mono` or `dual` and the default is `mono`.
114
114
  # @param [String] recording_status_callback The URL that we should call using the
@@ -130,13 +130,14 @@ module Twilio
130
130
  # `POST` and defaults to `POST`.
131
131
  # @param [Array[String]] recording_status_callback_event The recording state
132
132
  # changes that should generate a call to `recording_status_callback`. Can be:
133
- # `in-progress`, `completed`, and `failed`. Separate multiple values with a space.
134
- # The default value is `in-progress completed failed`.
133
+ # `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`,
134
+ # and `absent`. Separate multiple values with a space, ex: `'in-progress completed
135
+ # failed'`.
135
136
  # @param [Array[String]] conference_recording_status_callback_event The conference
136
137
  # recording state changes that generate a call to
137
- # `conference_recording_status_callback`. Can be: `in-progress`, `completed`, and
138
- # `failed`. Separate multiple values with a space. The default value is
139
- # `in-progress completed failed`.
138
+ # `conference_recording_status_callback`. Can be: `in-progress`, `completed`,
139
+ # `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress
140
+ # completed failed'`
140
141
  # @param [Boolean] coaching Whether the participant is coaching another call. Can
141
142
  # be: `true` or `false`. If not present, defaults to `false` unless
142
143
  # `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
@@ -166,8 +167,10 @@ module Twilio
166
167
  # `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
167
168
  # audio that is received by Twilio. `outbound` records the audio that is sent from
168
169
  # Twilio. `both` records the audio that is received and sent by Twilio.
170
+ # @param [String] time_limit The maximum duration of the call in seconds.
171
+ # Constraints depend on account and configuration.
169
172
  # @return [ParticipantInstance] Created ParticipantInstance
170
- def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset)
173
+ def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset, time_limit: :unset)
171
174
  data = Twilio::Values.of({
172
175
  'From' => from,
173
176
  'To' => to,
@@ -207,6 +210,7 @@ module Twilio
207
210
  'CallerId' => caller_id,
208
211
  'CallReason' => call_reason,
209
212
  'RecordingTrack' => recording_track,
213
+ 'TimeLimit' => time_limit,
210
214
  })
211
215
 
212
216
  payload = @version.create('POST', @uri, data: data)
@@ -282,7 +282,7 @@ module Twilio
282
282
  'start_time' => Twilio.deserialize_rfc2822(payload['start_time']),
283
283
  'duration' => payload['duration'],
284
284
  'sid' => payload['sid'],
285
- 'price' => payload['price'].to_f,
285
+ 'price' => payload['price'],
286
286
  'price_unit' => payload['price_unit'],
287
287
  'status' => payload['status'],
288
288
  'channels' => payload['channels'].to_i,
@@ -202,9 +202,9 @@ module Twilio
202
202
  # @param [String] address_sid The SID of the Address resource we should associate
203
203
  # with the new phone number. Some regions require addresses to meet local
204
204
  # regulations.
205
- # @param [local.EmergencyStatus] emergency_status The configuration status
206
- # parameter that determines whether the new phone number is enabled for emergency
207
- # calling.
205
+ # @param [local.EmergencyStatus] emergency_status The parameter displays if
206
+ # emergency calling is enabled for this number. Active numbers may place emergency
207
+ # calls by dialing valid emergency numbers for the country.
208
208
  # @param [String] emergency_address_sid The SID of the emergency address
209
209
  # configuration to use for emergency calling from the new phone number.
210
210
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -331,6 +331,7 @@ module Twilio
331
331
  'voice_url' => payload['voice_url'],
332
332
  'emergency_status' => payload['emergency_status'],
333
333
  'emergency_address_sid' => payload['emergency_address_sid'],
334
+ 'emergency_address_status' => payload['emergency_address_status'],
334
335
  'bundle_sid' => payload['bundle_sid'],
335
336
  'status' => payload['status'],
336
337
  }
@@ -511,7 +512,7 @@ module Twilio
511
512
  end
512
513
 
513
514
  ##
514
- # @return [local.EmergencyStatus] Whether the phone number is enabled for emergency calling
515
+ # @return [local.EmergencyStatus] Displays if emergency calling is enabled for this number.
515
516
  def emergency_status
516
517
  @properties['emergency_status']
517
518
  end
@@ -522,6 +523,12 @@ module Twilio
522
523
  @properties['emergency_address_sid']
523
524
  end
524
525
 
526
+ ##
527
+ # @return [local.EmergencyAddressStatus] State of the emergency address configuration for the phone number
528
+ def emergency_address_status
529
+ @properties['emergency_address_status']
530
+ end
531
+
525
532
  ##
526
533
  # @return [String] The SID of the Bundle resource associated with number
527
534
  def bundle_sid
@@ -201,9 +201,9 @@ module Twilio
201
201
  # @param [String] address_sid The SID of the Address resource we should associate
202
202
  # with the new phone number. Some regions require addresses to meet local
203
203
  # regulations.
204
- # @param [mobile.EmergencyStatus] emergency_status The configuration status
205
- # parameter that determines whether the new phone number is enabled for emergency
206
- # calling.
204
+ # @param [mobile.EmergencyStatus] emergency_status The parameter displays if
205
+ # emergency calling is enabled for this number. Active numbers may place emergency
206
+ # calls by dialing valid emergency numbers for the country.
207
207
  # @param [String] emergency_address_sid The SID of the emergency address
208
208
  # configuration to use for emergency calling from the new phone number.
209
209
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -330,6 +330,7 @@ module Twilio
330
330
  'voice_url' => payload['voice_url'],
331
331
  'emergency_status' => payload['emergency_status'],
332
332
  'emergency_address_sid' => payload['emergency_address_sid'],
333
+ 'emergency_address_status' => payload['emergency_address_status'],
333
334
  'bundle_sid' => payload['bundle_sid'],
334
335
  'status' => payload['status'],
335
336
  }
@@ -510,7 +511,7 @@ module Twilio
510
511
  end
511
512
 
512
513
  ##
513
- # @return [mobile.EmergencyStatus] Whether the phone number is enabled for emergency calling
514
+ # @return [mobile.EmergencyStatus] Displays if emergency calling is enabled for this number.
514
515
  def emergency_status
515
516
  @properties['emergency_status']
516
517
  end
@@ -521,6 +522,12 @@ module Twilio
521
522
  @properties['emergency_address_sid']
522
523
  end
523
524
 
525
+ ##
526
+ # @return [mobile.EmergencyAddressStatus] State of the emergency address configuration for the phone number
527
+ def emergency_address_status
528
+ @properties['emergency_address_status']
529
+ end
530
+
524
531
  ##
525
532
  # @return [String] The SID of the Bundle resource associated with number
526
533
  def bundle_sid
@@ -201,9 +201,9 @@ module Twilio
201
201
  # @param [String] address_sid The SID of the Address resource we should associate
202
202
  # with the new phone number. Some regions require addresses to meet local
203
203
  # regulations.
204
- # @param [toll_free.EmergencyStatus] emergency_status The configuration status
205
- # parameter that determines whether the new phone number is enabled for emergency
206
- # calling.
204
+ # @param [toll_free.EmergencyStatus] emergency_status The parameter displays if
205
+ # emergency calling is enabled for this number. Active numbers may place emergency
206
+ # calls by dialing valid emergency numbers for the country.
207
207
  # @param [String] emergency_address_sid The SID of the emergency address
208
208
  # configuration to use for emergency calling from the new phone number.
209
209
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -330,6 +330,7 @@ module Twilio
330
330
  'voice_url' => payload['voice_url'],
331
331
  'emergency_status' => payload['emergency_status'],
332
332
  'emergency_address_sid' => payload['emergency_address_sid'],
333
+ 'emergency_address_status' => payload['emergency_address_status'],
333
334
  'bundle_sid' => payload['bundle_sid'],
334
335
  'status' => payload['status'],
335
336
  }
@@ -510,7 +511,7 @@ module Twilio
510
511
  end
511
512
 
512
513
  ##
513
- # @return [toll_free.EmergencyStatus] Whether the phone number is enabled for emergency calling
514
+ # @return [toll_free.EmergencyStatus] Displays if emergency calling is enabled for this number.
514
515
  def emergency_status
515
516
  @properties['emergency_status']
516
517
  end
@@ -521,6 +522,12 @@ module Twilio
521
522
  @properties['emergency_address_sid']
522
523
  end
523
524
 
525
+ ##
526
+ # @return [toll_free.EmergencyAddressStatus] State of the emergency address configuration for the phone number
527
+ def emergency_address_status
528
+ @properties['emergency_address_status']
529
+ end
530
+
524
531
  ##
525
532
  # @return [String] The SID of the Bundle resource associated with number
526
533
  def bundle_sid
@@ -199,9 +199,9 @@ module Twilio
199
199
  # @param [String] voice_url The URL that we should call to answer a call to the
200
200
  # new phone number. The `voice_url` will not be called if a
201
201
  # `voice_application_sid` or a `trunk_sid` is set.
202
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
203
- # configuration status parameter that determines whether the new phone number is
204
- # enabled for emergency calling.
202
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
203
+ # displays if emergency calling is enabled for this number. Active numbers may
204
+ # place emergency calls by dialing valid emergency numbers for the country.
205
205
  # @param [String] emergency_address_sid The SID of the emergency address
206
206
  # configuration to use for emergency calling from the new phone number.
207
207
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -387,9 +387,9 @@ module Twilio
387
387
  # @param [String] voice_url The URL that we should call to answer a call to the
388
388
  # phone number. The `voice_url` will not be called if a `voice_application_sid` or
389
389
  # a `trunk_sid` is set.
390
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
391
- # configuration status parameter that determines whether the phone number is
392
- # enabled for emergency calling.
390
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
391
+ # displays if emergency calling is enabled for this number. Active numbers may
392
+ # place emergency calls by dialing valid emergency numbers for the country.
393
393
  # @param [String] emergency_address_sid The SID of the emergency address
394
394
  # configuration to use for emergency calling from this phone number.
395
395
  # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
@@ -550,6 +550,7 @@ module Twilio
550
550
  'voice_url' => payload['voice_url'],
551
551
  'emergency_status' => payload['emergency_status'],
552
552
  'emergency_address_sid' => payload['emergency_address_sid'],
553
+ 'emergency_address_status' => payload['emergency_address_status'],
553
554
  'bundle_sid' => payload['bundle_sid'],
554
555
  'status' => payload['status'],
555
556
  }
@@ -745,7 +746,7 @@ module Twilio
745
746
  end
746
747
 
747
748
  ##
748
- # @return [incoming_phone_number.EmergencyStatus] Whether the phone number is enabled for emergency calling
749
+ # @return [incoming_phone_number.EmergencyStatus] Displays if emergency calling is enabled for this number.
749
750
  def emergency_status
750
751
  @properties['emergency_status']
751
752
  end
@@ -756,6 +757,12 @@ module Twilio
756
757
  @properties['emergency_address_sid']
757
758
  end
758
759
 
760
+ ##
761
+ # @return [incoming_phone_number.EmergencyAddressStatus] State of the emergency address configuration for the phone number
762
+ def emergency_address_status
763
+ @properties['emergency_address_status']
764
+ end
765
+
759
766
  ##
760
767
  # @return [String] The SID of the Bundle resource associated with number
761
768
  def bundle_sid
@@ -812,9 +819,9 @@ module Twilio
812
819
  # @param [String] voice_url The URL that we should call to answer a call to the
813
820
  # phone number. The `voice_url` will not be called if a `voice_application_sid` or
814
821
  # a `trunk_sid` is set.
815
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
816
- # configuration status parameter that determines whether the phone number is
817
- # enabled for emergency calling.
822
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
823
+ # displays if emergency calling is enabled for this number. Active numbers may
824
+ # place emergency calls by dialing valid emergency numbers for the country.
818
825
  # @param [String] emergency_address_sid The SID of the emergency address
819
826
  # configuration to use for emergency calling from this phone number.
820
827
  # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
@@ -78,6 +78,12 @@ 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 [message.ScheduleType] schedule_type Indicates your intent to schedule a
82
+ # message. Pass the value `fixed` to schedule a message at a fixed time.
83
+ # @param [Time] send_at The time that Twilio will send the message. Must be in ISO
84
+ # 8601 format.
85
+ # @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as
86
+ # a single MMS message, regardless of the presence of media.
81
87
  # @param [String] from A Twilio phone number in
82
88
  # {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, an {alphanumeric
83
89
  # sender
@@ -108,7 +114,7 @@ module Twilio
108
114
  # parameters in the POST request. You can include up to 10 `media_url` parameters
109
115
  # per message. You can send images in an SMS message in only the US and Canada.
110
116
  # @return [MessageInstance] Created MessageInstance
111
- 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, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
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)
112
118
  data = Twilio::Values.of({
113
119
  'To' => to,
114
120
  'From' => from,
@@ -126,6 +132,9 @@ module Twilio
126
132
  'AddressRetention' => address_retention,
127
133
  'SmartEncoded' => smart_encoded,
128
134
  'PersistentAction' => Twilio.serialize_list(persistent_action) { |e| e },
135
+ 'ScheduleType' => schedule_type,
136
+ 'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
137
+ 'SendAsMms' => send_as_mms,
129
138
  })
130
139
 
131
140
  payload = @version.create('POST', @uri, data: data)
@@ -329,9 +338,11 @@ module Twilio
329
338
  # Update the MessageInstance
330
339
  # @param [String] body The text of the message you want to send. Can be up to
331
340
  # 1,600 characters long.
341
+ # @param [message.UpdateStatus] status When set as `canceled`, allows a message
342
+ # cancelation request if a message has not yet been sent.
332
343
  # @return [MessageInstance] Updated MessageInstance
333
- def update(body: nil)
334
- data = Twilio::Values.of({'Body' => body, })
344
+ def update(body: :unset, status: :unset)
345
+ data = Twilio::Values.of({'Body' => body, 'Status' => status, })
335
346
 
336
347
  payload = @version.update('POST', @uri, data: data)
337
348
 
@@ -579,9 +590,11 @@ module Twilio
579
590
  # Update the MessageInstance
580
591
  # @param [String] body The text of the message you want to send. Can be up to
581
592
  # 1,600 characters long.
593
+ # @param [message.UpdateStatus] status When set as `canceled`, allows a message
594
+ # cancelation request if a message has not yet been sent.
582
595
  # @return [MessageInstance] Updated MessageInstance
583
- def update(body: nil)
584
- context.update(body: body, )
596
+ def update(body: :unset, status: :unset)
597
+ context.update(body: body, status: status, )
585
598
  end
586
599
 
587
600
  ##
@@ -39,6 +39,9 @@ module Twilio
39
39
  # to read.
40
40
  # @param [String] conference_sid The Conference SID that identifies the conference
41
41
  # associated with the recording to read.
42
+ # @param [Boolean] include_soft_deleted A boolean parameter indicating whether to
43
+ # retrieve soft deleted recordings or not. Recordings metadata are kept after
44
+ # deletion for a retention period of 40 days.
42
45
  # @param [Integer] limit Upper limit for the number of records to return. stream()
43
46
  # guarantees to never return more than limit. Default is no limit
44
47
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -46,13 +49,14 @@ module Twilio
46
49
  # but a limit is defined, stream() will attempt to read the limit with the most
47
50
  # efficient page size, i.e. min(limit, 1000)
48
51
  # @return [Array] Array of up to limit results
49
- def list(date_created_before: :unset, date_created: :unset, date_created_after: :unset, call_sid: :unset, conference_sid: :unset, limit: nil, page_size: nil)
52
+ def list(date_created_before: :unset, date_created: :unset, date_created_after: :unset, call_sid: :unset, conference_sid: :unset, include_soft_deleted: :unset, limit: nil, page_size: nil)
50
53
  self.stream(
51
54
  date_created_before: date_created_before,
52
55
  date_created: date_created,
53
56
  date_created_after: date_created_after,
54
57
  call_sid: call_sid,
55
58
  conference_sid: conference_sid,
59
+ include_soft_deleted: include_soft_deleted,
56
60
  limit: limit,
57
61
  page_size: page_size
58
62
  ).entries
@@ -70,6 +74,9 @@ module Twilio
70
74
  # to read.
71
75
  # @param [String] conference_sid The Conference SID that identifies the conference
72
76
  # associated with the recording to read.
77
+ # @param [Boolean] include_soft_deleted A boolean parameter indicating whether to
78
+ # retrieve soft deleted recordings or not. Recordings metadata are kept after
79
+ # deletion for a retention period of 40 days.
73
80
  # @param [Integer] limit Upper limit for the number of records to return. stream()
74
81
  # guarantees to never return more than limit. Default is no limit.
75
82
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -77,7 +84,7 @@ module Twilio
77
84
  # but a limit is defined, stream() will attempt to read the limit with the most
78
85
  # efficient page size, i.e. min(limit, 1000)
79
86
  # @return [Enumerable] Enumerable that will yield up to limit results
80
- def stream(date_created_before: :unset, date_created: :unset, date_created_after: :unset, call_sid: :unset, conference_sid: :unset, limit: nil, page_size: nil)
87
+ def stream(date_created_before: :unset, date_created: :unset, date_created_after: :unset, call_sid: :unset, conference_sid: :unset, include_soft_deleted: :unset, limit: nil, page_size: nil)
81
88
  limits = @version.read_limits(limit, page_size)
82
89
 
83
90
  page = self.page(
@@ -86,6 +93,7 @@ module Twilio
86
93
  date_created_after: date_created_after,
87
94
  call_sid: call_sid,
88
95
  conference_sid: conference_sid,
96
+ include_soft_deleted: include_soft_deleted,
89
97
  page_size: limits[:page_size],
90
98
  )
91
99
 
@@ -117,17 +125,21 @@ module Twilio
117
125
  # to read.
118
126
  # @param [String] conference_sid The Conference SID that identifies the conference
119
127
  # associated with the recording to read.
128
+ # @param [Boolean] include_soft_deleted A boolean parameter indicating whether to
129
+ # retrieve soft deleted recordings or not. Recordings metadata are kept after
130
+ # deletion for a retention period of 40 days.
120
131
  # @param [String] page_token PageToken provided by the API
121
132
  # @param [Integer] page_number Page Number, this value is simply for client state
122
133
  # @param [Integer] page_size Number of records to return, defaults to 50
123
134
  # @return [Page] Page of RecordingInstance
124
- def page(date_created_before: :unset, date_created: :unset, date_created_after: :unset, call_sid: :unset, conference_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
135
+ def page(date_created_before: :unset, date_created: :unset, date_created_after: :unset, call_sid: :unset, conference_sid: :unset, include_soft_deleted: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
125
136
  params = Twilio::Values.of({
126
137
  'DateCreated<' => Twilio.serialize_iso8601_datetime(date_created_before),
127
138
  'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
128
139
  'DateCreated>' => Twilio.serialize_iso8601_datetime(date_created_after),
129
140
  'CallSid' => call_sid,
130
141
  'ConferenceSid' => conference_sid,
142
+ 'IncludeSoftDeleted' => include_soft_deleted,
131
143
  'PageToken' => page_token,
132
144
  'Page' => page_number,
133
145
  'PageSize' => page_size,
@@ -211,9 +223,14 @@ module Twilio
211
223
 
212
224
  ##
213
225
  # Fetch the RecordingInstance
226
+ # @param [Boolean] include_soft_deleted A boolean parameter indicating whether to
227
+ # retrieve soft deleted recordings or not. Recordings metadata are kept after
228
+ # deletion for a retention period of 40 days.
214
229
  # @return [RecordingInstance] Fetched RecordingInstance
215
- def fetch
216
- payload = @version.fetch('GET', @uri)
230
+ def fetch(include_soft_deleted: :unset)
231
+ params = Twilio::Values.of({'IncludeSoftDeleted' => include_soft_deleted, })
232
+
233
+ payload = @version.fetch('GET', @uri, params: params)
217
234
 
218
235
  RecordingInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], )
219
236
  end
@@ -318,6 +335,7 @@ module Twilio
318
335
  'uri' => payload['uri'],
319
336
  'encryption_details' => payload['encryption_details'],
320
337
  'subresource_uris' => payload['subresource_uris'],
338
+ 'media_url' => payload['media_url'],
321
339
  }
322
340
 
323
341
  # Context
@@ -444,11 +462,20 @@ module Twilio
444
462
  @properties['subresource_uris']
445
463
  end
446
464
 
465
+ ##
466
+ # @return [String] The URL of the media file.
467
+ def media_url
468
+ @properties['media_url']
469
+ end
470
+
447
471
  ##
448
472
  # Fetch the RecordingInstance
473
+ # @param [Boolean] include_soft_deleted A boolean parameter indicating whether to
474
+ # retrieve soft deleted recordings or not. Recordings metadata are kept after
475
+ # deletion for a retention period of 40 days.
449
476
  # @return [RecordingInstance] Fetched RecordingInstance
450
- def fetch
451
- context.fetch
477
+ def fetch(include_soft_deleted: :unset)
478
+ context.fetch(include_soft_deleted: include_soft_deleted, )
452
479
  end
453
480
 
454
481
  ##