twilio-ruby 5.41.0 → 5.45.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +99 -0
  3. data/{LICENSE.md → LICENSE} +0 -0
  4. data/PULL_REQUEST_TEMPLATE.md +3 -3
  5. data/README.md +18 -2
  6. data/lib/twilio-ruby.rb +1 -1
  7. data/lib/twilio-ruby/jwt/access_token.rb +7 -2
  8. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
  12. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
  13. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
  14. data/lib/twilio-ruby/rest/client.rb +29 -3
  15. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
  16. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
  17. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
  18. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
  19. data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
  20. data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
  21. data/lib/twilio-ruby/rest/flex_api.rb +1 -1
  22. data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
  23. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
  24. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
  25. data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
  26. data/lib/twilio-ruby/rest/insights.rb +8 -0
  27. data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
  28. data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
  29. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
  30. data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
  31. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
  32. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
  33. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
  34. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
  35. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
  36. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
  37. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
  38. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
  39. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
  40. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
  41. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
  42. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
  43. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
  44. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
  45. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
  46. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
  47. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
  48. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
  49. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
  50. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
  51. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
  52. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
  53. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
  54. data/lib/twilio-ruby/rest/preview.rb +0 -21
  55. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
  56. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
  57. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
  58. data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
  59. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
  60. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
  61. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
  62. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
  63. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
  64. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
  65. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
  66. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
  67. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  68. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
  69. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
  70. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
  71. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
  72. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
  73. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
  74. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
  75. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
  76. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
  77. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
  78. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
  79. data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
  80. data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
  81. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
  82. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
  83. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +27 -49
  84. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +24 -42
  85. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
  86. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
  87. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
  88. data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
  89. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
  90. data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
  91. data/lib/twilio-ruby/util/configuration.rb +5 -1
  92. data/lib/twilio-ruby/version.rb +1 -1
  93. data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
  94. data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
  95. data/spec/integration/api/v2010/account/call_spec.rb +20 -10
  96. data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
  97. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
  98. data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
  99. data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
  100. data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
  101. data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
  102. data/spec/integration/conversations/v1/user_spec.rb +9 -4
  103. data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
  104. data/spec/integration/events/v1/subscription_spec.rb +49 -0
  105. data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
  106. data/spec/integration/insights/v1/room_spec.rb +164 -0
  107. data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
  108. data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
  109. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
  110. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
  111. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
  112. data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
  113. data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
  114. data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
  115. data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
  116. data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
  117. data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
  118. data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
  119. data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
  120. data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
  121. data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
  122. data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
  123. data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
  124. data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
  125. data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
  126. data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
  127. data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
  128. data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
  129. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
  130. data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
  131. data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
  132. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +4 -12
  133. data/spec/integration/verify/v2/service/entity/factor_spec.rb +5 -15
  134. data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
  135. data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
  136. data/spec/integration/video/v1/room_spec.rb +10 -5
  137. data/spec/jwt/access_token_spec.rb +9 -1
  138. data/spec/rest/client_spec.rb +24 -2
  139. data/twilio-ruby.gemspec +2 -1
  140. metadata +30 -19
  141. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
  142. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
  143. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
  144. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
  145. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
  146. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
  147. data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
  148. data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
  149. data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
  150. data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -13,7 +13,7 @@ module Twilio
13
13
  class ServiceContext < InstanceContext
14
14
  class EnvironmentContext < InstanceContext
15
15
  ##
16
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
16
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
17
17
  class VariableList < ListResource
18
18
  ##
19
19
  # Initialize the VariableList
@@ -139,7 +139,7 @@ module Twilio
139
139
  end
140
140
 
141
141
  ##
142
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
142
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
143
143
  class VariablePage < Page
144
144
  ##
145
145
  # Initialize the VariablePage
@@ -175,7 +175,7 @@ module Twilio
175
175
  end
176
176
 
177
177
  ##
178
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
178
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
179
179
  class VariableContext < InstanceContext
180
180
  ##
181
181
  # Initialize the VariableContext
@@ -253,7 +253,7 @@ module Twilio
253
253
  end
254
254
 
255
255
  ##
256
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
256
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
257
257
  class VariableInstance < InstanceResource
258
258
  ##
259
259
  # Initialize the VariableInstance
