twilio-ruby 5.40.4 → 5.45.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +104 -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/accounts.rb +12 -0
  9. data/lib/twilio-ruby/rest/accounts/v1.rb +14 -0
  10. data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +186 -0
  11. data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +200 -0
  12. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
  13. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
  14. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
  15. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
  16. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
  17. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
  18. data/lib/twilio-ruby/rest/client.rb +29 -3
  19. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +10 -2
  20. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +13 -3
  21. data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
  22. data/lib/twilio-ruby/rest/insights.rb +8 -0
  23. data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
  24. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
  25. data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
  26. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
  27. data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
  28. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
  29. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
  30. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
  31. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
  32. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
  33. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
  34. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
  35. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
  36. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
  37. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
  38. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
  39. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
  40. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
  41. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
  42. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
  43. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
  44. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
  45. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
  46. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
  47. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
  48. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
  49. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
  50. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
  51. data/lib/twilio-ruby/rest/preview.rb +5 -18
  52. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
  53. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
  54. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +12 -27
  55. data/lib/twilio-ruby/rest/preview/trusted_comms/{business.rb → branded_channel.rb} +63 -77
  56. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +165 -0
  57. data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
  58. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
  59. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
  60. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
  61. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
  62. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
  63. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
  64. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
  65. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
  66. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  67. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
  68. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
  69. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
  70. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
  71. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
  72. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
  73. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
  74. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
  75. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
  76. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
  77. data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
  78. data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
  79. data/lib/twilio-ruby/rest/verify/v2/service.rb +54 -33
  80. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
  81. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
  82. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +36 -61
  83. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +59 -57
  84. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
  85. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
  86. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
  87. data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
  88. data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
  89. data/lib/twilio-ruby/twiml/voice_response.rb +7 -4
  90. data/lib/twilio-ruby/util/configuration.rb +5 -1
  91. data/lib/twilio-ruby/version.rb +1 -1
  92. data/spec/integration/accounts/v1/auth_token_promotion_spec.rb +44 -0
  93. data/spec/integration/accounts/v1/secondary_auth_token_spec.rb +69 -0
  94. data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
  95. data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
  96. data/spec/integration/api/v2010/account/call_spec.rb +20 -10
  97. data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
  98. data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
  99. data/spec/integration/conversations/v1/conversation_spec.rb +1 -1
  100. data/spec/integration/conversations/v1/service/conversation_spec.rb +1 -1
  101. data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
  102. data/spec/integration/events/v1/subscription_spec.rb +49 -0
  103. data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
  104. data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
  105. data/spec/integration/insights/v1/room_spec.rb +164 -0
  106. data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
  107. data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
  108. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
  109. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
  110. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
  111. data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
  112. data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
  113. data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
  114. data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
  115. data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
  116. data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
  117. data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
  118. data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
  119. data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
  120. data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
  121. data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
  122. data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
  123. data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
  124. data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
  125. data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
  126. data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
  127. data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
  128. data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
  129. data/spec/integration/preview/trusted_comms/{business/brand/branded_channel → branded_channel}/channel_spec.rb +4 -8
  130. data/spec/integration/preview/trusted_comms/{business/brand/branded_channel_spec.rb → branded_channel_spec.rb} +5 -9
  131. data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
  132. data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
  133. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +56 -20
  134. data/spec/integration/verify/v2/service/entity/factor_spec.rb +11 -26
  135. data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
  136. data/spec/integration/verify/v2/service_spec.rb +8 -4
  137. data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
  138. data/spec/integration/video/v1/room_spec.rb +10 -5
  139. data/spec/jwt/access_token_spec.rb +9 -1
  140. data/spec/rest/client_spec.rb +24 -2
  141. data/twilio-ruby.gemspec +2 -1
  142. metadata +42 -28
  143. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
  144. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +0 -233
  145. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +0 -260
  146. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +0 -189
  147. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
  148. data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
  149. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
  150. data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
  151. data/spec/integration/preview/trusted_comms/business/brand_spec.rb +0 -48
  152. data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
  153. data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
  154. data/spec/integration/preview/trusted_comms/business_spec.rb +0 -46
  155. 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,