Class: Twilio::REST::Numbers::V1::PortingPortInContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V1::PortingPortInContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the PortingPortInInstance.
-
#fetch ⇒ PortingPortInInstance
Fetch the PortingPortInInstance.
-
#initialize(version, port_in_request_sid) ⇒ PortingPortInContext
constructor
Initialize the PortingPortInContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, port_in_request_sid) ⇒ PortingPortInContext
Initialize the PortingPortInContext
157 158 159 160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 157 def initialize(version, port_in_request_sid) super(version) # Path Solution @solution = { port_in_request_sid: port_in_request_sid, } @uri = "/Porting/PortIn/#{@solution[:port_in_request_sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the PortingPortInInstance
169 170 171 172 173 174 175 176 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 169 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ PortingPortInInstance
Fetch the PortingPortInInstance
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 181 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) PortingPortInInstance.new( @version, payload, port_in_request_sid: @solution[:port_in_request_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
207 208 209 210 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 207 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V1.PortingPortInContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
200 201 202 203 |
# File 'lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb', line 200 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V1.PortingPortInContext #{context}>" end |