Class: Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, webhook_type: nil) ⇒ PortingWebhookConfigurationDeleteInstance

Initialize the PortingWebhookConfigurationDeleteInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this PortingWebhookConfigurationDelete resource.

  • sid (String)

    The SID of the Call resource to fetch.



254
255
256
257
258
259
260
261
262
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 254

def initialize(version , webhook_type: nil)
    super(version)
    
    

    # Context
    @instance_context = nil
    @params = { 'webhook_type' => webhook_type  || @properties['webhook_type']  , }
end

Instance Method Details

#contextPortingWebhookConfigurationDeleteContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



268
269
270
271
272
273
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 268

def context
    unless @instance_context
        @instance_context = PortingWebhookConfigurationDeleteContext.new(@version , @params['webhook_type'])
    end
    @instance_context
end

#deleteBoolean

Delete the PortingWebhookConfigurationDeleteInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



278
279
280
281
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 278

def delete

    context.delete
end

#inspectObject

Provide a detailed, user friendly representation



292
293
294
295
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 292

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteInstance #{values}>"
end

#to_sObject

Provide a user friendly representation



285
286
287
288
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 285

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteInstance #{values}>"
end