@@ -12,7 +12,7 @@ module Twilio
12
12
  class V1 < Version
13
13
  class ServiceContext < InstanceContext
14
14
  ##
15
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
16
  class FunctionList < ListResource
17
17
  ##
18
18
  # Initialize the FunctionList
@@ -129,7 +129,7 @@ module Twilio
129
129
  end
130
130
 
131
131
  ##
132
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
132
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
133
133
  class FunctionPage < Page
134
134
  ##
135
135
  # Initialize the FunctionPage
@@ -160,7 +160,7 @@ module Twilio
160
160
  end
161
161
 
162
162
  ##
163
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
163
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
164
164
  class FunctionContext < InstanceContext
165
165
  ##
166
166
  # Initialize the FunctionContext
@@ -247,7 +247,7 @@ module Twilio
247
247
  end
248
248
 
249
249
  ##
250
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
250
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
251
251
  class FunctionInstance < InstanceResource
252
252
  ##
253
253
  # Initialize the FunctionInstance
@@ -13,7 +13,7 @@ module Twilio
13
13
  class ServiceContext < InstanceContext
14
14
  class FunctionContext < InstanceContext
15
15
  ##
16
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
16
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
17
17
  class FunctionVersionList < ListResource
18
18
  ##
19
19
  # Initialize the FunctionVersionList
@@ -119,7 +119,7 @@ module Twilio
119
119
  end
120
120
 
121
121
  ##
122
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
122
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
123
123
  class FunctionVersionPage < Page
124
124
  ##
125
125
  # Initialize the FunctionVersionPage
@@ -155,7 +155,7 @@ module Twilio
155
155
  end
156
156
 
157
157
  ##
158
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
158
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
159
159
  class FunctionVersionContext < InstanceContext
160
160
  ##
161
161
  # Initialize the FunctionVersionContext
@@ -221,7 +221,7 @@ module Twilio
221
221
  end
222
222
 
223
223
  ##
224
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
224
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
225
225
  class FunctionVersionInstance < InstanceResource
226
226
  ##
227
227
  # Initialize the FunctionVersionInstance
@@ -14,7 +14,7 @@ module Twilio
14
14
  class FunctionContext < InstanceContext
15
15
  class FunctionVersionContext < InstanceContext
16
16
  ##
17
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
17
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
18
18
  class FunctionVersionContentList < ListResource
19
19
  ##
20
20
  # Initialize the FunctionVersionContentList
@@ -41,7 +41,7 @@ module Twilio
41
41
  end
42
42
 
43
43
  ##
44
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
44
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
45
45
  class FunctionVersionContentPage < Page
46
46
  ##
47
47
  # Initialize the FunctionVersionContentPage
@@ -78,7 +78,7 @@ module Twilio
78
78
  end
79
79
 
80
80
  ##
81
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
81
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
82
82
  class FunctionVersionContentContext < InstanceContext
83
83
  ##
84
84
  # Initialize the FunctionVersionContentContext
@@ -128,7 +128,7 @@ module Twilio
128
128
  end
129
129
 
130
130
  ##
131
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
131
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
132
132
  class FunctionVersionContentInstance < InstanceResource
133
133
  ##
134
134
  # Initialize the FunctionVersionContentInstance
@@ -58,6 +58,9 @@ module Twilio
58
58
  # Lists DocumentInstance records from the API as a list.
59
59
  # Unlike stream(), this operation is eager and will load `limit` records into
60
60
  # memory before returning.
61
+ # @param [document.HideExpiredType] hide_expired The default list of Sync
62
+ # Documents will show both active and expired items. It is possible to filter only
63
+ # the active ones by hiding the expired ones.
61
64
  # @param [Integer] limit Upper limit for the number of records to return. stream()
62
65
  # guarantees to never return more than limit. Default is no limit
63
66
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,14 +68,17 @@ module Twilio
65
68
  # but a limit is defined, stream() will attempt to read the limit with the most
66
69
  # efficient page size, i.e. min(limit, 1000)
67
70
  # @return [Array] Array of up to limit results
68
- def list(limit: nil, page_size: nil)
69
- self.stream(limit: limit, page_size: page_size).entries
71
+ def list(hide_expired: :unset, limit: nil, page_size: nil)
72
+ self.stream(hide_expired: hide_expired, limit: limit, page_size: page_size).entries
70
73
  end
