twilio-ruby 5.72.0 → 5.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pr-lint.yml +8 -2
  3. data/.github/workflows/test-and-deploy.yml +3 -3
  4. data/CHANGES.md +234 -0
  5. data/CONTRIBUTING.md +1 -7
  6. data/LICENSE +1 -1
  7. data/README.md +132 -45
  8. data/advanced-examples/custom-http-client.md +170 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
  10. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
  17. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
  21. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
  22. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
  24. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
  25. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  26. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
  27. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
  28. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
  29. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +6 -6
  30. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
  31. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +1 -1
  33. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
  34. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
  35. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
  36. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
  37. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
  38. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
  39. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
  43. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
  44. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
  45. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
  46. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
  47. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
  48. data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
  49. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
  50. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
  51. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
  52. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
  53. data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
  54. data/lib/twilio-ruby/rest/client.rb +14 -0
  55. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
  56. data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
  57. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +240 -0
  58. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
  59. data/lib/twilio-ruby/rest/content/v1.rb +59 -0
  60. data/lib/twilio-ruby/rest/content.rb +59 -0
  61. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
  62. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
  63. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +43 -5
  64. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
  65. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
  66. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +43 -5
  67. data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
  68. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
  69. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
  70. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
  71. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
  72. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +216 -0
  73. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
  74. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
  75. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
  76. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
  77. data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
  78. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
  79. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
  80. data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
  81. data/lib/twilio-ruby/rest/flex_api/v1.rb +122 -0
  82. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
  83. data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
  84. data/lib/twilio-ruby/rest/flex_api.rb +89 -0
  85. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
  86. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +16 -3
  87. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
  88. data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
  89. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
  90. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
  91. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
  92. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
  93. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
  94. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
  95. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
  96. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
  97. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +88 -6
  98. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
  99. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -2
  100. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +1 -1
  101. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +134 -0
  102. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +26 -3
  103. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
  104. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +242 -0
  105. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +226 -0
  106. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +218 -0
  107. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
  108. data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
  109. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +165 -1
  110. data/lib/twilio-ruby/rest/messaging/v1.rb +75 -0
  111. data/lib/twilio-ruby/rest/messaging.rb +36 -0
  112. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
  113. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
  114. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
  115. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +25 -0
  116. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
  117. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +335 -0
  118. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +61 -0
  119. data/lib/twilio-ruby/rest/microvisor/v1.rb +32 -0
  120. data/lib/twilio-ruby/rest/microvisor.rb +16 -0
  121. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
  122. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +111 -0
  123. data/lib/twilio-ruby/rest/numbers/v1.rb +35 -0
  124. data/lib/twilio-ruby/rest/numbers.rb +13 -0
  125. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
  126. data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
  127. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
  128. data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
  129. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
  130. data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
  131. data/lib/twilio-ruby/rest/oauth.rb +68 -0
  132. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  133. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
  134. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
  135. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
  136. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
  137. data/lib/twilio-ruby/rest/preview.rb +0 -33
  138. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
  139. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
  140. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
  141. data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
  142. data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
  143. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
  144. data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
  145. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
  146. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +1 -1
  147. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
  148. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
  149. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
  150. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
  151. data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
  152. data/lib/twilio-ruby/rest/supersim.rb +6 -0
  153. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
  154. data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
  155. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
  156. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
  157. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
  158. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
  159. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
  160. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
  161. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
  162. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
  163. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  164. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
  165. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
  166. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
  167. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
  168. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
  169. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
  170. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
  171. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
  172. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
  173. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
  174. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
  175. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
  176. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
  177. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
  178. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +12 -6
  179. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
  180. data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
  181. data/lib/twilio-ruby/rest/verify/v2/template.rb +10 -3
  182. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
  183. data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
  184. data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
  185. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
  186. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
  187. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
  188. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
  189. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
  190. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  191. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
  192. data/lib/twilio-ruby/twiml/voice_response.rb +132 -33
  193. data/lib/twilio-ruby/version.rb +1 -1
  194. data/twilio-ruby.gemspec +1 -1
  195. metadata +48 -12
  196. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
  197. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
  198. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
  199. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -127,20 +127,8 @@ module Twilio
127
127
  # on create.
