twilio-ruby 5.42.0 → 5.43.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +27 -0
  3. data/README.md +18 -2
  4. data/lib/twilio-ruby.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +20 -0
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
  7. data/lib/twilio-ruby/rest/client.rb +29 -3
  8. data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
  9. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -8
  10. data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
  11. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
  12. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
  13. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
  14. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
  15. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
  16. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
  17. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
  18. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
  19. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
  20. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
  21. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
  22. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
  23. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
  24. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
  25. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
  26. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
  27. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
  28. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
  29. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
  30. data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
  31. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -1
  32. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +5 -3
  33. data/lib/twilio-ruby/util/configuration.rb +5 -1
  34. data/lib/twilio-ruby/version.rb +1 -1
  35. data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
  36. data/spec/integration/api/v2010/account/call_spec.rb +20 -10
  37. data/spec/integration/events/v1/subscription_spec.rb +49 -0
  38. data/spec/integration/insights/v1/room/participant_spec.rb +0 -2
  39. data/spec/rest/client_spec.rb +24 -2
  40. data/twilio-ruby.gemspec +1 -0
  41. metadata +19 -2
@@ -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,
@@ -53,6 +53,9 @@ module Twilio
53
53
  # Lists SyncStreamInstance records from the API as a list.
54
54
  # Unlike stream(), this operation is eager and will load `limit` records into
55
55
  # memory before returning.
56
+ # @param [sync_stream.HideExpiredType] hide_expired The default list of Sync
57
+ # Streams will show both active and expired items. It is possible to filter only
58
+ # the active ones by hiding the expired ones.
56
59
  # @param [Integer] limit Upper limit for the number of records to return. stream()
57
60
  # guarantees to never return more than limit. Default is no limit
58
61
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -60,14 +63,17 @@ module Twilio
60
63
  # but a limit is defined, stream() will attempt to read the limit with the most
61
64
  # efficient page size, i.e. min(limit, 1000)
62
65
  # @return [Array] Array of up to limit results
63
- def list(limit: nil, page_size: nil)
64
- self.stream(limit: limit, page_size: page_size).entries
66
+ def list(hide_expired: :unset, limit: nil, page_size: nil)
67
+ self.stream(hide_expired: hide_expired, limit: limit, page_size: page_size).entries
65
68
  end
66
69
 
67
70
  ##
68
71
  # Streams SyncStreamInstance records from the API as an Enumerable.
69
72
  # This operation lazily loads records as efficiently as possible until the limit
70
73
  # is reached.
74
+ # @param [sync_stream.HideExpiredType] hide_expired The default list of Sync
75
+ # Streams will show both active and expired items. It is possible to filter only
76
+ # the active ones by hiding the expired ones.
71
77
  # @param [Integer] limit Upper limit for the number of records to return. stream()
72
78
  # guarantees to never return more than limit. Default is no limit.
73
79
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -75,10 +81,10 @@ module Twilio
75
81
  # but a limit is defined, stream() will attempt to read the limit with the most
76
82
  # efficient page size, i.e. min(limit, 1000)
77
83
  # @return [Enumerable] Enumerable that will yield up to limit results
78
- def stream(limit: nil, page_size: nil)
84
+ def stream(hide_expired: :unset, limit: nil, page_size: nil)
79
85
  limits = @version.read_limits(limit, page_size)
80
86
 
81
- page = self.page(page_size: limits[:page_size], )
87
+ page = self.page(hide_expired: hide_expired, page_size: limits[:page_size], )
82
88
 
83
89
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
84
90
  end
@@ -100,12 +106,16 @@ module Twilio
100
106
  ##
101
107
  # Retrieve a single page of SyncStreamInstance records from the API.
102
108
  # Request is executed immediately.
109
+ # @param [sync_stream.HideExpiredType] hide_expired The default list of Sync
110
+ # Streams will show both active and expired items. It is possible to filter only
111
+ # the active ones by hiding the expired ones.
103
112
  # @param [String] page_token PageToken provided by the API
