Class: Twilio::REST::Voice::V1::SourceIpMappingInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Voice::V1::SourceIpMappingInstance
- Defined in:
- lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb
Instance Method Summary collapse
-
#context ⇒ SourceIpMappingContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#delete ⇒ Boolean
Delete the SourceIpMappingInstance.
-
#fetch ⇒ SourceIpMappingInstance
Fetch the SourceIpMappingInstance.
-
#initialize(version, payload, sid: nil) ⇒ SourceIpMappingInstance
constructor
Initialize the SourceIpMappingInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#ip_record_sid ⇒ String
The Twilio-provided string that uniquely identifies the IP Record resource to map from.
-
#sid ⇒ String
The unique string that we created to identify the IP Record resource.
-
#sip_domain_sid ⇒ String
The SID of the SIP Domain that the IP Record is mapped to.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(sip_domain_sid: nil) ⇒ SourceIpMappingInstance
Update the SourceIpMappingInstance.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ SourceIpMappingInstance
Initialize the SourceIpMappingInstance
535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 535 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'ip_record_sid' => payload['ip_record_sid'], 'sip_domain_sid' => payload['sip_domain_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ SourceIpMappingContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
558 559 560 561 562 563 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 558 def context unless @instance_context @instance_context = SourceIpMappingContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
585 586 587 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 585 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
591 592 593 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 591 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the SourceIpMappingInstance
604 605 606 607 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 604 def delete context.delete end |
#fetch ⇒ SourceIpMappingInstance
Fetch the SourceIpMappingInstance
612 613 614 615 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 612 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
639 640 641 642 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 639 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.SourceIpMappingInstance #{values}>" end |
#ip_record_sid ⇒ String
Returns The Twilio-provided string that uniquely identifies the IP Record resource to map from.
573 574 575 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 573 def ip_record_sid @properties['ip_record_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the IP Record resource.
567 568 569 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 567 def sid @properties['sid'] end |
#sip_domain_sid ⇒ String
Returns The SID of the SIP Domain that the IP Record is mapped to.
579 580 581 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 579 def sip_domain_sid @properties['sip_domain_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
632 633 634 635 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 632 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.SourceIpMappingInstance #{values}>" end |
#update(sip_domain_sid: nil) ⇒ SourceIpMappingInstance
Update the SourceIpMappingInstance
621 622 623 624 625 626 627 628 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 621 def update( sip_domain_sid: nil ) context.update( sip_domain_sid: sip_domain_sid, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
597 598 599 |
# File 'lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb', line 597 def url @properties['url'] end |