128
128
  # @param [Array[Hash]] participants The Participant objects to include in the new
129
129
  # session.
130
- # @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
131
- # the ProxyAllowParticipantConflict account flag, setting to true enables
132
- # per-request opt-in to allowing Proxy to reject a Session create (with
133
- # Participants) request that could cause the same Identifier/ProxyIdentifier pair
134
- # to be active in multiple Sessions. Depending on the context, this could be a 409
135
- # error (Twilio error code 80623) or a 400 error (Twilio error code 80604). If not
136
- # provided, requests will be allowed to succeed and a Debugger notification
137
- # (80802) will be emitted. Having multiple, active Participants with the same
138
- # Identifier/ProxyIdentifier pair causes calls and messages from affected
139
- # Participants to be routed incorrectly. Please note, the default behavior for
140
- # accounts without the ProxyAllowParticipantConflict flag is to reject the request
141
- # as described. This will eventually be the default for all accounts.
142
130
  # @return [SessionInstance] Created SessionInstance
143
- def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset, fail_on_participant_conflict: :unset)
131
+ def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset)
144
132
  data = Twilio::Values.of({
145
133
  'UniqueName' => unique_name,
146
134
  'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry),
@@ -148,7 +136,6 @@ module Twilio
148
136
  'Mode' => mode,
149
137
  'Status' => status,
150
138
  'Participants' => Twilio.serialize_list(participants) { |e| Twilio.serialize_object(e) },
151
- 'FailOnParticipantConflict' => fail_on_participant_conflict,
152
139
  })
153
140
 
154
141
  payload = @version.create('POST', @uri, data: data)
@@ -243,24 +230,12 @@ module Twilio
243
230
  # is measured from the last Session create or the Session's last Interaction.
244
231
  # @param [session.Status] status The new status of the resource. Can be:
245
232
  # `in-progress` to re-open a session or `closed` to close a session.
246
- # @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
247
- # the ProxyAllowParticipantConflict account flag, setting to true enables
248
- # per-request opt-in to allowing Proxy to return a 400 error (Twilio error code
249
- # 80604) when a request to set a Session to in-progress would cause Participants
250
- # with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions.
251
- # If not provided, requests will be allowed to succeed, and a Debugger
252
- # notification (80801) will be emitted. Having multiple, active Participants with
253
- # the same Identifier/ProxyIdentifier pair causes calls and messages from affected
254
- # Participants to be routed incorrectly. Please note, the default behavior for
255
- # accounts without the ProxyAllowParticipantConflict flag is to reject the request
256
- # as described. This will eventually be the default for all accounts.
257
233
  # @return [SessionInstance] Updated SessionInstance
258
- def update(date_expiry: :unset, ttl: :unset, status: :unset, fail_on_participant_conflict: :unset)
234
+ def update(date_expiry: :unset, ttl: :unset, status: :unset)
259
235
  data = Twilio::Values.of({
260
236
  'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry),
261
237
  'Ttl' => ttl,
262
238
  'Status' => status,
263
- 'FailOnParticipantConflict' => fail_on_participant_conflict,
264
239
  })
265
240
 
266
241
  payload = @version.update('POST', @uri, data: data)
@@ -355,7 +330,7 @@ module Twilio
355
330
  'unique_name' => payload['unique_name'],
356
331
  'status' => payload['status'],
357
332
  'closed_reason' => payload['closed_reason'],
358
- 'ttl' => payload['ttl'].to_i,
333
+ 'ttl' => payload['ttl'] == nil ? payload['ttl'] : payload['ttl'].to_i,
359
334
  'mode' => payload['mode'],
360
335
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
361
336
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
@@ -498,25 +473,9 @@ module Twilio
498
473
  # is measured from the last Session create or the Session's last Interaction.
499
474
  # @param [session.Status] status The new status of the resource. Can be:
500
475
  # `in-progress` to re-open a session or `closed` to close a session.