71
74
 
72
75
  ##
73
76
  # Streams DocumentInstance records from the API as an Enumerable.
74
77
  # This operation lazily loads records as efficiently as possible until the limit
75
78
  # is reached.
79
+ # @param [document.HideExpiredType] hide_expired The default list of Sync
80
+ # Documents will show both active and expired items. It is possible to filter only
81
+ # the active ones by hiding the expired ones.
76
82
  # @param [Integer] limit Upper limit for the number of records to return. stream()
77
83
  # guarantees to never return more than limit. Default is no limit.
78
84
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -80,10 +86,10 @@ module Twilio
80
86
  # but a limit is defined, stream() will attempt to read the limit with the most
81
87
  # efficient page size, i.e. min(limit, 1000)
82
88
  # @return [Enumerable] Enumerable that will yield up to limit results
83
- def stream(limit: nil, page_size: nil)
89
+ def stream(hide_expired: :unset, limit: nil, page_size: nil)
84
90
  limits = @version.read_limits(limit, page_size)
85
91
 
86
- page = self.page(page_size: limits[:page_size], )
92
+ page = self.page(hide_expired: hide_expired, page_size: limits[:page_size], )
87
93
 
88
94
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
89
95
  end
@@ -105,12 +111,16 @@ module Twilio
105
111
  ##
106
112
  # Retrieve a single page of DocumentInstance records from the API.
107
113
  # Request is executed immediately.
114
+ # @param [document.HideExpiredType] hide_expired The default list of Sync
115
+ # Documents will show both active and expired items. It is possible to filter only
116
+ # the active ones by hiding the expired ones.
108
117
  # @param [String] page_token PageToken provided by the API
109
118
  # @param [Integer] page_number Page Number, this value is simply for client state
110
119
  # @param [Integer] page_size Number of records to return, defaults to 50
111
120
  # @return [Page] Page of DocumentInstance
