Class: Twilio::REST::Numbers::V1::PortingPortInPhoneNumberInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V1::PortingPortInPhoneNumberInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb
Instance Method Summary collapse
-
#context ⇒ PortingPortInPhoneNumberContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Delete the PortingPortInPhoneNumberInstance.
-
#initialize(version, port_in_request_sid: nil, phone_number_sid: nil) ⇒ PortingPortInPhoneNumberInstance
constructor
Initialize the PortingPortInPhoneNumberInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, port_in_request_sid: nil, phone_number_sid: nil) ⇒ PortingPortInPhoneNumberInstance
Initialize the PortingPortInPhoneNumberInstance
122 123 124 125 126 127 128 129 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 122 def initialize(version , port_in_request_sid: nil, phone_number_sid: nil) super(version) # Context @instance_context = nil @params = { 'port_in_request_sid' => port_in_request_sid || @properties['port_in_request_sid'] ,'phone_number_sid' => phone_number_sid || @properties['phone_number_sid'] , } end |
Instance Method Details
#context ⇒ PortingPortInPhoneNumberContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
135 136 137 138 139 140 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 135 def context unless @instance_context @instance_context = PortingPortInPhoneNumberContext.new(@version , @params['port_in_request_sid'], @params['phone_number_sid']) end @instance_context end |
#delete ⇒ Boolean
Delete the PortingPortInPhoneNumberInstance
145 146 147 148 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 145 def delete context.delete end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
159 160 161 162 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 159 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingPortInPhoneNumberInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
152 153 154 155 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb', line 152 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingPortInPhoneNumberInstance #{values}>" end |