501
- # @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
502
- # the ProxyAllowParticipantConflict account flag, setting to true enables
503
- # per-request opt-in to allowing Proxy to return a 400 error (Twilio error code
504
- # 80604) when a request to set a Session to in-progress would cause Participants
505
- # with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions.
506
- # If not provided, requests will be allowed to succeed, and a Debugger
507
- # notification (80801) will be emitted. Having multiple, active Participants with
508
- # the same Identifier/ProxyIdentifier pair causes calls and messages from affected
509
- # Participants to be routed incorrectly. Please note, the default behavior for
510
- # accounts without the ProxyAllowParticipantConflict flag is to reject the request
511
- # as described. This will eventually be the default for all accounts.
512
476
  # @return [SessionInstance] Updated SessionInstance
513
- def update(date_expiry: :unset, ttl: :unset, status: :unset, fail_on_participant_conflict: :unset)
514
- context.update(
515
- date_expiry: date_expiry,
516
- ttl: ttl,
517
- status: status,
518
- fail_on_participant_conflict: fail_on_participant_conflict,
519
- )
477
+ def update(date_expiry: :unset, ttl: :unset, status: :unset)
478
+ context.update(date_expiry: date_expiry, ttl: ttl, status: status, )
520
479
  end
521
480
 
522
481
  ##
@@ -386,7 +386,7 @@ module Twilio
386
386
  'account_sid' => payload['account_sid'],
387
387
  'chat_instance_sid' => payload['chat_instance_sid'],
388
388
  'callback_url' => payload['callback_url'],
389
- 'default_ttl' => payload['default_ttl'].to_i,
389
+ 'default_ttl' => payload['default_ttl'] == nil ? payload['default_ttl'] : payload['default_ttl'].to_i,
390
390
  'number_selection_behavior' => payload['number_selection_behavior'],
391
391
  'geo_match_level' => payload['geo_match_level'],
392
392
  'intercept_callback_url' => payload['intercept_callback_url'],
@@ -240,7 +240,7 @@ module Twilio
240
240
  'account_sid' => payload['account_sid'],
241
241
  'friendly_name' => payload['friendly_name'],
242
242
  'status' => payload['status'],
243
- 'version' => payload['version'].to_i,
243
+ 'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
244
244
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
245
245
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
246
246
  'url' => payload['url'],
@@ -202,7 +202,7 @@ module Twilio
202
202
  'friendly_name' => payload['friendly_name'],
203
203
  'definition' => payload['definition'],
204
204
  'status' => payload['status'],
205
- 'revision' => payload['revision'].to_i,
205
+ 'revision' => payload['revision'] == nil ? payload['revision'] : payload['revision'].to_i,
206
206
  'commit_message' => payload['commit_message'],
207
207
  'valid' => payload['valid'],
208
208
  'errors' => payload['errors'],
@@ -292,7 +292,7 @@ module Twilio
292
292
  'friendly_name' => payload['friendly_name'],
293
293
  'definition' => payload['definition'],
294
294
  'status' => payload['status'],
295
- 'revision' => payload['revision'].to_i,
295
+ 'revision' => payload['revision'] == nil ? payload['revision'] : payload['revision'].to_i,
296
296
  'commit_message' => payload['commit_message'],
297
297
  'valid' => payload['valid'],
298
298
  'errors' => payload['errors'],
@@ -33,12 +33,18 @@ module Twilio
33
33
  # resource changes from `reserving` to `available`.
34
34
  # @param [String] callback_method The HTTP method we should use to call
35
35
  # `callback_url`. Can be: `GET` or `POST` and the default is POST.
36
+ # @param [Boolean] generate_matching_id When set to `true`, a value for `Eid` does
37
+ # not need to be provided. Instead, when the eSIM profile is reserved, a matching
38
+ # ID will be generated and returned via the `matching_id` property. This
39
+ # identifies the specific eSIM profile that can be used by any capable device to
40
+ # claim and download the profile.
36
41
  # @param [String] eid Identifier of the eUICC that will claim the eSIM Profile.
37
42
  # @return [EsimProfileInstance] Created EsimProfileInstance
38
- def create(callback_url: :unset, callback_method: :unset, eid: :unset)
43
+ def create(callback_url: :unset, callback_method: :unset, generate_matching_id: :unset, eid: :unset)
39
44
  data = Twilio::Values.of({
40
45
  'CallbackUrl' => callback_url,
41
46
  'CallbackMethod' => callback_method,
47
+ 'GenerateMatchingId' => generate_matching_id,
42
48
  'Eid' => eid,
43
49
  })