112
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
121
+ def page(hide_expired: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
113
122
  params = Twilio::Values.of({
123
+ 'HideExpired' => hide_expired,
114
124
  'PageToken' => page_token,
115
125
  'Page' => page_number,
116
126
  'PageSize' => page_size,
@@ -59,6 +59,9 @@ module Twilio
59
59
  # Lists SyncListInstance records from the API as a list.
60
60
  # Unlike stream(), this operation is eager and will load `limit` records into
61
61
  # memory before returning.
62
+ # @param [sync_list.HideExpiredType] hide_expired The default list of Sync Lists
63
+ # will show both active and expired items. It is possible to filter only the
64
+ # active ones by hiding the expired ones.
62
65
  # @param [Integer] limit Upper limit for the number of records to return. stream()
63
66
  # guarantees to never return more than limit. Default is no limit
64
67
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -66,14 +69,17 @@ module Twilio
66
69
  # but a limit is defined, stream() will attempt to read the limit with the most
67
70
  # efficient page size, i.e. min(limit, 1000)
68
71
  # @return [Array] Array of up to limit results
69
- def list(limit: nil, page_size: nil)
70
- self.stream(limit: limit, page_size: page_size).entries
72
+ def list(hide_expired: :unset, limit: nil, page_size: nil)
73
+ self.stream(hide_expired: hide_expired, limit: limit, page_size: page_size).entries
71
74
  end
72
75
 
73
76
  ##
74
77
  # Streams SyncListInstance records from the API as an Enumerable.
75
78
  # This operation lazily loads records as efficiently as possible until the limit
76
79
  # is reached.
80
+ # @param [sync_list.HideExpiredType] hide_expired The default list of Sync Lists
81
+ # will show both active and expired items. It is possible to filter only the
82
+ # active ones by hiding the expired ones.
77
83
  # @param [Integer] limit Upper limit for the number of records to return. stream()
78
84
  # guarantees to never return more than limit. Default is no limit.
79
85
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -81,10 +87,10 @@ module Twilio
81
87
  # but a limit is defined, stream() will attempt to read the limit with the most
82
88
  # efficient page size, i.e. min(limit, 1000)
83
89
  # @return [Enumerable] Enumerable that will yield up to limit results
84
- def stream(limit: nil, page_size: nil)
90
+ def stream(hide_expired: :unset, limit: nil, page_size: nil)
85
91
  limits = @version.read_limits(limit, page_size)
86
92
 
87
- page = self.page(page_size: limits[:page_size], )
93
+ page = self.page(hide_expired: hide_expired, page_size: limits[:page_size], )
88
94
 
89
95
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
90
96
  end
@@ -106,12 +112,16 @@ module Twilio
106
112
  ##
107
113
  # Retrieve a single page of SyncListInstance records from the API.
108
114
  # Request is executed immediately.
115
+ # @param [sync_list.HideExpiredType] hide_expired The default list of Sync Lists
116
+ # will show both active and expired items. It is possible to filter only the
117
+ # active ones by hiding the expired ones.
109
118
  # @param [String] page_token PageToken provided by the API
110
119
  # @param [Integer] page_number Page Number, this value is simply for client state
111
120
  # @param [Integer] page_size Number of records to return, defaults to 50
112
121
  # @return [Page] Page of SyncListInstance
113
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
122
+ def page(hide_expired: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
114
123
  params = Twilio::Values.of({
124
+ 'HideExpired' => hide_expired,
115
125
  'PageToken' => page_token,
116
126
  'Page' => page_number,
117
127
  'PageSize' => page_size,
@@ -80,6 +80,9 @@ module Twilio
80
80
  # Item referenced by the `from` parameter. Can be: `inclusive` to include the List
81
81
  # Item referenced by the `from` parameter or `exclusive` to start with the next
82
82
  # List Item. The default value is `inclusive`.
83
+ # @param [sync_list_item.HideExpiredType] hide_expired The default list of Sync
84
+ # List items will show both active and expired items. It is possible to filter
85
+ # only the active ones by hiding the expired ones.
83
86
  # @param [Integer] limit Upper limit for the number of records to return. stream()
84
87
  # guarantees to never return more than limit. Default is no limit
85
88
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -87,8 +90,15 @@ module Twilio
87
90
  # but a limit is defined, stream() will attempt to read the limit with the most
88
91
  # efficient page size, i.e. min(limit, 1000)
89
92
  # @return [Array] Array of up to limit results
90
- def list(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil)
91
- self.stream(order: order, from: from, bounds: bounds, limit: limit, page_size: page_size).entries
93
+ def list(order: :unset, from: :unset, bounds: :unset, hide_expired: :unset, limit: nil, page_size: nil)
94
+ self.stream(
95
+ order: order,
96
+ from: from,
97
+ bounds: bounds,
98
+ hide_expired: hide_expired,
99
+ limit: limit,
100
+ page_size: page_size
101
+ ).entries
92
102
  end
93
103
 
94
104
  ##
@@ -104,6 +114,9 @@ module Twilio
104
114
  # Item referenced by the `from` parameter. Can be: `inclusive` to include the List
105
115
  # Item referenced by the `from` parameter or `exclusive` to start with the next
106
116
  # List Item. The default value is `inclusive`.
117
+ # @param [sync_list_item.HideExpiredType] hide_expired The default list of Sync
118
+ # List items will show both active and expired items. It is possible to filter
119
+ # only the active ones by hiding the expired ones.
107
120
  # @param [Integer] limit Upper limit for the number of records to return. stream()
108
121
  # guarantees to never return more than limit. Default is no limit.
109
122
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -111,10 +124,16 @@ module Twilio
111
124
  # but a limit is defined, stream() will attempt to read the limit with the most
112
125
  # efficient page size, i.e. min(limit, 1000)
113
126
  # @return [Enumerable] Enumerable that will yield up to limit results
114
- def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil)
127
+ def stream(order: :unset, from: :unset, bounds: :unset, hide_expired: :unset, limit: nil, page_size: nil)
115
128
  limits = @version.read_limits(limit, page_size)
116
129
 
117
- page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size], )
130
+ page = self.page(
131
+ order: order,
132
+ from: from,
133
+ bounds: bounds,
134
+ hide_expired: hide_expired,
135
+ page_size: limits[:page_size],
136
+ )
118
137
 
119
138
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
120
139
  end
@@ -145,15 +164,19 @@ module Twilio
145
164
  # Item referenced by the `from` parameter. Can be: `inclusive` to include the List
146
165
  # Item referenced by the `from` parameter or `exclusive` to start with the next
147
166
  # List Item. The default value is `inclusive`.
167
+ # @param [sync_list_item.HideExpiredType] hide_expired The default list of Sync
168
+ # List items will show both active and expired items. It is possible to filter
169
+ # only the active ones by hiding the expired ones.
148
170
  # @param [String] page_token PageToken provided by the API
149
171
  # @param [Integer] page_number Page Number, this value is simply for client state
150
172
  # @param [Integer] page_size Number of records to return, defaults to 50
151
173
  # @return [Page] Page of SyncListItemInstance
152
- def page(order: :unset, from: :unset, bounds: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
174
+ def page(order: :unset, from: :unset, bounds: :unset, hide_expired: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
153
175
  params = Twilio::Values.of({
154
176
  'Order' => order,
155
177
  'From' => from,
156
178
  'Bounds' => bounds,
179
+ 'HideExpired' => hide_expired,
157
180
  'PageToken' => page_token,
158
181
  'Page' => page_number,
159
182
  'PageSize' => page_size,
@@ -58,6 +58,9 @@ module Twilio
58
58
  # Lists SyncMapInstance records from the API as a list.
59
59
  # Unlike stream(), this operation is eager and will load `limit` records into
60
60
  # memory before returning.
61
+ # @param [sync_map.HideExpiredType] hide_expired The default list of Sync Maps
62
+ # will show both active and expired items. It is possible to filter only the
63
+ # active ones by hiding the expired ones.
61
64
  # @param [Integer] limit Upper limit for the number of records to return. stream()
62
65
  # guarantees to never return more than limit. Default is no limit
63
66
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -65,14 +68,17 @@ module Twilio
65
68
  # but a limit is defined, stream() will attempt to read the limit with the most
66
69
  # efficient page size, i.e. min(limit, 1000)
67
70
  # @return [Array] Array of up to limit results
68
- def list(limit: nil, page_size: nil)
69
- self.stream(limit: limit, page_size: page_size).entries
71
+ def list(hide_expired: :unset, limit: nil, page_size: nil)
72
+ self.stream(hide_expired: hide_expired, limit: limit, page_size: page_size).entries
70
73
  end
71
74
 
72
75
  ##
73
76
  # Streams SyncMapInstance records from the API as an Enumerable.
74
77
  # This operation lazily loads records as efficiently as possible until the limit
75
78
  # is reached.
79
+ # @param [sync_map.HideExpiredType] hide_expired The default list of Sync Maps
80
+ # will show both active and expired items. It is possible to filter only the
81
+ # active ones by hiding the expired ones.
76
82
  # @param [Integer] limit Upper limit for the number of records to return. stream()
77
83
  # guarantees to never return more than limit. Default is no limit.
78
84
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -80,10 +86,10 @@ module Twilio
80
86
  # but a limit is defined, stream() will attempt to read the limit with the most
81
87
  # efficient page size, i.e. min(limit, 1000)
82
88
  # @return [Enumerable] Enumerable that will yield up to limit results
83
- def stream(limit: nil, page_size: nil)
89
+ def stream(hide_expired: :unset, limit: nil, page_size: nil)
84
90
  limits = @version.read_limits(limit, page_size)
85
91
 
86
- page = self.page(page_size: limits[:page_size], )
92
+ page = self.page(hide_expired: hide_expired, page_size: limits[:page_size], )
87
93
 
88
94
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
89
95
  end
@@ -105,12 +111,16 @@ module Twilio
105
111
  ##
106
112
  # Retrieve a single page of SyncMapInstance records from the API.
107
113
  # Request is executed immediately.
114
+ # @param [sync_map.HideExpiredType] hide_expired The default list of Sync Maps
115
+ # will show both active and expired items. It is possible to filter only the
116
+ # active ones by hiding the expired ones.
108
117
  # @param [String] page_token PageToken provided by the API
109
118
  # @param [Integer] page_number Page Number, this value is simply for client state
110
119
  # @param [Integer] page_size Number of records to return, defaults to 50
111
120
  # @return [Page] Page of SyncMapInstance
112
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
121
+ def page(hide_expired: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
113
122
  params = Twilio::Values.of({
123
+ 'HideExpired' => hide_expired,
114
124
  'PageToken' => page_token,
115
125
  'Page' => page_number,
116
126
  'PageSize' => page_size,
@@ -85,6 +85,9 @@ module Twilio
85
85
  # referenced by the `from` parameter. Can be: `inclusive` to include the Map Item
86
86
  # referenced by the `from` parameter or `exclusive` to start with the next Map
87
87
  # Item. The default value is `inclusive`.
88
+ # @param [sync_map_item.HideExpiredType] hide_expired The default list of Sync Map
89
+ # items will show both active and expired items. It is possible to filter only the
90
+ # active ones by hiding the expired ones.
88
91
  # @param [Integer] limit Upper limit for the number of records to return. stream()
89
92
  # guarantees to never return more than limit. Default is no limit
90
93
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -92,8 +95,15 @@ module Twilio
92
95
  # but a limit is defined, stream() will attempt to read the limit with the most
93
96
  # efficient page size, i.e. min(limit, 1000)
94
97
  # @return [Array] Array of up to limit results
95
- def list(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil)
96
- self.stream(order: order, from: from, bounds: bounds, limit: limit, page_size: page_size).entries
98
+ def list(order: :unset, from: :unset, bounds: :unset, hide_expired: :unset, limit: nil, page_size: nil)
99
+ self.stream(
100
+ order: order,
101
+ from: from,
102
+ bounds: bounds,
103
+ hide_expired: hide_expired,
104
+ limit: limit,
105
+ page_size: page_size
106
+ ).entries
97
107
  end
98
108
 
99
109
  ##
@@ -111,6 +121,9 @@ module Twilio
111
121
  # referenced by the `from` parameter. Can be: `inclusive` to include the Map Item
112
122
  # referenced by the `from` parameter or `exclusive` to start with the next Map
113
123
  # Item. The default value is `inclusive`.
124
+ # @param [sync_map_item.HideExpiredType] hide_expired The default list of Sync Map
125
+ # items will show both active and expired items. It is possible to filter only the
126
+ # active ones by hiding the expired ones.
114
127
  # @param [Integer] limit Upper limit for the number of records to return. stream()
115
128
  # guarantees to never return more than limit. Default is no limit.
116
129
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -118,10 +131,16 @@ module Twilio
118
131
  # but a limit is defined, stream() will attempt to read the limit with the most
119
132
  # efficient page size, i.e. min(limit, 1000)
120
133
  # @return [Enumerable] Enumerable that will yield up to limit results
121
- def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil)
134
+ def stream(order: :unset, from: :unset, bounds: :unset, hide_expired: :unset, limit: nil, page_size: nil)
122
135
  limits = @version.read_limits(limit, page_size)
123
136
 
124
- page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size], )
137
+ page = self.page(
138
+ order: order,
139
+ from: from,
140
+ bounds: bounds,
141
+ hide_expired: hide_expired,
142
+ page_size: limits[:page_size],
143
+ )
125
144
 
126
145
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
127
146
  end
@@ -154,15 +173,19 @@ module Twilio
154
173
  # referenced by the `from` parameter. Can be: `inclusive` to include the Map Item
155
174
  # referenced by the `from` parameter or `exclusive` to start with the next Map
156
175
  # Item. The default value is `inclusive`.
176
+ # @param [sync_map_item.HideExpiredType] hide_expired The default list of Sync Map
177
+ # items will show both active and expired items. It is possible to filter only the
178
+ # active ones by hiding the expired ones.
157
179
  # @param [String] page_token PageToken provided by the API
158
180
  # @param [Integer] page_number Page Number, this value is simply for client state
159
181
  # @param [Integer] page_size Number of records to return, defaults to 50
160
182
  # @return [Page] Page of SyncMapItemInstance
161
- def page(order: :unset, from: :unset, bounds: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
183
+ def page(order: :unset, from: :unset, bounds: :unset, hide_expired: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
162
184
  params = Twilio::Values.of({
163
185
  'Order' => order,
164
186
  'From' => from,
165
187
  'Bounds' => bounds,
188
+ 'HideExpired' => hide_expired,
166
189
  'PageToken' => page_token,
167
190
  'Page' => page_number,
168
191
  'PageSize' => page_size,