Class: Twilio::REST::Numbers::V1::PortingPortInContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, port_in_request_sid) ⇒ PortingPortInContext

Initialize the PortingPortInContext

Parameters:

  • version (Version)

    Version that contains the resource

  • port_in_request_sid (String)

    The SID of the Port In request. This is a unique identifier of the port in request.



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

#deleteBoolean

Delete the PortingPortInInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



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

#fetchPortingPortInInstance

Fetch the PortingPortInInstance

Returns:



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

#inspectObject

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_sObject

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