twilio-ruby 5.70.0 → 5.72.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +57 -0
- data/Makefile +6 -2
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +34 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
- data/lib/twilio-ruby/rest/client.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +4 -5
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +559 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +16 -0
- data/lib/twilio-ruby/rest/messaging.rb +8 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +305 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +332 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +60 -0
- data/lib/twilio-ruby/rest/microvisor.rb +54 -0
- data/lib/twilio-ruby/rest/preview.rb +0 -25
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
- data/lib/twilio-ruby/rest/routes.rb +62 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +16 -6
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -8
- data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
- data/lib/twilio-ruby/rest/verify.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
- data/lib/twilio-ruby/security/request_validator.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +19 -5
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +14 -8
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +0 -294
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
@@ -0,0 +1,54 @@
|
|
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 Microvisor < Domain
|
12
|
+
##
|
13
|
+
# Initialize the Microvisor Domain
|
14
|
+
def initialize(twilio)
|
15
|
+
super
|
16
|
+
|
17
|
+
@base_url = 'https://microvisor.twilio.com'
|
18
|
+
@host = 'microvisor.twilio.com'
|
19
|
+
@port = 443
|
20
|
+
|
21
|
+
# Versions
|
22
|
+
@v1 = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Version v1 of microvisor
|
27
|
+
def v1
|
28
|
+
@v1 ||= V1.new self
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# @param [String] sid A 34-character string that uniquely identifies this App.
|
33
|
+
# @return [Twilio::REST::Microvisor::V1::AppInstance] if sid was passed.
|
34
|
+
# @return [Twilio::REST::Microvisor::V1::AppList]
|
35
|
+
def apps(sid=:unset)
|
36
|
+
self.v1.apps(sid)
|
37
|
+
end
|
38
|
+
|
39
|
+
##
|
40
|
+
# @param [String] sid A 34-character string that uniquely identifies this Device.
|
41
|
+
# @return [Twilio::REST::Microvisor::V1::DeviceInstance] if sid was passed.
|
42
|
+
# @return [Twilio::REST::Microvisor::V1::DeviceList]
|
43
|
+
def devices(sid=:unset)
|
44
|
+
self.v1.devices(sid)
|
45
|
+
end
|
46
|
+
|
47
|
+
##
|
48
|
+
# Provide a user friendly representation
|
49
|
+
def to_s
|
50
|
+
'#<Twilio::REST::Microvisor>'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -19,7 +19,6 @@ module Twilio
|
|
19
19
|
@port = 443
|
20
20
|
|
21
21
|
# Versions
|
22
|
-
@bulk_exports = nil
|
23
22
|
@deployed_devices = nil
|
24
23
|
@hosted_numbers = nil
|
25
24
|
@marketplace = nil
|
@@ -29,12 +28,6 @@ module Twilio
|
|
29
28
|
@trusted_comms = nil
|
30
29
|
end
|
31
30
|
|
32
|
-
##
|
33
|
-
# Version bulk_exports of preview
|
34
|
-
def bulk_exports
|
35
|
-
@bulk_exports ||= BulkExports.new self
|
36
|
-
end
|
37
|
-
|
38
31
|
##
|
39
32
|
# Version deployed_devices of preview
|
40
33
|
def deployed_devices
|
@@ -77,24 +70,6 @@ module Twilio
|
|
77
70
|
@trusted_comms ||= TrustedComms.new self
|
78
71
|
end
|
79
72
|
|
80
|
-
##
|
81
|
-
# @param [String] resource_type The type of communication – Messages, Calls,
|
82
|
-
# Conferences, and Participants
|
83
|
-
# @return [Twilio::REST::Preview::BulkExports::ExportInstance] if resource_type was passed.
|
84
|
-
# @return [Twilio::REST::Preview::BulkExports::ExportList]
|
85
|
-
def exports(resource_type=:unset)
|
86
|
-
self.bulk_exports.exports(resource_type)
|
87
|
-
end
|
88
|
-
|
89
|
-
##
|
90
|
-
# @param [String] resource_type The type of communication – Messages, Calls,
|
91
|
-
# Conferences, and Participants
|
92
|
-
# @return [Twilio::REST::Preview::BulkExports::ExportConfigurationInstance] if resource_type was passed.
|
93
|
-
# @return [Twilio::REST::Preview::BulkExports::ExportConfigurationList]
|
94
|
-
def export_configuration(resource_type=:unset)
|
95
|
-
self.bulk_exports.export_configuration(resource_type)
|
96
|
-
end
|
97
|
-
|
98
73
|
##
|
99
74
|
# @param [String] sid Contains a 34 character string that uniquely identifies this
|
100
75
|
# Fleet resource.
|
@@ -0,0 +1,235 @@
|
|
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 Routes < Domain
|
12
|
+
class V2 < Version
|
13
|
+
class PhoneNumberList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the PhoneNumberList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [PhoneNumberList] PhoneNumberList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Provide a user friendly representation
|
27
|
+
def to_s
|
28
|
+
'#<Twilio.Routes.V2.PhoneNumberList>'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class PhoneNumberPage < Page
|
33
|
+
##
|
34
|
+
# Initialize the PhoneNumberPage
|
35
|
+
# @param [Version] version Version that contains the resource
|
36
|
+
# @param [Response] response Response from the API
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
38
|
+
# @return [PhoneNumberPage] PhoneNumberPage
|
39
|
+
def initialize(version, response, solution)
|
40
|
+
super(version, response)
|
41
|
+
|
42
|
+
# Path Solution
|
43
|
+
@solution = solution
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Build an instance of PhoneNumberInstance
|
48
|
+
# @param [Hash] payload Payload response from the API
|
49
|
+
# @return [PhoneNumberInstance] PhoneNumberInstance
|
50
|
+
def get_instance(payload)
|
51
|
+
PhoneNumberInstance.new(@version, payload, )
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'<Twilio.Routes.V2.PhoneNumberPage>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class PhoneNumberContext < InstanceContext
|
62
|
+
##
|
63
|
+
# Initialize the PhoneNumberContext
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @param [String] phone_number The phone number in E.164 format
|
66
|
+
# @return [PhoneNumberContext] PhoneNumberContext
|
67
|
+
def initialize(version, phone_number)
|
68
|
+
super(version)
|
69
|
+
|
70
|
+
# Path Solution
|
71
|
+
@solution = {phone_number: phone_number, }
|
72
|
+
@uri = "/PhoneNumbers/#{@solution[:phone_number]}"
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Update the PhoneNumberInstance
|
77
|
+
# @param [String] voice_region The Inbound Processing Region used for this phone
|
78
|
+
# number for voice
|
79
|
+
# @param [String] friendly_name A human readable description of this resource, up
|
80
|
+
# to 64 characters.
|
81
|
+
# @return [PhoneNumberInstance] Updated PhoneNumberInstance
|
82
|
+
def update(voice_region: :unset, friendly_name: :unset)
|
83
|
+
data = Twilio::Values.of({'VoiceRegion' => voice_region, 'FriendlyName' => friendly_name, })
|
84
|
+
|
85
|
+
payload = @version.update('POST', @uri, data: data)
|
86
|
+
|
87
|
+
PhoneNumberInstance.new(@version, payload, phone_number: @solution[:phone_number], )
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# Fetch the PhoneNumberInstance
|
92
|
+
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
93
|
+
def fetch
|
94
|
+
payload = @version.fetch('GET', @uri)
|
95
|
+
|
96
|
+
PhoneNumberInstance.new(@version, payload, phone_number: @solution[:phone_number], )
|
97
|
+
end
|
98
|
+
|
99
|
+
##
|
100
|
+
# Provide a user friendly representation
|
101
|
+
def to_s
|
102
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
103
|
+
"#<Twilio.Routes.V2.PhoneNumberContext #{context}>"
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Provide a detailed, user friendly representation
|
108
|
+
def inspect
|
109
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
110
|
+
"#<Twilio.Routes.V2.PhoneNumberContext #{context}>"
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
class PhoneNumberInstance < InstanceResource
|
115
|
+
##
|
116
|
+
# Initialize the PhoneNumberInstance
|
117
|
+
# @param [Version] version Version that contains the resource
|
118
|
+
# @param [Hash] payload payload that contains response from Twilio
|
119
|
+
# @param [String] phone_number The phone number in E.164 format
|
120
|
+
# @return [PhoneNumberInstance] PhoneNumberInstance
|
121
|
+
def initialize(version, payload, phone_number: nil)
|
122
|
+
super(version)
|
123
|
+
|
124
|
+
# Marshaled Properties
|
125
|
+
@properties = {
|
126
|
+
'phone_number' => payload['phone_number'],
|
127
|
+
'url' => payload['url'],
|
128
|
+
'sid' => payload['sid'],
|
129
|
+
'account_sid' => payload['account_sid'],
|
130
|
+
'friendly_name' => payload['friendly_name'],
|
131
|
+
'voice_region' => payload['voice_region'],
|
132
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
133
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
134
|
+
}
|
135
|
+
|
136
|
+
# Context
|
137
|
+
@instance_context = nil
|
138
|
+
@params = {'phone_number' => phone_number || @properties['phone_number'], }
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Generate an instance context for the instance, the context is capable of
|
143
|
+
# performing various actions. All instance actions are proxied to the context
|
144
|
+
# @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance
|
145
|
+
def context
|
146
|
+
unless @instance_context
|
147
|
+
@instance_context = PhoneNumberContext.new(@version, @params['phone_number'], )
|
148
|
+
end
|
149
|
+
@instance_context
|
150
|
+
end
|
151
|
+
|
152
|
+
##
|
153
|
+
# @return [String] The phone number
|
154
|
+
def phone_number
|
155
|
+
@properties['phone_number']
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# @return [String] The absolute URL of the resource
|
160
|
+
def url
|
161
|
+
@properties['url']
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# @return [String] A string that uniquely identifies the Inbound Processing Region assignments for this phone number.
|
166
|
+
def sid
|
167
|
+
@properties['sid']
|
168
|
+
end
|
169
|
+
|
170
|
+
##
|
171
|
+
# @return [String] Account Sid.
|
172
|
+
def account_sid
|
173
|
+
@properties['account_sid']
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# @return [String] A human readable description of the Inbound Processing Region assignments for this phone number.
|
178
|
+
def friendly_name
|
179
|
+
@properties['friendly_name']
|
180
|
+
end
|
181
|
+
|
182
|
+
##
|
183
|
+
# @return [String] The Inbound Processing Region used for this phone number for voice.
|
184
|
+
def voice_region
|
185
|
+
@properties['voice_region']
|
186
|
+
end
|
187
|
+
|
188
|
+
##
|
189
|
+
# @return [Time] The date that this phone number was assigned an Inbound Processing Region.
|
190
|
+
def date_created
|
191
|
+
@properties['date_created']
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# @return [Time] The date that the Inbound Processing Region was updated for this phone number.
|
196
|
+
def date_updated
|
197
|
+
@properties['date_updated']
|
198
|
+
end
|
199
|
+
|
200
|
+
##
|
201
|
+
# Update the PhoneNumberInstance
|
202
|
+
# @param [String] voice_region The Inbound Processing Region used for this phone
|
203
|
+
# number for voice
|
204
|
+
# @param [String] friendly_name A human readable description of this resource, up
|
205
|
+
# to 64 characters.
|
206
|
+
# @return [PhoneNumberInstance] Updated PhoneNumberInstance
|
207
|
+
def update(voice_region: :unset, friendly_name: :unset)
|
208
|
+
context.update(voice_region: voice_region, friendly_name: friendly_name, )
|
209
|
+
end
|
210
|
+
|
211
|
+
##
|
212
|
+
# Fetch the PhoneNumberInstance
|
213
|
+
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
214
|
+
def fetch
|
215
|
+
context.fetch
|
216
|
+
end
|
217
|
+
|
218
|
+
##
|
219
|
+
# Provide a user friendly representation
|
220
|
+
def to_s
|
221
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
222
|
+
"<Twilio.Routes.V2.PhoneNumberInstance #{values}>"
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# Provide a detailed, user friendly representation
|
227
|
+
def inspect
|
228
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
229
|
+
"<Twilio.Routes.V2.PhoneNumberInstance #{values}>"
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
@@ -0,0 +1,231 @@
|
|
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 Routes < Domain
|
12
|
+
class V2 < Version
|
13
|
+
class SipDomainList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the SipDomainList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [SipDomainList] SipDomainList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Provide a user friendly representation
|
27
|
+
def to_s
|
28
|
+
'#<Twilio.Routes.V2.SipDomainList>'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class SipDomainPage < Page
|
33
|
+
##
|
34
|
+
# Initialize the SipDomainPage
|
35
|
+
# @param [Version] version Version that contains the resource
|
36
|
+
# @param [Response] response Response from the API
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
38
|
+
# @return [SipDomainPage] SipDomainPage
|
39
|
+
def initialize(version, response, solution)
|
40
|
+
super(version, response)
|
41
|
+
|
42
|
+
# Path Solution
|
43
|
+
@solution = solution
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Build an instance of SipDomainInstance
|
48
|
+
# @param [Hash] payload Payload response from the API
|
49
|
+
# @return [SipDomainInstance] SipDomainInstance
|
50
|
+
def get_instance(payload)
|
51
|
+
SipDomainInstance.new(@version, payload, )
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'<Twilio.Routes.V2.SipDomainPage>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class SipDomainContext < InstanceContext
|
62
|
+
##
|
63
|
+
# Initialize the SipDomainContext
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @param [String] sip_domain The sip_domain
|
66
|
+
# @return [SipDomainContext] SipDomainContext
|
67
|
+
def initialize(version, sip_domain)
|
68
|
+
super(version)
|
69
|
+
|
70
|
+
# Path Solution
|
71
|
+
@solution = {sip_domain: sip_domain, }
|
72
|
+
@uri = "/SipDomains/#{@solution[:sip_domain]}"
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Update the SipDomainInstance
|
77
|
+
# @param [String] voice_region The voice_region
|
78
|
+
# @param [String] friendly_name The friendly_name
|
79
|
+
# @return [SipDomainInstance] Updated SipDomainInstance
|
80
|
+
def update(voice_region: :unset, friendly_name: :unset)
|
81
|
+
data = Twilio::Values.of({'VoiceRegion' => voice_region, 'FriendlyName' => friendly_name, })
|
82
|
+
|
83
|
+
payload = @version.update('POST', @uri, data: data)
|
84
|
+
|
85
|
+
SipDomainInstance.new(@version, payload, sip_domain: @solution[:sip_domain], )
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Fetch the SipDomainInstance
|
90
|
+
# @return [SipDomainInstance] Fetched SipDomainInstance
|
91
|
+
def fetch
|
92
|
+
payload = @version.fetch('GET', @uri)
|
93
|
+
|
94
|
+
SipDomainInstance.new(@version, payload, sip_domain: @solution[:sip_domain], )
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Provide a user friendly representation
|
99
|
+
def to_s
|
100
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
101
|
+
"#<Twilio.Routes.V2.SipDomainContext #{context}>"
|
102
|
+
end
|
103
|
+
|
104
|
+
##
|
105
|
+
# Provide a detailed, user friendly representation
|
106
|
+
def inspect
|
107
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
108
|
+
"#<Twilio.Routes.V2.SipDomainContext #{context}>"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
class SipDomainInstance < InstanceResource
|
113
|
+
##
|
114
|
+
# Initialize the SipDomainInstance
|
115
|
+
# @param [Version] version Version that contains the resource
|
116
|
+
# @param [Hash] payload payload that contains response from Twilio
|
117
|
+
# @param [String] sip_domain The sip_domain
|
118
|
+
# @return [SipDomainInstance] SipDomainInstance
|
119
|
+
def initialize(version, payload, sip_domain: nil)
|
120
|
+
super(version)
|
121
|
+
|
122
|
+
# Marshaled Properties
|
123
|
+
@properties = {
|
124
|
+
'sip_domain' => payload['sip_domain'],
|
125
|
+
'url' => payload['url'],
|
126
|
+
'sid' => payload['sid'],
|
127
|
+
'account_sid' => payload['account_sid'],
|
128
|
+
'friendly_name' => payload['friendly_name'],
|
129
|
+
'voice_region' => payload['voice_region'],
|
130
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
131
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
132
|
+
}
|
133
|
+
|
134
|
+
# Context
|
135
|
+
@instance_context = nil
|
136
|
+
@params = {'sip_domain' => sip_domain || @properties['sip_domain'], }
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Generate an instance context for the instance, the context is capable of
|
141
|
+
# performing various actions. All instance actions are proxied to the context
|
142
|
+
# @return [SipDomainContext] SipDomainContext for this SipDomainInstance
|
143
|
+
def context
|
144
|
+
unless @instance_context
|
145
|
+
@instance_context = SipDomainContext.new(@version, @params['sip_domain'], )
|
146
|
+
end
|
147
|
+
@instance_context
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# @return [String] The sip_domain
|
152
|
+
def sip_domain
|
153
|
+
@properties['sip_domain']
|
154
|
+
end
|
155
|
+
|
156
|
+
##
|
157
|
+
# @return [String] The url
|
158
|
+
def url
|
159
|
+
@properties['url']
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# @return [String] The sid
|
164
|
+
def sid
|
165
|
+
@properties['sid']
|
166
|
+
end
|
167
|
+
|
168
|
+
##
|
169
|
+
# @return [String] The account_sid
|
170
|
+
def account_sid
|
171
|
+
@properties['account_sid']
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# @return [String] The friendly_name
|
176
|
+
def friendly_name
|
177
|
+
@properties['friendly_name']
|
178
|
+
end
|
179
|
+
|
180
|
+
##
|
181
|
+
# @return [String] The voice_region
|
182
|
+
def voice_region
|
183
|
+
@properties['voice_region']
|
184
|
+
end
|
185
|
+
|
186
|
+
##
|
187
|
+
# @return [Time] The date_created
|
188
|
+
def date_created
|
189
|
+
@properties['date_created']
|
190
|
+
end
|
191
|
+
|
192
|
+
##
|
193
|
+
# @return [Time] The date_updated
|
194
|
+
def date_updated
|
195
|
+
@properties['date_updated']
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# Update the SipDomainInstance
|
200
|
+
# @param [String] voice_region The voice_region
|
201
|
+
# @param [String] friendly_name The friendly_name
|
202
|
+
# @return [SipDomainInstance] Updated SipDomainInstance
|
203
|
+
def update(voice_region: :unset, friendly_name: :unset)
|
204
|
+
context.update(voice_region: voice_region, friendly_name: friendly_name, )
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# Fetch the SipDomainInstance
|
209
|
+
# @return [SipDomainInstance] Fetched SipDomainInstance
|
210
|
+
def fetch
|
211
|
+
context.fetch
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# Provide a user friendly representation
|
216
|
+
def to_s
|
217
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
218
|
+
"<Twilio.Routes.V2.SipDomainInstance #{values}>"
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# Provide a detailed, user friendly representation
|
223
|
+
def inspect
|
224
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
225
|
+
"<Twilio.Routes.V2.SipDomainInstance #{values}>"
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|