44
50
 
@@ -250,6 +256,8 @@ module Twilio
250
256
  'status' => payload['status'],
251
257
  'eid' => payload['eid'],
252
258
  'smdp_plus_address' => payload['smdp_plus_address'],
259
+ 'matching_id' => payload['matching_id'],
260
+ 'activation_code' => payload['activation_code'],
253
261
  'error_code' => payload['error_code'],
254
262
  'error_message' => payload['error_message'],
255
263
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
@@ -315,6 +323,18 @@ module Twilio
315
323
  @properties['smdp_plus_address']
316
324
  end
317
325
 
326
+ ##
327
+ # @return [String] Unique identifier of the eSIM profile that be used to identify and download the eSIM profile
328
+ def matching_id
329
+ @properties['matching_id']
330
+ end
331
+
332
+ ##
333
+ # @return [String] Combined machine-readable activation code for acquiring an eSIM Profile with the Activation Code download method
334
+ def activation_code
335
+ @properties['activation_code']
336
+ end
337
+
318
338
  ##
319
339
  # @return [String] Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state
320
340
  def error_code
@@ -311,7 +311,7 @@ module Twilio
311
311
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
312
312
  'url' => payload['url'],
313
313
  'data_enabled' => payload['data_enabled'],
314
- 'data_limit' => payload['data_limit'].to_i,
314
+ 'data_limit' => payload['data_limit'] == nil ? payload['data_limit'] : payload['data_limit'].to_i,
315
315
  'data_metering' => payload['data_metering'],
316
316
  'sms_commands_enabled' => payload['sms_commands_enabled'],
317
317
  'sms_commands_url' => payload['sms_commands_url'],
@@ -30,7 +30,10 @@ module Twilio
30
30
  # @param [String] sim The `sid` or `unique_name` of the {Super
31
31
  # SIM}[https://www.twilio.com/docs/iot/supersim/api/sim-resource] to send the IP
32
32
  # Command to.
33
- # @param [String] payload The payload to be delivered to the device.
33
+ # @param [String] payload The data that will be sent to the device. The payload
34
+ # cannot exceed 1300 bytes. If the PayloadType is set to text, the payload is
35
+ # encoded in UTF-8. If PayloadType is set to binary, the payload is encoded in
36
+ # Base64.
34
37
  # @param [String] device_port The device port to which the IP Command will be
35
38
  # sent.
36
39
  # @param [ip_command.PayloadType] payload_type Indicates how the payload is
@@ -287,7 +290,7 @@ module Twilio
287
290
  'status' => payload['status'],
288
291
  'direction' => payload['direction'],
289
292
  'device_ip' => payload['device_ip'],
290
- 'device_port' => payload['device_port'].to_i,
293
+ 'device_port' => payload['device_port'] == nil ? payload['device_port'] : payload['device_port'].to_i,
291
294
  'payload_type' => payload['payload_type'],
292
295
  'payload' => payload['payload'],