104
113
  # @param [Integer] page_number Page Number, this value is simply for client state
105
114
  # @param [Integer] page_size Number of records to return, defaults to 50
106
115
  # @return [Page] Page of SyncStreamInstance
107
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
116
+ def page(hide_expired: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
108
117
  params = Twilio::Values.of({
118
+ 'HideExpired' => hide_expired,
109
119
  'PageToken' => page_token,
110
120
  'Page' => page_number,
111
121
  'PageSize' => page_size,
@@ -31,9 +31,10 @@ module Twilio
31
31
  # memory before returning.
32
32
  # @param [String] priority The priority value of the Tasks to read. Returns the
33
33
  # list of all Tasks in the Workspace with the specified priority.
34
- # @param [String] assignment_status The `assignment_status` of the Tasks to read.
35
- # Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
36
- # all Tasks in the Workspace with the specified `assignment_status`.
34
+ # @param [String] assignment_status The `assignment_status` of the Tasks you want
35
+ # to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or
36
+ # `completed`. Returns all Tasks in the Workspace with the specified
37
+ # `assignment_status`.
37
38
  # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
38
39
  # Returns the Tasks controlled by the Workflow identified by this SID.
39
40
  # @param [String] workflow_name The friendly name of the Workflow with the Tasks
@@ -85,9 +86,10 @@ module Twilio
85
86
  # is reached.
86
87
  # @param [String] priority The priority value of the Tasks to read. Returns the
87
88
  # list of all Tasks in the Workspace with the specified priority.
88
- # @param [String] assignment_status The `assignment_status` of the Tasks to read.
89
- # Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
90
- # all Tasks in the Workspace with the specified `assignment_status`.
89
+ # @param [String] assignment_status The `assignment_status` of the Tasks you want
90
+ # to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or
91
+ # `completed`. Returns all Tasks in the Workspace with the specified
92
+ # `assignment_status`.
91
93
  # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
92
94
  # Returns the Tasks controlled by the Workflow identified by this SID.
93
95
  # @param [String] workflow_name The friendly name of the Workflow with the Tasks
@@ -155,9 +157,10 @@ module Twilio
155
157
  # Request is executed immediately.
156
158
  # @param [String] priority The priority value of the Tasks to read. Returns the
157
159
  # list of all Tasks in the Workspace with the specified priority.
158
- # @param [String] assignment_status The `assignment_status` of the Tasks to read.
159
- # Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns
160
- # all Tasks in the Workspace with the specified `assignment_status`.
160
+ # @param [String] assignment_status The `assignment_status` of the Tasks you want
161
+ # to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or
162
+ # `completed`. Returns all Tasks in the Workspace with the specified
163
+ # `assignment_status`.
161
164
  # @param [String] workflow_sid The SID of the Workflow with the Tasks to read.
162
165
  # Returns the Tasks controlled by the Workflow identified by this SID.
163
166
  # @param [String] workflow_name The friendly name of the Workflow with the Tasks
@@ -15,8 +15,8 @@ module Twilio
15
15
  ##
16
16
  # Initialize the TaskChannelList
17
17
  # @param [Version] version Version that contains the resource
18
- # @param [String] workspace_sid The SID of the Workspace that contains the
19
- # TaskChannel.
18
+ # @param [String] workspace_sid The SID of the Workspace that contains the Task
19
+ # Channel.
20
20
  # @return [TaskChannelList] TaskChannelList
21
21
  def initialize(version, workspace_sid: nil)
22
22
  super(version)
@@ -109,10 +109,10 @@ module Twilio
109
109
  ##
110
110
  # Create the TaskChannelInstance
111
111
  # @param [String] friendly_name A descriptive string that you create to describe
112
- # the TaskChannel. It can be up to 64 characters long.
112
+ # the Task Channel. It can be up to 64 characters long.
113
113
  # @param [String] unique_name An application-defined string that uniquely
114
- # identifies the TaskChannel, such as `voice` or `sms`.
115
- # @param [Boolean] channel_optimized_routing Whether the TaskChannel should
114
+ # identifies the Task Channel, such as `voice` or `sms`.
115
+ # @param [Boolean] channel_optimized_routing Whether the Task Channel should
116
116
  # prioritize Workers that have been idle. If `true`, Workers that have been idle
117
117
  # the longest are prioritized.
118
118
  # @return [TaskChannelInstance] Created TaskChannelInstance
@@ -168,9 +168,9 @@ module Twilio
168
168
  ##
169
169
  # Initialize the TaskChannelContext
170
170
  # @param [Version] version Version that contains the resource
171
- # @param [String] workspace_sid The SID of the Workspace with the TaskChannel to
171
+ # @param [String] workspace_sid The SID of the Workspace with the Task Channel to
172
172
  # fetch.
173
- # @param [String] sid The SID of the TaskChannel resource to fetch.
173
+ # @param [String] sid The SID of the Task Channel resource to fetch.
174
174
  # @return [TaskChannelContext] TaskChannelContext
175
175
  def initialize(version, workspace_sid, sid)
176
176
  super(version)
@@ -197,7 +197,7 @@ module Twilio
197
197
  ##
198
198
  # Update the TaskChannelInstance
199
199
  # @param [String] friendly_name A descriptive string that you create to describe
200
- # the TaskChannel. It can be up to 64 characters long.
200
+ # the Task Channel. It can be up to 64 characters long.
201
201
  # @param [Boolean] channel_optimized_routing Whether the TaskChannel should
202
202
  # prioritize Workers that have been idle. If `true`, Workers that have been idle
203
203
  # the longest are prioritized.
@@ -245,9 +245,9 @@ module Twilio
245
245
  # Initialize the TaskChannelInstance
246
246
  # @param [Version] version Version that contains the resource
247
247
  # @param [Hash] payload payload that contains response from Twilio
248
- # @param [String] workspace_sid The SID of the Workspace that contains the
249
- # TaskChannel.
250
- # @param [String] sid The SID of the TaskChannel resource to fetch.
248
+ # @param [String] workspace_sid The SID of the Workspace that contains the Task
249
+ # Channel.
250
+ # @param [String] sid The SID of the Task Channel resource to fetch.
251
251
  # @return [TaskChannelInstance] TaskChannelInstance
252
252
  def initialize(version, payload, workspace_sid: nil, sid: nil)
253
253
  super(version)
@@ -313,25 +313,25 @@ module Twilio
313
313
  end
314
314
 
315
315
  ##
316
- # @return [String] An application-defined string that uniquely identifies the TaskChannel
316
+ # @return [String] An application-defined string that uniquely identifies the Task Channel
317
317
  def unique_name
318
318
  @properties['unique_name']
319
319
  end
320
320
 
321
321
  ##
322
- # @return [String] The SID of the Workspace that contains the TaskChannel
322
+ # @return [String] The SID of the Workspace that contains the Task Channel
323
323
  def workspace_sid
324
324
  @properties['workspace_sid']
325
325
  end
326
326
 
327
327
  ##
328
- # @return [Boolean] Whether the TaskChannel will prioritize Workers that have been idle
328
+ # @return [Boolean] Whether the Task Channel will prioritize Workers that have been idle
329
329
  def channel_optimized_routing
330
330
  @properties['channel_optimized_routing']
331
331
  end
332
332
 
333
333
  ##
334
- # @return [String] The absolute URL of the TaskChannel resource
334
+ # @return [String] The absolute URL of the Task Channel resource
335
335
  def url
336
336
  @properties['url']
337
337
  end
@@ -352,7 +352,7 @@ module Twilio
352
352
  ##
353
353
  # Update the TaskChannelInstance
354
354
  # @param [String] friendly_name A descriptive string that you create to describe
355
- # the TaskChannel. It can be up to 64 characters long.
355
+ # the Task Channel. It can be up to 64 characters long.
356
356
  # @param [Boolean] channel_optimized_routing Whether the TaskChannel should
357
357
  # prioritize Workers that have been idle. If `true`, Workers that have been idle
358
358
  # the longest are prioritized.