twilio-ruby 5.60.0 → 5.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/test-and-deploy.yml +95 -0
- data/.gitignore +3 -1
- data/.rubocop.yml +1 -1
- data/CHANGES.md +98 -0
- data/Makefile +3 -4
- data/README.md +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +31 -6
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +7 -0
- data/lib/twilio-ruby/rest/insights.rb +6 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +15 -2
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +84 -3
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +9 -3
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +416 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +16 -0
- data/lib/twilio-ruby/rest/supersim.rb +9 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +8 -2
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +8 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +16 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +5 -5
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +9 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -3
- data/lib/twilio-ruby/rest/video/v1/room.rb +34 -1
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
- data/lib/twilio-ruby/rest/voice.rb +8 -0
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
- data/lib/twilio-ruby/twiml/voice_response.rb +613 -36
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +9 -4
- data/.travis.yml +0 -57
@@ -73,8 +73,11 @@ module Twilio
|
|
73
73
|
# @param [String] totp_skew Optional configuration for the TOTP factors. The
|
74
74
|
# number of time-steps, past and future, that are valid for validation of TOTP
|
75
75
|
# codes. Must be between 0 and 2, inclusive. Defaults to 1
|
76
|
+
# @param [String] default_template_sid The default message
|
77
|
+
# {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
|
78
|
+
# all SMS verifications unless explicitly overriden. SMS channel only.
|
76
79
|
# @return [ServiceInstance] Created ServiceInstance
|
77
|
-
def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
|
80
|
+
def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
|
78
81
|
data = Twilio::Values.of({
|
79
82
|
'FriendlyName' => friendly_name,
|
80
83
|
'CodeLength' => code_length,
|
@@ -92,6 +95,7 @@ module Twilio
|
|
92
95
|
'Totp.TimeStep' => totp_time_step,
|
93
96
|
'Totp.CodeLength' => totp_code_length,
|
94
97
|
'Totp.Skew' => totp_skew,
|
98
|
+
'DefaultTemplateSid' => default_template_sid,
|
95
99
|
})
|
96
100
|
|
97
101
|
payload = @version.create('POST', @uri, data: data)
|
@@ -303,8 +307,11 @@ module Twilio
|
|
303
307
|
# @param [String] totp_skew Optional configuration for the TOTP factors. The
|
304
308
|
# number of time-steps, past and future, that are valid for validation of TOTP
|
305
309
|
# codes. Must be between 0 and 2, inclusive. Defaults to 1
|
310
|
+
# @param [String] default_template_sid The default message
|
311
|
+
# {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
|
312
|
+
# all SMS verifications unless explicitly overriden. SMS channel only.
|
306
313
|
# @return [ServiceInstance] Updated ServiceInstance
|
307
|
-
def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
|
314
|
+
def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
|
308
315
|
data = Twilio::Values.of({
|
309
316
|
'FriendlyName' => friendly_name,
|
310
317
|
'CodeLength' => code_length,
|
@@ -322,6 +329,7 @@ module Twilio
|
|
322
329
|
'Totp.TimeStep' => totp_time_step,
|
323
330
|
'Totp.CodeLength' => totp_code_length,
|
324
331
|
'Totp.Skew' => totp_skew,
|
332
|
+
'DefaultTemplateSid' => default_template_sid,
|
325
333
|
})
|
326
334
|
|
327
335
|
payload = @version.update('POST', @uri, data: data)
|
@@ -484,6 +492,7 @@ module Twilio
|
|
484
492
|
'custom_code_enabled' => payload['custom_code_enabled'],
|
485
493
|
'push' => payload['push'],
|
486
494
|
'totp' => payload['totp'],
|
495
|
+
'default_template_sid' => payload['default_template_sid'],
|
487
496
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
488
497
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
489
498
|
'url' => payload['url'],
|
@@ -584,6 +593,12 @@ module Twilio
|
|
584
593
|
@properties['totp']
|
585
594
|
end
|
586
595
|
|
596
|
+
##
|
597
|
+
# @return [String] The default_template_sid
|
598
|
+
def default_template_sid
|
599
|
+
@properties['default_template_sid']
|
600
|
+
end
|
601
|
+
|
587
602
|
##
|
588
603
|
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
589
604
|
def date_created
|
@@ -670,8 +685,11 @@ module Twilio
|
|
670
685
|
# @param [String] totp_skew Optional configuration for the TOTP factors. The
|
671
686
|
# number of time-steps, past and future, that are valid for validation of TOTP
|
672
687
|
# codes. Must be between 0 and 2, inclusive. Defaults to 1
|
688
|
+
# @param [String] default_template_sid The default message
|
689
|
+
# {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
|
690
|
+
# all SMS verifications unless explicitly overriden. SMS channel only.
|
673
691
|
# @return [ServiceInstance] Updated ServiceInstance
|
674
|
-
def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
|
692
|
+
def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
|
675
693
|
context.update(
|
676
694
|
friendly_name: friendly_name,
|
677
695
|
code_length: code_length,
|
@@ -689,6 +707,7 @@ module Twilio
|
|
689
707
|
totp_time_step: totp_time_step,
|
690
708
|
totp_code_length: totp_code_length,
|
691
709
|
totp_skew: totp_skew,
|
710
|
+
default_template_sid: default_template_sid,
|
692
711
|
)
|
693
712
|
end
|
694
713
|
|
@@ -60,8 +60,17 @@ module Twilio
|
|
60
60
|
# @param [Boolean] audio_only When set to true, indicates that the participants in
|
61
61
|
# the room will only publish audio. No video tracks will be allowed. Group rooms
|
62
62
|
# only.
|
63
|
+
# @param [String] max_participant_duration The maximum number of seconds a
|
64
|
+
# Participant can be connected to the room. The maximum possible value is 86400
|
65
|
+
# seconds (24 hours). The default is 14400 seconds (4 hours).
|
66
|
+
# @param [String] empty_room_timeout Configures how long (in minutes) a room will
|
67
|
+
# remain active after last participant leaves. Valid values range from 1 to 60
|
68
|
+
# minutes (no fractions).
|
69
|
+
# @param [String] unused_room_timeout Configures how long (in minutes) a room will
|
70
|
+
# remain active if no one joins. Valid values range from 1 to 60 minutes (no
|
71
|
+
# fractions).
|
63
72
|
# @return [RoomInstance] Created RoomInstance
|
64
|
-
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset)
|
73
|
+
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset, max_participant_duration: :unset, empty_room_timeout: :unset, unused_room_timeout: :unset)
|
65
74
|
data = Twilio::Values.of({
|
66
75
|
'EnableTurn' => enable_turn,
|
67
76
|
'Type' => type,
|
@@ -74,6 +83,9 @@ module Twilio
|
|
74
83
|
'MediaRegion' => media_region,
|
75
84
|
'RecordingRules' => Twilio.serialize_object(recording_rules),
|
76
85
|
'AudioOnly' => audio_only,
|
86
|
+
'MaxParticipantDuration' => max_participant_duration,
|
87
|
+
'EmptyRoomTimeout' => empty_room_timeout,
|
88
|
+
'UnusedRoomTimeout' => unused_room_timeout,
|
77
89
|
})
|
78
90
|
|
79
91
|
payload = @version.create('POST', @uri, data: data)
|
@@ -364,11 +376,14 @@ module Twilio
|
|
364
376
|
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
365
377
|
'type' => payload['type'],
|
366
378
|
'max_participants' => payload['max_participants'].to_i,
|
379
|
+
'max_participant_duration' => payload['max_participant_duration'].to_i,
|
367
380
|
'max_concurrent_published_tracks' => payload['max_concurrent_published_tracks'] == nil ? payload['max_concurrent_published_tracks'] : payload['max_concurrent_published_tracks'].to_i,
|
368
381
|
'record_participants_on_connect' => payload['record_participants_on_connect'],
|
369
382
|
'video_codecs' => payload['video_codecs'],
|
370
383
|
'media_region' => payload['media_region'],
|
371
384
|
'audio_only' => payload['audio_only'],
|
385
|
+
'empty_room_timeout' => payload['empty_room_timeout'].to_i,
|
386
|
+
'unused_room_timeout' => payload['unused_room_timeout'].to_i,
|
372
387
|
'url' => payload['url'],
|
373
388
|
'links' => payload['links'],
|
374
389
|
}
|
@@ -467,6 +482,12 @@ module Twilio
|
|
467
482
|
@properties['max_participants']
|
468
483
|
end
|
469
484
|
|
485
|
+
##
|
486
|
+
# @return [String] The maximum number of seconds a Participant can be connected to the room
|
487
|
+
def max_participant_duration
|
488
|
+
@properties['max_participant_duration']
|
489
|
+
end
|
490
|
+
|
470
491
|
##
|
471
492
|
# @return [String] The maximum number of published tracks allowed in the room at the same time
|
472
493
|
def max_concurrent_published_tracks
|
@@ -497,6 +518,18 @@ module Twilio
|
|
497
518
|
@properties['audio_only']
|
498
519
|
end
|
499
520
|
|
521
|
+
##
|
522
|
+
# @return [String] The time a room will remain active after last participant leaves.
|
523
|
+
def empty_room_timeout
|
524
|
+
@properties['empty_room_timeout']
|
525
|
+
end
|
526
|
+
|
527
|
+
##
|
528
|
+
# @return [String] The time a room will remain active when no one joins.
|
529
|
+
def unused_room_timeout
|
530
|
+
@properties['unused_room_timeout']
|
531
|
+
end
|
532
|
+
|
500
533
|
##
|
501
534
|
# @return [String] The absolute URL of the resource
|
502
535
|
def url
|
@@ -0,0 +1,184 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Voice < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class ArchivedCallList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the ArchivedCallList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [ArchivedCallList] ArchivedCallList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Provide a user friendly representation
|
29
|
+
def to_s
|
30
|
+
'#<Twilio.Voice.V1.ArchivedCallList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
36
|
+
class ArchivedCallPage < Page
|
37
|
+
##
|
38
|
+
# Initialize the ArchivedCallPage
|
39
|
+
# @param [Version] version Version that contains the resource
|
40
|
+
# @param [Response] response Response from the API
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
42
|
+
# @return [ArchivedCallPage] ArchivedCallPage
|
43
|
+
def initialize(version, response, solution)
|
44
|
+
super(version, response)
|
45
|
+
|
46
|
+
# Path Solution
|
47
|
+
@solution = solution
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Build an instance of ArchivedCallInstance
|
52
|
+
# @param [Hash] payload Payload response from the API
|
53
|
+
# @return [ArchivedCallInstance] ArchivedCallInstance
|
54
|
+
def get_instance(payload)
|
55
|
+
ArchivedCallInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Provide a user friendly representation
|
60
|
+
def to_s
|
61
|
+
'<Twilio.Voice.V1.ArchivedCallPage>'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
67
|
+
class ArchivedCallContext < InstanceContext
|
68
|
+
##
|
69
|
+
# Initialize the ArchivedCallContext
|
70
|
+
# @param [Version] version Version that contains the resource
|
71
|
+
# @param [Date] date The date of the Call in UTC.
|
72
|
+
# @param [String] sid The Twilio-provided Call SID that uniquely identifies the
|
73
|
+
# Call resource to delete
|
74
|
+
# @return [ArchivedCallContext] ArchivedCallContext
|
75
|
+
def initialize(version, date, sid)
|
76
|
+
super(version)
|
77
|
+
|
78
|
+
# Path Solution
|
79
|
+
@solution = {date: date, sid: sid, }
|
80
|
+
@uri = "/Archives/#{@solution[:date]}/Calls/#{@solution[:sid]}"
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Delete the ArchivedCallInstance
|
85
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
86
|
+
def delete
|
87
|
+
@version.delete('DELETE', @uri)
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# Provide a user friendly representation
|
92
|
+
def to_s
|
93
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
94
|
+
"#<Twilio.Voice.V1.ArchivedCallContext #{context}>"
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Provide a detailed, user friendly representation
|
99
|
+
def inspect
|
100
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
101
|
+
"#<Twilio.Voice.V1.ArchivedCallContext #{context}>"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
107
|
+
class ArchivedCallInstance < InstanceResource
|
108
|
+
##
|
109
|
+
# Initialize the ArchivedCallInstance
|
110
|
+
# @param [Version] version Version that contains the resource
|
111
|
+
# @param [Hash] payload payload that contains response from Twilio
|
112
|
+
# @param [Date] date The date of the Call in UTC.
|
113
|
+
# @param [String] sid The Twilio-provided Call SID that uniquely identifies the
|
114
|
+
# Call resource to delete
|
115
|
+
# @return [ArchivedCallInstance] ArchivedCallInstance
|
116
|
+
def initialize(version, payload, date: nil, sid: nil)
|
117
|
+
super(version)
|
118
|
+
|
119
|
+
# Marshaled Properties
|
120
|
+
@properties = {
|
121
|
+
'date' => Twilio.deserialize_iso8601_date(payload['date']),
|
122
|
+
'sid' => payload['sid'],
|
123
|
+
'url' => payload['url'],
|
124
|
+
}
|
125
|
+
|
126
|
+
# Context
|
127
|
+
@instance_context = nil
|
128
|
+
@params = {'date' => date || @properties['date'], 'sid' => sid || @properties['sid'], }
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Generate an instance context for the instance, the context is capable of
|
133
|
+
# performing various actions. All instance actions are proxied to the context
|
134
|
+
# @return [ArchivedCallContext] ArchivedCallContext for this ArchivedCallInstance
|
135
|
+
def context
|
136
|
+
unless @instance_context
|
137
|
+
@instance_context = ArchivedCallContext.new(@version, @params['date'], @params['sid'], )
|
138
|
+
end
|
139
|
+
@instance_context
|
140
|
+
end
|
141
|
+
|
142
|
+
##
|
143
|
+
# @return [Date] date
|
144
|
+
def date
|
145
|
+
@properties['date']
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# @return [String] sid
|
150
|
+
def sid
|
151
|
+
@properties['sid']
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [String] The absolute URL of the resource
|
156
|
+
def url
|
157
|
+
@properties['url']
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# Delete the ArchivedCallInstance
|
162
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
163
|
+
def delete
|
164
|
+
context.delete
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Provide a user friendly representation
|
169
|
+
def to_s
|
170
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
171
|
+
"<Twilio.Voice.V1.ArchivedCallInstance #{values}>"
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# Provide a detailed, user friendly representation
|
176
|
+
def inspect
|
177
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
178
|
+
"<Twilio.Voice.V1.ArchivedCallInstance #{values}>"
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
@@ -15,6 +15,7 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
+
@archived_calls = nil
|
18
19
|
@byoc_trunks = nil
|
19
20
|
@connection_policies = nil
|
20
21
|
@dialing_permissions = nil
|
@@ -22,6 +23,26 @@ module Twilio
|
|
22
23
|
@source_ip_mappings = nil
|
23
24
|
end
|
24
25
|
|
26
|
+
##
|
27
|
+
# @param [Date] date The date of the Call in UTC.
|
28
|
+
# @param [String] sid The Twilio-provided Call SID that uniquely identifies the
|
29
|
+
# Call resource to delete
|
30
|
+
# @return [Twilio::REST::Voice::V1::ArchivedCallContext] if sid was passed.
|
31
|
+
# @return [Twilio::REST::Voice::V1::ArchivedCallList]
|
32
|
+
def archived_calls(date=:unset, sid=:unset)
|
33
|
+
if date.nil?
|
34
|
+
raise ArgumentError, 'date cannot be nil'
|
35
|
+
end
|
36
|
+
if sid.nil?
|
37
|
+
raise ArgumentError, 'sid cannot be nil'
|
38
|
+
end
|
39
|
+
if date == :unset && sid == :unset
|
40
|
+
@archived_calls ||= ArchivedCallList.new self
|
41
|
+
else
|
42
|
+
ArchivedCallContext.new(self, date, sid)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
25
46
|
##
|
26
47
|
# @param [String] sid The Twilio-provided string that uniquely identifies the BYOC
|
27
48
|
# Trunk resource to fetch.
|
@@ -28,6 +28,14 @@ module Twilio
|
|
28
28
|
@v1 ||= V1.new self
|
29
29
|
end
|
30
30
|
|
31
|
+
##
|
32
|
+
# @param [String] sid The call sid
|
33
|
+
# @return [Twilio::REST::Voice::V1::ArchivedCallInstance] if sid was passed.
|
34
|
+
# @return [Twilio::REST::Voice::V1::ArchivedCallList]
|
35
|
+
def archived_calls(date=:unset, sid=:unset)
|
36
|
+
self.v1.archived_calls(date, sid)
|
37
|
+
end
|
38
|
+
|
31
39
|
##
|
32
40
|
# @param [String] sid The unique string that that we created to identify the BYOC
|
33
41
|
# Trunk resource.
|
@@ -123,13 +123,13 @@ module Twilio
|
|
123
123
|
# models}[https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans].
|
124
124
|
# @param [Boolean] messaging_enabled Whether SIMs can make, send, and receive SMS
|
125
125
|
# using {Commands}[https://www.twilio.com/docs/wireless/api/command-resource].
|
126
|
-
# @param [Boolean] voice_enabled
|
126
|
+
# @param [Boolean] voice_enabled Deprecated.
|
127
127
|
# @param [Boolean] national_roaming_enabled Whether SIMs can roam on networks
|
128
128
|
# other than the home network (T-Mobile USA) in the United States. See {national
|
129
129
|
# roaming}[https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming].
|
130
130
|
# @param [Array[String]] international_roaming The list of services that SIMs
|
131
131
|
# capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United
|
132
|
-
# States. Can
|
132
|
+
# States. Can contain: `data` and `messaging`.
|
133
133
|
# @param [String] national_roaming_data_limit The total data usage (download and
|
134
134
|
# upload combined) in Megabytes that the Network allows during one month on
|
135
135
|
# non-home networks in the United States. The metering period begins the day of
|
@@ -353,7 +353,7 @@ module Twilio
|
|
353
353
|
end
|
354
354
|
|
355
355
|
##
|
356
|
-
# @return [Boolean] Whether SIMs can make and receive voice calls
|
356
|
+
# @return [Boolean] Deprecated. Whether SIMs can make and receive voice calls
|
357
357
|
def voice_enabled
|
358
358
|
@properties['voice_enabled']
|
359
359
|
end
|
@@ -249,15 +249,10 @@ module Twilio
|
|
249
249
|
# @param [String] sms_url The URL we should call using the `sms_method` when the
|
250
250
|
# SIM-connected device sends an SMS message that is not a
|
251
251
|
# {Command}[https://www.twilio.com/docs/wireless/api/command-resource].
|
252
|
-
# @param [String] voice_fallback_method
|
253
|
-
#
|
254
|
-
# @param [String]
|
255
|
-
#
|
256
|
-
# TwiML requested from `voice_url`.
|
257
|
-
# @param [String] voice_method The HTTP method we should use when we call
|
258
|
-
# `voice_url`. Can be: `GET` or `POST`.
|
259
|
-
# @param [String] voice_url The URL we should call using the `voice_method` when
|
260
|
-
# the SIM-connected device makes a voice call.
|
252
|
+
# @param [String] voice_fallback_method Deprecated.
|
253
|
+
# @param [String] voice_fallback_url Deprecated.
|
254
|
+
# @param [String] voice_method Deprecated.
|
255
|
+
# @param [String] voice_url Deprecated.
|
261
256
|
# @param [sim.ResetStatus] reset_status Initiate a connectivity reset on the SIM.
|
262
257
|
# Set to `resetting` to initiate a connectivity reset on the SIM. No other value
|
263
258
|
# is valid.
|
@@ -463,49 +458,49 @@ module Twilio
|
|
463
458
|
end
|
464
459
|
|
465
460
|
##
|
466
|
-
# @return [String]
|
461
|
+
# @return [String] Deprecated
|
467
462
|
def sms_fallback_method
|
468
463
|
@properties['sms_fallback_method']
|
469
464
|
end
|
470
465
|
|
471
466
|
##
|
472
|
-
# @return [String]
|
467
|
+
# @return [String] Deprecated
|
473
468
|
def sms_fallback_url
|
474
469
|
@properties['sms_fallback_url']
|
475
470
|
end
|
476
471
|
|
477
472
|
##
|
478
|
-
# @return [String]
|
473
|
+
# @return [String] Deprecated
|
479
474
|
def sms_method
|
480
475
|
@properties['sms_method']
|
481
476
|
end
|
482
477
|
|
483
478
|
##
|
484
|
-
# @return [String]
|
479
|
+
# @return [String] Deprecated
|
485
480
|
def sms_url
|
486
481
|
@properties['sms_url']
|
487
482
|
end
|
488
483
|
|
489
484
|
##
|
490
|
-
# @return [String] The HTTP method we use to call voice_fallback_url
|
485
|
+
# @return [String] Deprecated. The HTTP method we use to call voice_fallback_url
|
491
486
|
def voice_fallback_method
|
492
487
|
@properties['voice_fallback_method']
|
493
488
|
end
|
494
489
|
|
495
490
|
##
|
496
|
-
# @return [String] The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url
|
491
|
+
# @return [String] Deprecated. The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url
|
497
492
|
def voice_fallback_url
|
498
493
|
@properties['voice_fallback_url']
|
499
494
|
end
|
500
495
|
|
501
496
|
##
|
502
|
-
# @return [String] The HTTP method we use to call voice_url
|
497
|
+
# @return [String] Deprecated. The HTTP method we use to call voice_url
|
503
498
|
def voice_method
|
504
499
|
@properties['voice_method']
|
505
500
|
end
|
506
501
|
|
507
502
|
##
|
508
|
-
# @return [String] The URL we call when the SIM-connected device makes a voice call
|
503
|
+
# @return [String] Deprecated. The URL we call when the SIM-connected device makes a voice call
|
509
504
|
def voice_url
|
510
505
|
@properties['voice_url']
|
511
506
|
end
|
@@ -583,15 +578,10 @@ module Twilio
|
|
583
578
|
# @param [String] sms_url The URL we should call using the `sms_method` when the
|
584
579
|
# SIM-connected device sends an SMS message that is not a
|
585
580
|
# {Command}[https://www.twilio.com/docs/wireless/api/command-resource].
|
586
|
-
# @param [String] voice_fallback_method
|
587
|
-
#
|
588
|
-
# @param [String]
|
589
|
-
#
|
590
|
-
# TwiML requested from `voice_url`.
|
591
|
-
# @param [String] voice_method The HTTP method we should use when we call
|
592
|
-
# `voice_url`. Can be: `GET` or `POST`.
|
593
|
-
# @param [String] voice_url The URL we should call using the `voice_method` when
|
594
|
-
# the SIM-connected device makes a voice call.
|
581
|
+
# @param [String] voice_fallback_method Deprecated.
|
582
|
+
# @param [String] voice_fallback_url Deprecated.
|
583
|
+
# @param [String] voice_method Deprecated.
|
584
|
+
# @param [String] voice_url Deprecated.
|
595
585
|
# @param [sim.ResetStatus] reset_status Initiate a connectivity reset on the SIM.
|
596
586
|
# Set to `resetting` to initiate a connectivity reset on the SIM. No other value
|
597
587
|
# is valid.
|