293
296
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
@@ -0,0 +1,247 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Supersim < Domain
12
+ class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
15
+ class SettingsUpdateList < ListResource
16
+ ##
17
+ # Initialize the SettingsUpdateList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [SettingsUpdateList] SettingsUpdateList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ @uri = "/SettingsUpdates"
26
+ end
27
+
28
+ ##
29
+ # Lists SettingsUpdateInstance records from the API as a list.
30
+ # Unlike stream(), this operation is eager and will load `limit` records into
31
+ # memory before returning.
32
+ # @param [String] sim Filter the Settings Updates by a Super SIM's SID or
33
+ # UniqueName.
34
+ # @param [settings_update.Status] status Filter the Settings Updates by status.
35
+ # Can be `scheduled`, `in-progress`, `successful`, or `failed`.
36
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
37
+ # guarantees to never return more than limit. Default is no limit
38
+ # @param [Integer] page_size Number of records to fetch per request, when
39
+ # not set will use the default value of 50 records. If no page_size is defined
40
+ # but a limit is defined, stream() will attempt to read the limit with the most
41
+ # efficient page size, i.e. min(limit, 1000)
42
+ # @return [Array] Array of up to limit results
43
+ def list(sim: :unset, status: :unset, limit: nil, page_size: nil)
44
+ self.stream(sim: sim, status: status, limit: limit, page_size: page_size).entries
45
+ end
46
+
47
+ ##
48
+ # Streams SettingsUpdateInstance records from the API as an Enumerable.
49
+ # This operation lazily loads records as efficiently as possible until the limit
50
+ # is reached.
51
+ # @param [String] sim Filter the Settings Updates by a Super SIM's SID or
52
+ # UniqueName.
53
+ # @param [settings_update.Status] status Filter the Settings Updates by status.
54
+ # Can be `scheduled`, `in-progress`, `successful`, or `failed`.
55
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
56
+ # guarantees to never return more than limit. Default is no limit.
57
+ # @param [Integer] page_size Number of records to fetch per request, when
58
+ # not set will use the default value of 50 records. If no page_size is defined
59
+ # but a limit is defined, stream() will attempt to read the limit with the most
60
+ # efficient page size, i.e. min(limit, 1000)
61
+ # @return [Enumerable] Enumerable that will yield up to limit results
62
+ def stream(sim: :unset, status: :unset, limit: nil, page_size: nil)
63
+ limits = @version.read_limits(limit, page_size)
64
+
65
+ page = self.page(sim: sim, status: status, page_size: limits[:page_size], )
66
+
67
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
68
+ end
69
+
70
+ ##
71
+ # When passed a block, yields SettingsUpdateInstance records from the API.
72
+ # This operation lazily loads records as efficiently as possible until the limit
73
+ # is reached.
74
+ def each
75
+ limits = @version.read_limits
76
+
77
+ page = self.page(page_size: limits[:page_size], )
78
+
79
+ @version.stream(page,
80
+ limit: limits[:limit],
81
+ page_limit: limits[:page_limit]).each {|x| yield x}
82
+ end
83
+
84
+ ##
85
+ # Retrieve a single page of SettingsUpdateInstance records from the API.
86
+ # Request is executed immediately.
87
+ # @param [String] sim Filter the Settings Updates by a Super SIM's SID or
88
+ # UniqueName.
89
+ # @param [settings_update.Status] status Filter the Settings Updates by status.
90
+ # Can be `scheduled`, `in-progress`, `successful`, or `failed`.
91
+ # @param [String] page_token PageToken provided by the API
92
+ # @param [Integer] page_number Page Number, this value is simply for client state
93
+ # @param [Integer] page_size Number of records to return, defaults to 50
94
+ # @return [Page] Page of SettingsUpdateInstance
95
+ def page(sim: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
96
+ params = Twilio::Values.of({
97
+ 'Sim' => sim,
98
+ 'Status' => status,
99
+ 'PageToken' => page_token,
100
+ 'Page' => page_number,
101
+ 'PageSize' => page_size,
102
+ })
103
+
104
+ response = @version.page('GET', @uri, params: params)
105
+
106
+ SettingsUpdatePage.new(@version, response, @solution)
107
+ end
108
+
109
+ ##
110
+ # Retrieve a single page of SettingsUpdateInstance records from the API.
111
+ # Request is executed immediately.
112
+ # @param [String] target_url API-generated URL for the requested results page
113
+ # @return [Page] Page of SettingsUpdateInstance
114
+ def get_page(target_url)
115
+ response = @version.domain.request(
116
+ 'GET',
117
+ target_url
118
+ )
119
+ SettingsUpdatePage.new(@version, response, @solution)
120
+ end
121
+
122
+ ##
123
+ # Provide a user friendly representation
124
+ def to_s
125
+ '#<Twilio.Supersim.V1.SettingsUpdateList>'
126
+ end
127
+ end
128
+
129
+ ##
130
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
131
+ class SettingsUpdatePage < Page
132
+ ##
133
+ # Initialize the SettingsUpdatePage
134
+ # @param [Version] version Version that contains the resource
135
+ # @param [Response] response Response from the API
136
+ # @param [Hash] solution Path solution for the resource
137
+ # @return [SettingsUpdatePage] SettingsUpdatePage
138
+ def initialize(version, response, solution)
139
+ super(version, response)
140
+
141
+ # Path Solution
142
+ @solution = solution
143
+ end
144
+
145
+ ##
146
+ # Build an instance of SettingsUpdateInstance
147
+ # @param [Hash] payload Payload response from the API
148
+ # @return [SettingsUpdateInstance] SettingsUpdateInstance
149
+ def get_instance(payload)
150
+ SettingsUpdateInstance.new(@version, payload, )
151
+ end
152
+
153
+ ##
154
+ # Provide a user friendly representation
155
+ def to_s
156
+ '<Twilio.Supersim.V1.SettingsUpdatePage>'
157
+ end
158
+ end
159
+
160
+ ##
161
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
162
+ class SettingsUpdateInstance < InstanceResource
163
+ ##
164
+ # Initialize the SettingsUpdateInstance
165
+ # @param [Version] version Version that contains the resource
166
+ # @param [Hash] payload payload that contains response from Twilio
167
+ # @return [SettingsUpdateInstance] SettingsUpdateInstance
168
+ def initialize(version, payload)
169
+ super(version)
170
+
171
+ # Marshaled Properties
172
+ @properties = {
173
+ 'sid' => payload['sid'],
174
+ 'iccid' => payload['iccid'],
175
+ 'sim_sid' => payload['sim_sid'],
176
+ 'status' => payload['status'],
177
+ 'packages' => payload['packages'],
178
+ 'date_completed' => Twilio.deserialize_iso8601_datetime(payload['date_completed']),
179
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
180
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
181
+ }
182
+ end
183
+
184
+ ##
185
+ # @return [String] The unique identifier of this Settings Update
186
+ def sid
187
+ @properties['sid']
188
+ end
189
+
190
+ ##
191
+ # @return [String] The ICCID associated with the SIM
192
+ def iccid
193
+ @properties['iccid']
194
+ end
195
+
196
+ ##
197
+ # @return [String] The SID of the Super SIM to which this Settings Update was applied
198
+ def sim_sid
199
+ @properties['sim_sid']
200
+ end
201
+
202
+ ##
203
+ # @return [settings_update.Status] The Status of this Settings Update
204
+ def status
205
+ @properties['status']
206
+ end
207
+
208
+ ##
209
+ # @return [Array[Hash]] Array containing the different Settings Packages that will be applied to the SIM after the update completes
210
+ def packages
211
+ @properties['packages']
212
+ end
213
+
214
+ ##
215
+ # @return [Time] The time when the update successfully completed and the new settings were applied to the SIM
216
+ def date_completed
217
+ @properties['date_completed']
218
+ end
219
+
220
+ ##
221
+ # @return [Time] The date this Settings Update was created
222
+ def date_created
223
+ @properties['date_created']
224
+ end
225
+
226
+ ##
227
+ # @return [Time] The date this Settings Update was last updated
228
+ def date_updated
229
+ @properties['date_updated']
230
+ end
231
+
232
+ ##
233
+ # Provide a user friendly representation
234
+ def to_s
235
+ "<Twilio.Supersim.V1.SettingsUpdateInstance>"
236
+ end
237
+
238
+ ##
239
+ # Provide a detailed, user friendly representation
240
+ def inspect
241
+ "<Twilio.Supersim.V1.SettingsUpdateInstance>"
242
+ end
243
+ end
244
+ end
245
+ end
246
+ end
247
+ end
@@ -58,7 +58,7 @@ module Twilio
58
58
  # @param [sms_command.Status] status The status of the SMS Command. Can be:
59
59
  # `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
60
60
  # Status
61
- # Values}[https://www.twilio.com/docs/wireless/api/smscommand-resource#status-values]
61
+ # Values}[https://www.twilio.com/docs/iot/supersim/api/smscommand-resource#status-values]
62
62
  # for a description of each.
63
63
  # @param [sms_command.Direction] direction The direction of the SMS Command. Can
64
64
  # be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
@@ -90,7 +90,7 @@ module Twilio
90
90
  # @param [sms_command.Status] status The status of the SMS Command. Can be:
91
91
  # `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
92
92
  # Status
93
- # Values}[https://www.twilio.com/docs/wireless/api/smscommand-resource#status-values]
93
+ # Values}[https://www.twilio.com/docs/iot/supersim/api/smscommand-resource#status-values]
94
94
  # for a description of each.
95
95
  # @param [sms_command.Direction] direction The direction of the SMS Command. Can
96
96
  # be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
@@ -133,7 +133,7 @@ module Twilio
133
133
  # @param [sms_command.Status] status The status of the SMS Command. Can be:
134
134
  # `queued`, `sent`, `delivered`, `received` or `failed`. See the {SMS Command
135
135
  # Status
136
- # Values}[https://www.twilio.com/docs/wireless/api/smscommand-resource#status-values]
136
+ # Values}[https://www.twilio.com/docs/iot/supersim/api/smscommand-resource#status-values]
137
137
  # for a description of each.
138
138
  # @param [sms_command.Direction] direction The direction of the SMS Command. Can
139
139
  # be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
@@ -260,10 +260,10 @@ module Twilio
260
260
  'fleet_sid' => payload['fleet_sid'],
261
261
  'iso_country' => payload['iso_country'],
262
262
  'period' => payload['period'],
263
- 'data_upload' => payload['data_upload'].to_i,
264
- 'data_download' => payload['data_download'].to_i,
265
- 'data_total' => payload['data_total'].to_i,
266
- 'data_total_billed' => payload['data_total_billed'].to_f,
263
+ 'data_upload' => payload['data_upload'] == nil ? payload['data_upload'] : payload['data_upload'].to_i,
264
+ 'data_download' => payload['data_download'] == nil ? payload['data_download'] : payload['data_download'].to_i,
265
+ 'data_total' => payload['data_total'] == nil ? payload['data_total'] : payload['data_total'].to_i,
266
+ 'data_total_billed' => payload['data_total_billed'] == nil ? payload['data_total_billed'] : payload['data_total_billed'].to_f,
267
267
  'billed_unit' => payload['billed_unit'],
268
268
  }
