twilio-ruby 5.0.0.rc24 → 5.0.0.rc25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +32 -12
- data/LICENSE.md +12 -12
- data/README.md +28 -29
- data/examples/examples.rb +47 -58
- data/examples/print-call-log.rb +6 -6
- data/lib/twilio-ruby/jwt/jwt.rb +2 -2
- data/lib/twilio-ruby/rest/accounts/v1.rb +3 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010.rb +3 -1
- data/lib/twilio-ruby/rest/api/v2010/account.rb +80 -23
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +6 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +14 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +10 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +18 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +14 -4
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +8 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +4 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +6 -2
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +16 -8
- data/lib/twilio-ruby/rest/chat/v1.rb +6 -2
- data/lib/twilio-ruby/rest/chat/v1/service.rb +12 -3
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +12 -3
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +2 -1
- data/lib/twilio-ruby/rest/chat/v2.rb +6 -2
- data/lib/twilio-ruby/rest/chat/v2/service.rb +12 -3
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +12 -3
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -1
- data/lib/twilio-ruby/rest/fax/v1.rb +3 -1
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +4 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +12 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +12 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +2 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +12 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +12 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -1
- data/lib/twilio-ruby/rest/lookups/v1.rb +3 -1
- data/lib/twilio-ruby/rest/messaging/v1.rb +3 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +26 -6
- data/lib/twilio-ruby/rest/monitor/v1.rb +6 -2
- data/lib/twilio-ruby/rest/notify/v1.rb +6 -2
- data/lib/twilio-ruby/rest/notify/v1/service.rb +12 -4
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +3 -1
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +8 -2
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +6 -2
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +2 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +3 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +18 -12
- data/lib/twilio-ruby/rest/preview/marketplace.rb +6 -2
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +4 -1
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +4 -1
- data/lib/twilio-ruby/rest/preview/proxy.rb +3 -1
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +12 -3
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +8 -2
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +4 -1
- data/lib/twilio-ruby/rest/preview/sync.rb +3 -1
- data/lib/twilio-ruby/rest/preview/sync/service.rb +12 -3
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +8 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +8 -2
- data/lib/twilio-ruby/rest/preview/wireless.rb +9 -3
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +2 -1
- data/lib/twilio-ruby/rest/pricing/v1.rb +9 -3
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +4 -1
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +4 -1
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +8 -2
- data/lib/twilio-ruby/rest/sync/v1.rb +3 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +12 -3
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +4 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +8 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +8 -2
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +3 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +30 -8
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +4 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +12 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1.rb +3 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +16 -4
- data/lib/twilio-ruby/rest/video/v1.rb +6 -2
- data/lib/twilio-ruby/rest/video/v1/recording.rb +17 -3
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -1
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +31 -3
- data/lib/twilio-ruby/rest/wireless/v1.rb +9 -3
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +16 -1
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -1
- data/lib/twilio-ruby/twiml/messaging_response.rb +8 -2
- data/lib/twilio-ruby/twiml/twiml.rb +3 -5
- data/lib/twilio-ruby/twiml/voice_response.rb +60 -42
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call/recording_spec.rb +14 -2
- data/spec/integration/api/v2010/account/recording_spec.rb +14 -2
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +28 -0
- data/spec/integration/messaging/v1/service_spec.rb +4 -0
- data/spec/integration/notify/v1/service/notification_spec.rb +35 -0
- data/spec/integration/video/v1/recording_spec.rb +45 -0
- data/spec/integration/video/v1/room/recording_spec.rb +4 -3
- data/spec/integration/wireless/v1/rate_plan_spec.rb +8 -0
- data/spec/twiml/messaging_response_spec.rb +28 -0
- data/spec/twiml/voice_response_spec.rb +9 -0
- metadata +2 -2
|
@@ -201,7 +201,8 @@ module Twilio
|
|
|
201
201
|
|
|
202
202
|
##
|
|
203
203
|
# Access the statistics
|
|
204
|
-
# @return [WorkersStatisticsList] WorkersStatisticsList
|
|
204
|
+
# @return [WorkersStatisticsList] if a(n) WorkersStatisticsList object was created.
|
|
205
|
+
# @return [WorkersStatisticsContext] if a(n) WorkersStatisticsContext object was created.
|
|
205
206
|
def statistics
|
|
206
207
|
return WorkersStatisticsContext.new(
|
|
207
208
|
@version,
|
|
@@ -334,7 +335,8 @@ module Twilio
|
|
|
334
335
|
|
|
335
336
|
##
|
|
336
337
|
# Access the statistics
|
|
337
|
-
# @return [WorkerStatisticsList] WorkerStatisticsList
|
|
338
|
+
# @return [WorkerStatisticsList] if a(n) WorkerStatisticsList object was created.
|
|
339
|
+
# @return [WorkerStatisticsContext] if a(n) WorkerStatisticsContext object was created.
|
|
338
340
|
def statistics
|
|
339
341
|
WorkerStatisticsContext.new(
|
|
340
342
|
@version,
|
|
@@ -345,8 +347,11 @@ module Twilio
|
|
|
345
347
|
|
|
346
348
|
##
|
|
347
349
|
# Access the reservations
|
|
348
|
-
# @return [ReservationList] ReservationList
|
|
350
|
+
# @return [ReservationList] if a(n) ReservationList object was created.
|
|
351
|
+
# @return [ReservationContext] if a(n) ReservationContext object was created.
|
|
349
352
|
def reservations(sid=:unset)
|
|
353
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
354
|
+
|
|
350
355
|
if sid != :unset
|
|
351
356
|
return ReservationContext.new(
|
|
352
357
|
@version,
|
|
@@ -369,8 +374,11 @@ module Twilio
|
|
|
369
374
|
|
|
370
375
|
##
|
|
371
376
|
# Access the worker_channels
|
|
372
|
-
# @return [WorkerChannelList] WorkerChannelList
|
|
377
|
+
# @return [WorkerChannelList] if a(n) WorkerChannelList object was created.
|
|
378
|
+
# @return [WorkerChannelContext] if a(n) WorkerChannelContext object was created.
|
|
373
379
|
def worker_channels(sid=:unset)
|
|
380
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
381
|
+
|
|
374
382
|
if sid != :unset
|
|
375
383
|
return WorkerChannelContext.new(
|
|
376
384
|
@version,
|
|
@@ -282,7 +282,8 @@ module Twilio
|
|
|
282
282
|
|
|
283
283
|
##
|
|
284
284
|
# Access the statistics
|
|
285
|
-
# @return [WorkflowStatisticsList] WorkflowStatisticsList
|
|
285
|
+
# @return [WorkflowStatisticsList] if a(n) WorkflowStatisticsList object was created.
|
|
286
|
+
# @return [WorkflowStatisticsContext] if a(n) WorkflowStatisticsContext object was created.
|
|
286
287
|
def statistics
|
|
287
288
|
WorkflowStatisticsContext.new(
|
|
288
289
|
@version,
|
|
@@ -269,8 +269,11 @@ module Twilio
|
|
|
269
269
|
|
|
270
270
|
##
|
|
271
271
|
# Access the origination_urls
|
|
272
|
-
# @return [OriginationUrlList] OriginationUrlList
|
|
272
|
+
# @return [OriginationUrlList] if a(n) OriginationUrlList object was created.
|
|
273
|
+
# @return [OriginationUrlContext] if a(n) OriginationUrlContext object was created.
|
|
273
274
|
def origination_urls(sid=:unset)
|
|
275
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
276
|
+
|
|
274
277
|
if sid != :unset
|
|
275
278
|
return OriginationUrlContext.new(
|
|
276
279
|
@version,
|
|
@@ -291,8 +294,11 @@ module Twilio
|
|
|
291
294
|
|
|
292
295
|
##
|
|
293
296
|
# Access the credentials_lists
|
|
294
|
-
# @return [CredentialListList] CredentialListList
|
|
297
|
+
# @return [CredentialListList] if a(n) CredentialListList object was created.
|
|
298
|
+
# @return [CredentialListContext] if a(n) CredentialListContext object was created.
|
|
295
299
|
def credentials_lists(sid=:unset)
|
|
300
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
301
|
+
|
|
296
302
|
if sid != :unset
|
|
297
303
|
return CredentialListContext.new(
|
|
298
304
|
@version,
|
|
@@ -313,8 +319,11 @@ module Twilio
|
|
|
313
319
|
|
|
314
320
|
##
|
|
315
321
|
# Access the ip_access_control_lists
|
|
316
|
-
# @return [IpAccessControlListList] IpAccessControlListList
|
|
322
|
+
# @return [IpAccessControlListList] if a(n) IpAccessControlListList object was created.
|
|
323
|
+
# @return [IpAccessControlListContext] if a(n) IpAccessControlListContext object was created.
|
|
317
324
|
def ip_access_control_lists(sid=:unset)
|
|
325
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
326
|
+
|
|
318
327
|
if sid != :unset
|
|
319
328
|
return IpAccessControlListContext.new(
|
|
320
329
|
@version,
|
|
@@ -335,8 +344,11 @@ module Twilio
|
|
|
335
344
|
|
|
336
345
|
##
|
|
337
346
|
# Access the phone_numbers
|
|
338
|
-
# @return [PhoneNumberList] PhoneNumberList
|
|
347
|
+
# @return [PhoneNumberList] if a(n) PhoneNumberList object was created.
|
|
348
|
+
# @return [PhoneNumberContext] if a(n) PhoneNumberContext object was created.
|
|
339
349
|
def phone_numbers(sid=:unset)
|
|
350
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
351
|
+
|
|
340
352
|
if sid != :unset
|
|
341
353
|
return PhoneNumberContext.new(
|
|
342
354
|
@version,
|
|
@@ -18,7 +18,9 @@ module Twilio
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def recordings(sid=:unset)
|
|
21
|
-
if sid
|
|
21
|
+
if sid.nil?
|
|
22
|
+
raise ArgumentError, 'sid cannot be nil'
|
|
23
|
+
elsif sid == :unset
|
|
22
24
|
@recordings ||= RecordingList.new self
|
|
23
25
|
else
|
|
24
26
|
RecordingContext.new(self, sid)
|
|
@@ -26,7 +28,9 @@ module Twilio
|
|
|
26
28
|
end
|
|
27
29
|
|
|
28
30
|
def rooms(sid=:unset)
|
|
29
|
-
if sid
|
|
31
|
+
if sid.nil?
|
|
32
|
+
raise ArgumentError, 'sid cannot be nil'
|
|
33
|
+
elsif sid == :unset
|
|
30
34
|
@rooms ||= RoomList.new self
|
|
31
35
|
else
|
|
32
36
|
RoomContext.new(self, sid)
|
|
@@ -28,6 +28,8 @@ module Twilio
|
|
|
28
28
|
# @param [recording.Status] status The status
|
|
29
29
|
# @param [String] source_sid The source_sid
|
|
30
30
|
# @param [String] grouping_sid The grouping_sid
|
|
31
|
+
# @param [Time] date_created_after The date_created_after
|
|
32
|
+
# @param [Time] date_created_before The date_created_before
|
|
31
33
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
32
34
|
# guarantees to never return more than limit. Default is no limit
|
|
33
35
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -35,11 +37,13 @@ module Twilio
|
|
|
35
37
|
# but a limit is defined, stream() will attempt to read the
|
|
36
38
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
37
39
|
# @return [Array] Array of up to limit results
|
|
38
|
-
def list(status: :unset, source_sid: :unset, grouping_sid: :unset, limit: nil, page_size: nil)
|
|
40
|
+
def list(status: :unset, source_sid: :unset, grouping_sid: :unset, date_created_after: :unset, date_created_before: :unset, limit: nil, page_size: nil)
|
|
39
41
|
self.stream(
|
|
40
42
|
status: status,
|
|
41
43
|
source_sid: source_sid,
|
|
42
44
|
grouping_sid: grouping_sid,
|
|
45
|
+
date_created_after: date_created_after,
|
|
46
|
+
date_created_before: date_created_before,
|
|
43
47
|
limit: limit,
|
|
44
48
|
page_size: page_size
|
|
45
49
|
).entries
|
|
@@ -52,6 +56,8 @@ module Twilio
|
|
|
52
56
|
# @param [recording.Status] status The status
|
|
53
57
|
# @param [String] source_sid The source_sid
|
|
54
58
|
# @param [String] grouping_sid The grouping_sid
|
|
59
|
+
# @param [Time] date_created_after The date_created_after
|
|
60
|
+
# @param [Time] date_created_before The date_created_before
|
|
55
61
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
56
62
|
# guarantees to never return more than limit. Default is no limit
|
|
57
63
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -59,13 +65,15 @@ module Twilio
|
|
|
59
65
|
# but a limit is defined, stream() will attempt to read the
|
|
60
66
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
61
67
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
62
|
-
def stream(status: :unset, source_sid: :unset, grouping_sid: :unset, limit: nil, page_size: nil)
|
|
68
|
+
def stream(status: :unset, source_sid: :unset, grouping_sid: :unset, date_created_after: :unset, date_created_before: :unset, limit: nil, page_size: nil)
|
|
63
69
|
limits = @version.read_limits(limit, page_size)
|
|
64
70
|
|
|
65
71
|
page = self.page(
|
|
66
72
|
status: status,
|
|
67
73
|
source_sid: source_sid,
|
|
68
74
|
grouping_sid: grouping_sid,
|
|
75
|
+
date_created_after: date_created_after,
|
|
76
|
+
date_created_before: date_created_before,
|
|
69
77
|
page_size: limits[:page_size],
|
|
70
78
|
)
|
|
71
79
|
|
|
@@ -79,6 +87,8 @@ module Twilio
|
|
|
79
87
|
# @param [recording.Status] status The status
|
|
80
88
|
# @param [String] source_sid The source_sid
|
|
81
89
|
# @param [String] grouping_sid The grouping_sid
|
|
90
|
+
# @param [Time] date_created_after The date_created_after
|
|
91
|
+
# @param [Time] date_created_before The date_created_before
|
|
82
92
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
83
93
|
# guarantees to never return more than limit. Default is no limit
|
|
84
94
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -103,15 +113,19 @@ module Twilio
|
|
|
103
113
|
# @param [recording.Status] status The status
|
|
104
114
|
# @param [String] source_sid The source_sid
|
|
105
115
|
# @param [String] grouping_sid The grouping_sid
|
|
116
|
+
# @param [Time] date_created_after The date_created_after
|
|
117
|
+
# @param [Time] date_created_before The date_created_before
|
|
106
118
|
# @param [String] page_token PageToken provided by the API
|
|
107
119
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
108
120
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
109
121
|
# @return [Page] Page of RecordingInstance
|
|
110
|
-
def page(status: :unset, source_sid: :unset, grouping_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
|
122
|
+
def page(status: :unset, source_sid: :unset, grouping_sid: :unset, date_created_after: :unset, date_created_before: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
|
111
123
|
params = Twilio::Values.of({
|
|
112
124
|
'Status' => status,
|
|
113
125
|
'SourceSid' => source_sid,
|
|
114
126
|
'GroupingSid' => grouping_sid,
|
|
127
|
+
'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
|
|
128
|
+
'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
|
|
115
129
|
'PageToken' => page_token,
|
|
116
130
|
'Page' => page_number,
|
|
117
131
|
'PageSize' => page_size,
|
|
@@ -280,8 +280,11 @@ module Twilio
|
|
|
280
280
|
|
|
281
281
|
##
|
|
282
282
|
# Access the recordings
|
|
283
|
-
# @return [RoomRecordingList] RoomRecordingList
|
|
283
|
+
# @return [RoomRecordingList] if a(n) RoomRecordingList object was created.
|
|
284
|
+
# @return [RoomRecordingContext] if a(n) RoomRecordingContext object was created.
|
|
284
285
|
def recordings(sid=:unset)
|
|
286
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
287
|
+
|
|
285
288
|
if sid != :unset
|
|
286
289
|
return RoomRecordingContext.new(
|
|
287
290
|
@version,
|
|
@@ -29,6 +29,10 @@ module Twilio
|
|
|
29
29
|
# Lists RoomRecordingInstance records from the API as a list.
|
|
30
30
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
31
31
|
# memory before returning.
|
|
32
|
+
# @param [room_recording.Status] status The status
|
|
33
|
+
# @param [String] source_sid The source_sid
|
|
34
|
+
# @param [Time] date_created_after The date_created_after
|
|
35
|
+
# @param [Time] date_created_before The date_created_before
|
|
32
36
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
33
37
|
# guarantees to never return more than limit. Default is no limit
|
|
34
38
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -36,8 +40,12 @@ module Twilio
|
|
|
36
40
|
# but a limit is defined, stream() will attempt to read the
|
|
37
41
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
38
42
|
# @return [Array] Array of up to limit results
|
|
39
|
-
def list(limit: nil, page_size: nil)
|
|
43
|
+
def list(status: :unset, source_sid: :unset, date_created_after: :unset, date_created_before: :unset, limit: nil, page_size: nil)
|
|
40
44
|
self.stream(
|
|
45
|
+
status: status,
|
|
46
|
+
source_sid: source_sid,
|
|
47
|
+
date_created_after: date_created_after,
|
|
48
|
+
date_created_before: date_created_before,
|
|
41
49
|
limit: limit,
|
|
42
50
|
page_size: page_size
|
|
43
51
|
).entries
|
|
@@ -47,6 +55,10 @@ module Twilio
|
|
|
47
55
|
# Streams RoomRecordingInstance records from the API as an Enumerable.
|
|
48
56
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
49
57
|
# is reached.
|
|
58
|
+
# @param [room_recording.Status] status The status
|
|
59
|
+
# @param [String] source_sid The source_sid
|
|
60
|
+
# @param [Time] date_created_after The date_created_after
|
|
61
|
+
# @param [Time] date_created_before The date_created_before
|
|
50
62
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
51
63
|
# guarantees to never return more than limit. Default is no limit
|
|
52
64
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -54,10 +66,14 @@ module Twilio
|
|
|
54
66
|
# but a limit is defined, stream() will attempt to read the
|
|
55
67
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
56
68
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
57
|
-
def stream(limit: nil, page_size: nil)
|
|
69
|
+
def stream(status: :unset, source_sid: :unset, date_created_after: :unset, date_created_before: :unset, limit: nil, page_size: nil)
|
|
58
70
|
limits = @version.read_limits(limit, page_size)
|
|
59
71
|
|
|
60
72
|
page = self.page(
|
|
73
|
+
status: status,
|
|
74
|
+
source_sid: source_sid,
|
|
75
|
+
date_created_after: date_created_after,
|
|
76
|
+
date_created_before: date_created_before,
|
|
61
77
|
page_size: limits[:page_size],
|
|
62
78
|
)
|
|
63
79
|
|
|
@@ -68,6 +84,10 @@ module Twilio
|
|
|
68
84
|
# When passed a block, yields RoomRecordingInstance records from the API.
|
|
69
85
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
70
86
|
# is reached.
|
|
87
|
+
# @param [room_recording.Status] status The status
|
|
88
|
+
# @param [String] source_sid The source_sid
|
|
89
|
+
# @param [Time] date_created_after The date_created_after
|
|
90
|
+
# @param [Time] date_created_before The date_created_before
|
|
71
91
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
72
92
|
# guarantees to never return more than limit. Default is no limit
|
|
73
93
|
# @param [Integer] page_size Number of records to fetch per request, when not set will use
|
|
@@ -89,12 +109,20 @@ module Twilio
|
|
|
89
109
|
##
|
|
90
110
|
# Retrieve a single page of RoomRecordingInstance records from the API.
|
|
91
111
|
# Request is executed immediately.
|
|
112
|
+
# @param [room_recording.Status] status The status
|
|
113
|
+
# @param [String] source_sid The source_sid
|
|
114
|
+
# @param [Time] date_created_after The date_created_after
|
|
115
|
+
# @param [Time] date_created_before The date_created_before
|
|
92
116
|
# @param [String] page_token PageToken provided by the API
|
|
93
117
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
94
118
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
95
119
|
# @return [Page] Page of RoomRecordingInstance
|
|
96
|
-
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
|
120
|
+
def page(status: :unset, source_sid: :unset, date_created_after: :unset, date_created_before: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
|
97
121
|
params = Twilio::Values.of({
|
|
122
|
+
'Status' => status,
|
|
123
|
+
'SourceSid' => source_sid,
|
|
124
|
+
'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
|
|
125
|
+
'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
|
|
98
126
|
'PageToken' => page_token,
|
|
99
127
|
'Page' => page_number,
|
|
100
128
|
'PageSize' => page_size,
|
|
@@ -19,7 +19,9 @@ module Twilio
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def commands(sid=:unset)
|
|
22
|
-
if sid
|
|
22
|
+
if sid.nil?
|
|
23
|
+
raise ArgumentError, 'sid cannot be nil'
|
|
24
|
+
elsif sid == :unset
|
|
23
25
|
@commands ||= CommandList.new self
|
|
24
26
|
else
|
|
25
27
|
CommandContext.new(self, sid)
|
|
@@ -27,7 +29,9 @@ module Twilio
|
|
|
27
29
|
end
|
|
28
30
|
|
|
29
31
|
def rate_plans(sid=:unset)
|
|
30
|
-
if sid
|
|
32
|
+
if sid.nil?
|
|
33
|
+
raise ArgumentError, 'sid cannot be nil'
|
|
34
|
+
elsif sid == :unset
|
|
31
35
|
@rate_plans ||= RatePlanList.new self
|
|
32
36
|
else
|
|
33
37
|
RatePlanContext.new(self, sid)
|
|
@@ -35,7 +39,9 @@ module Twilio
|
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
def sims(sid=:unset)
|
|
38
|
-
if sid
|
|
42
|
+
if sid.nil?
|
|
43
|
+
raise ArgumentError, 'sid cannot be nil'
|
|
44
|
+
elsif sid == :unset
|
|
39
45
|
@sims ||= SimList.new self
|
|
40
46
|
else
|
|
41
47
|
SimContext.new(self, sid)
|
|
@@ -128,8 +128,11 @@ module Twilio
|
|
|
128
128
|
# @param [Boolean] voice_enabled The voice_enabled
|
|
129
129
|
# @param [Boolean] national_roaming_enabled The national_roaming_enabled
|
|
130
130
|
# @param [String] international_roaming The international_roaming
|
|
131
|
+
# @param [String] national_roaming_data_limit The national_roaming_data_limit
|
|
132
|
+
# @param [String] international_roaming_data_limit The
|
|
133
|
+
# international_roaming_data_limit
|
|
131
134
|
# @return [RatePlanInstance] Newly created RatePlanInstance
|
|
132
|
-
def create(unique_name: :unset, friendly_name: :unset, data_enabled: :unset, data_limit: :unset, data_metering: :unset, messaging_enabled: :unset, voice_enabled: :unset, national_roaming_enabled: :unset, international_roaming: :unset)
|
|
135
|
+
def create(unique_name: :unset, friendly_name: :unset, data_enabled: :unset, data_limit: :unset, data_metering: :unset, messaging_enabled: :unset, voice_enabled: :unset, national_roaming_enabled: :unset, international_roaming: :unset, national_roaming_data_limit: :unset, international_roaming_data_limit: :unset)
|
|
133
136
|
data = Twilio::Values.of({
|
|
134
137
|
'UniqueName' => unique_name,
|
|
135
138
|
'FriendlyName' => friendly_name,
|
|
@@ -140,6 +143,8 @@ module Twilio
|
|
|
140
143
|
'VoiceEnabled' => voice_enabled,
|
|
141
144
|
'NationalRoamingEnabled' => national_roaming_enabled,
|
|
142
145
|
'InternationalRoaming' => international_roaming,
|
|
146
|
+
'NationalRoamingDataLimit' => national_roaming_data_limit,
|
|
147
|
+
'InternationalRoamingDataLimit' => international_roaming_data_limit,
|
|
143
148
|
})
|
|
144
149
|
|
|
145
150
|
payload = @version.create(
|
|
@@ -289,7 +294,9 @@ module Twilio
|
|
|
289
294
|
'messaging_enabled' => payload['messaging_enabled'],
|
|
290
295
|
'voice_enabled' => payload['voice_enabled'],
|
|
291
296
|
'national_roaming_enabled' => payload['national_roaming_enabled'],
|
|
297
|
+
'national_roaming_data_limit' => payload['national_roaming_data_limit'].to_i,
|
|
292
298
|
'international_roaming' => payload['international_roaming'],
|
|
299
|
+
'international_roaming_data_limit' => payload['international_roaming_data_limit'].to_i,
|
|
293
300
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
294
301
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
295
302
|
'url' => payload['url'],
|
|
@@ -357,10 +364,18 @@ module Twilio
|
|
|
357
364
|
@properties['national_roaming_enabled']
|
|
358
365
|
end
|
|
359
366
|
|
|
367
|
+
def national_roaming_data_limit
|
|
368
|
+
@properties['national_roaming_data_limit']
|
|
369
|
+
end
|
|
370
|
+
|
|
360
371
|
def international_roaming
|
|
361
372
|
@properties['international_roaming']
|
|
362
373
|
end
|
|
363
374
|
|
|
375
|
+
def international_roaming_data_limit
|
|
376
|
+
@properties['international_roaming_data_limit']
|
|
377
|
+
end
|
|
378
|
+
|
|
364
379
|
def date_created
|
|
365
380
|
@properties['date_created']
|
|
366
381
|
end
|
|
@@ -282,7 +282,8 @@ module Twilio
|
|
|
282
282
|
|
|
283
283
|
##
|
|
284
284
|
# Access the usage_records
|
|
285
|
-
# @return [UsageRecordList] UsageRecordList
|
|
285
|
+
# @return [UsageRecordList] if a(n) UsageRecordList object was created.
|
|
286
|
+
# @return [UsageRecordContext] if a(n) UsageRecordContext object was created.
|
|
286
287
|
def usage_records
|
|
287
288
|
unless @usage_records
|
|
288
289
|
@usage_records = UsageRecordList.new(
|
|
@@ -7,6 +7,7 @@ module Twilio
|
|
|
7
7
|
def initialize()
|
|
8
8
|
super()
|
|
9
9
|
self.name = 'Response'
|
|
10
|
+
yield(self) if block_given?
|
|
10
11
|
end
|
|
11
12
|
|
|
12
13
|
# Create a <Message> element
|
|
@@ -31,7 +32,7 @@ module Twilio
|
|
|
31
32
|
status_callback: nil,
|
|
32
33
|
**keyword_args)
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
message = Message.new(
|
|
35
36
|
body: body,
|
|
36
37
|
to: to,
|
|
37
38
|
from: from,
|
|
@@ -39,7 +40,11 @@ module Twilio
|
|
|
39
40
|
action: action,
|
|
40
41
|
status_callback: status_callback,
|
|
41
42
|
**keyword_args
|
|
42
|
-
)
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
yield(message) if block_given?
|
|
46
|
+
|
|
47
|
+
self.append(message)
|
|
43
48
|
end
|
|
44
49
|
|
|
45
50
|
# Create an <Redirect> element
|
|
@@ -71,6 +76,7 @@ module Twilio
|
|
|
71
76
|
if !(body.nil?)
|
|
72
77
|
@value = body
|
|
73
78
|
end
|
|
79
|
+
yield(self) if block_given?
|
|
74
80
|
end
|
|
75
81
|
|
|
76
82
|
# Create a <Body> element
|