Class: Twilio::REST::Trunking::V1::TrunkContext::TerminatingSipDomainInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Trunking::V1::TrunkContext::TerminatingSipDomainInstance
- Defined in:
- lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#api_version ⇒ String
The API version used to process the call.
-
#auth_type ⇒ String
The types of authentication mapped to the domain.
-
#context ⇒ TerminatingSipDomainContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The RFC 2822 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The RFC 2822 date and time in GMT when the resource was last updated.
-
#delete ⇒ Boolean
Deletes the TerminatingSipDomainInstance.
-
#domain_name ⇒ String
The unique address you reserve on Twilio to which you route your SIP traffic.
-
#fetch ⇒ TerminatingSipDomainInstance
Fetch a TerminatingSipDomainInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, trunk_sid: nil, sid: nil) ⇒ TerminatingSipDomainInstance
constructor
Initialize the TerminatingSipDomainInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The URLs of related resources.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#sip_registration ⇒ Boolean
Whether SIP Endpoints can register with the domain to receive calls.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trunk_sid ⇒ String
The SID of the Trunk to which we should route calls.
-
#url ⇒ String
The absolute URL of the resource.
-
#voice_fallback_method ⇒ String
The HTTP method used with voice_fallback_url.
-
#voice_fallback_url ⇒ String
The URL that we call when an error occurs in executing TwiML.
-
#voice_method ⇒ String
The HTTP method used with voice_url.
-
#voice_status_callback_method ⇒ String
The HTTP method that we use to call the voice_status_callback_url.
-
#voice_status_callback_url ⇒ String
The URL that we call to pass status parameters to your application.
-
#voice_url ⇒ String
The URL we call when the domain receives a call.
Constructor Details
#initialize(version, payload, trunk_sid: nil, sid: nil) ⇒ TerminatingSipDomainInstance
Initialize the TerminatingSipDomainInstance
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 237 def initialize(version, payload, trunk_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'api_version' => payload['api_version'], 'auth_type' => payload['auth_type'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'domain_name' => payload['domain_name'], 'friendly_name' => payload['friendly_name'], 'sid' => payload['sid'], 'url' => payload['url'], 'voice_fallback_method' => payload['voice_fallback_method'], 'voice_fallback_url' => payload['voice_fallback_url'], 'voice_method' => payload['voice_method'], 'voice_status_callback_method' => payload['voice_status_callback_method'], 'voice_status_callback_url' => payload['voice_status_callback_url'], 'voice_url' => payload['voice_url'], 'sip_registration' => payload['sip_registration'], 'trunk_sid' => payload['trunk_sid'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
280 281 282 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 280 def account_sid @properties['account_sid'] end |
#api_version ⇒ String
Returns The API version used to process the call.
286 287 288 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 286 def api_version @properties['api_version'] end |
#auth_type ⇒ String
Returns The types of authentication mapped to the domain.
292 293 294 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 292 def auth_type @properties['auth_type'] end |
#context ⇒ TerminatingSipDomainContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
271 272 273 274 275 276 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 271 def context unless @instance_context @instance_context = TerminatingSipDomainContext.new(@version, @params['trunk_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT when the resource was created.
298 299 300 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 298 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The RFC 2822 date and time in GMT when the resource was last updated.
304 305 306 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 304 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the TerminatingSipDomainInstance
396 397 398 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 396 def delete context.delete end |
#domain_name ⇒ String
Returns The unique address you reserve on Twilio to which you route your SIP traffic.
310 311 312 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 310 def domain_name @properties['domain_name'] end |
#fetch ⇒ TerminatingSipDomainInstance
Fetch a TerminatingSipDomainInstance
389 390 391 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 389 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
316 317 318 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 316 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
409 410 411 412 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 409 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trunking.V1.TerminatingSipDomainInstance #{values}>" end |
#links ⇒ String
Returns The URLs of related resources.
382 383 384 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 382 def links @properties['links'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
322 323 324 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 322 def sid @properties['sid'] end |
#sip_registration ⇒ Boolean
Returns Whether SIP Endpoints can register with the domain to receive calls.
370 371 372 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 370 def sip_registration @properties['sip_registration'] end |
#to_s ⇒ Object
Provide a user friendly representation
402 403 404 405 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 402 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trunking.V1.TerminatingSipDomainInstance #{values}>" end |
#trunk_sid ⇒ String
Returns The SID of the Trunk to which we should route calls.
376 377 378 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 376 def trunk_sid @properties['trunk_sid'] end |
#url ⇒ String
Returns The absolute URL of the resource.
328 329 330 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 328 def url @properties['url'] end |
#voice_fallback_method ⇒ String
Returns The HTTP method used with voice_fallback_url.
334 335 336 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 334 def voice_fallback_method @properties['voice_fallback_method'] end |
#voice_fallback_url ⇒ String
Returns The URL that we call when an error occurs in executing TwiML.
340 341 342 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 340 def voice_fallback_url @properties['voice_fallback_url'] end |
#voice_method ⇒ String
Returns The HTTP method used with voice_url.
346 347 348 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 346 def voice_method @properties['voice_method'] end |
#voice_status_callback_method ⇒ String
Returns The HTTP method that we use to call the voice_status_callback_url.
352 353 354 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 352 def voice_status_callback_method @properties['voice_status_callback_method'] end |
#voice_status_callback_url ⇒ String
Returns The URL that we call to pass status parameters to your application.
358 359 360 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 358 def voice_status_callback_url @properties['voice_status_callback_url'] end |
#voice_url ⇒ String
Returns The URL we call when the domain receives a call.
364 365 366 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb', line 364 def voice_url @properties['voice_url'] end |