269
269
  end
@@ -20,6 +20,7 @@ module Twilio
20
20
  @ip_commands = nil
21
21
  @networks = nil
22
22
  @network_access_profiles = nil
23
+ @settings_updates = nil
23
24
  @sims = nil
24
25
  @sms_commands = nil
25
26
  @usage_records = nil
@@ -100,6 +101,12 @@ module Twilio
100
101
  end
101
102
  end
102
103
 
104
+ ##
105
+ # @return [Twilio::REST::Supersim::V1::SettingsUpdateContext]
106
+ def settings_updates
107
+ @settings_updates ||= SettingsUpdateList.new self
108
+ end
109
+
103
110
  ##
104
111
  # @param [String] sid The SID of the Sim resource to fetch.
105
112
  # @return [Twilio::REST::Supersim::V1::SimContext] if sid was passed.
@@ -73,6 +73,12 @@ module Twilio
73
73
  self.v1.network_access_profiles(sid)
74
74
  end
75
75
 
76
+ ##
77
+ # @return [Twilio::REST::Supersim::V1::SettingsUpdateInstance]
78
+ def settings_updates
79
+ self.v1.settings_updates()
80
+ end
81
+
76
82
  ##
77
83
  # @param [String] sid The unique string that identifies the Sim resource.
78
84
  # @return [Twilio::REST::Supersim::V1::SimInstance] if sid was passed.
