Class: Twilio::REST::Numbers::V1::PortingPortInInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V1::PortingPortInInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb
Instance Method Summary collapse
-
#context ⇒ PortingPortInContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Delete the PortingPortInInstance.
-
#initialize(version, payload, port_in_request_sid: nil) ⇒ PortingPortInInstance
constructor
Initialize the PortingPortInInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#port_in_request_sid ⇒ String
The SID of the Port In request.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #url ⇒ String
Constructor Details
#initialize(version, payload, port_in_request_sid: nil) ⇒ PortingPortInInstance
Initialize the PortingPortInInstance
136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 136 def initialize(version, payload , port_in_request_sid: nil) super(version) # Marshaled Properties @properties = { 'port_in_request_sid' => payload['port_in_request_sid'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'port_in_request_sid' => port_in_request_sid || @properties['port_in_request_sid'] , } end |
Instance Method Details
#context ⇒ PortingPortInContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
154 155 156 157 158 159 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 154 def context unless @instance_context @instance_context = PortingPortInContext.new(@version , @params['port_in_request_sid']) end @instance_context end |
#delete ⇒ Boolean
Delete the PortingPortInInstance
176 177 178 179 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 176 def delete context.delete end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
190 191 192 193 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 190 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingPortInInstance #{values}>" end |
#port_in_request_sid ⇒ String
Returns The SID of the Port In request. This is a unique identifier of the port in request.
163 164 165 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 163 def port_in_request_sid @properties['port_in_request_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
183 184 185 186 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 183 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.PortingPortInInstance #{values}>" end |
#url ⇒ String
169 170 171 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 169 def url @properties['url'] end |