@@ -328,7 +328,7 @@ module Twilio
328
328
 
329
329
  # Marshaled Properties
330
330
  @properties = {
331
- 'index' => payload['index'].to_i,
331
+ 'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
332
332
  'account_sid' => payload['account_sid'],
333
333
  'service_sid' => payload['service_sid'],
334
334
  'list_sid' => payload['list_sid'],
@@ -372,7 +372,7 @@ module Twilio
372
372
  'reachability_webhooks_enabled' => payload['reachability_webhooks_enabled'],
373
373
  'acl_enabled' => payload['acl_enabled'],
374
374
  'reachability_debouncing_enabled' => payload['reachability_debouncing_enabled'],
375
- 'reachability_debouncing_window' => payload['reachability_debouncing_window'].to_i,
375
+ 'reachability_debouncing_window' => payload['reachability_debouncing_window'] == nil ? payload['reachability_debouncing_window'] : payload['reachability_debouncing_window'].to_i,
376
376
  'links' => payload['links'],
377
377
  }
378
378
 
@@ -313,7 +313,7 @@ module Twilio
313
313
  'description' => payload['description'],
314
314
  'event_data' => payload['event_data'],
315
315
  'event_date' => Twilio.deserialize_iso8601_datetime(payload['event_date']),
316
- 'event_date_ms' => payload['event_date_ms'].to_i,
316
+ 'event_date_ms' => payload['event_date_ms'] == nil ? payload['event_date_ms'] : payload['event_date_ms'].to_i,
317
317
  'event_type' => payload['event_type'],
318
318
  'resource_sid' => payload['resource_sid'],
319
319
  'resource_type' => payload['resource_type'],
@@ -35,6 +35,7 @@ module Twilio
35
35
  # @param [reservation.Status] reservation_status Returns the list of reservations
36
36
  # for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
37
37
  # `rejected`, or `timeout`.
38
+ # @param [String] worker_sid The SID of the reserved Worker resource to read.
38
39
  # @param [Integer] limit Upper limit for the number of records to return. stream()
39
40
  # guarantees to never return more than limit. Default is no limit
40
41
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -42,8 +43,13 @@ module Twilio
42
43
  # but a limit is defined, stream() will attempt to read the limit with the most
43
44
  # efficient page size, i.e. min(limit, 1000)
44
45
  # @return [Array] Array of up to limit results
45
- def list(reservation_status: :unset, limit: nil, page_size: nil)
46
- self.stream(reservation_status: reservation_status, limit: limit, page_size: page_size).entries
46
+ def list(reservation_status: :unset, worker_sid: :unset, limit: nil, page_size: nil)
47
+ self.stream(
48
+ reservation_status: reservation_status,
49
+ worker_sid: worker_sid,
50
+ limit: limit,
51
+ page_size: page_size
52
+ ).entries
47
53
  end
48
54
 
49
55
  ##
@@ -53,6 +59,7 @@ module Twilio
53
59
  # @param [reservation.Status] reservation_status Returns the list of reservations
54
60
  # for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
55
61
  # `rejected`, or `timeout`.
62
+ # @param [String] worker_sid The SID of the reserved Worker resource to read.
56
63
  # @param [Integer] limit Upper limit for the number of records to return. stream()
57
64
  # guarantees to never return more than limit. Default is no limit.
58
65
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -60,10 +67,14 @@ module Twilio
60
67
  # but a limit is defined, stream() will attempt to read the limit with the most
61
68
  # efficient page size, i.e. min(limit, 1000)
62
69
  # @return [Enumerable] Enumerable that will yield up to limit results
63
- def stream(reservation_status: :unset, limit: nil, page_size: nil)
70
+ def stream(reservation_status: :unset, worker_sid: :unset, limit: nil, page_size: nil)
64
71
  limits = @version.read_limits(limit, page_size)
65
72
 
66
- page = self.page(reservation_status: reservation_status, page_size: limits[:page_size], )
73
+ page = self.page(
74
+ reservation_status: reservation_status,
75
+ worker_sid: worker_sid,
76
+ page_size: limits[:page_size],
77
+ )
67
78
 
68
79
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
69
80
  end
@@ -88,13 +99,15 @@ module Twilio
88
99
  # @param [reservation.Status] reservation_status Returns the list of reservations
89
100
  # for a task with a specified ReservationStatus. Can be: `pending`, `accepted`,
90
101
  # `rejected`, or `timeout`.
102
+ # @param [String] worker_sid The SID of the reserved Worker resource to read.
91
103
  # @param [String] page_token PageToken provided by the API
92
104
  # @param [Integer] page_number Page Number, this value is simply for client state
93
105
  # @param [Integer] page_size Number of records to return, defaults to 50
94
106
  # @return [Page] Page of ReservationInstance
95
- def page(reservation_status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
107
+ def page(reservation_status: :unset, worker_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
96
108
  params = Twilio::Values.of({
97
109
  'ReservationStatus' => reservation_status,
110
+ 'WorkerSid' => worker_sid,
98
111
  'PageToken' => page_token,
99
112
  'Page' => page_number,
100
113
  'PageSize' => page_size,