Class: Twilio::REST::Numbers::V1::PortingWebhookConfigurationDeleteContext

Inherits:
InstanceContext
  • 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) ⇒ PortingWebhookConfigurationDeleteContext

Initialize the PortingWebhookConfigurationDeleteContext

Parameters:

  • version (Version)

    Version that contains the resource

  • webhook_type (WebhookType)

    The webhook type for the configuration to be delete. ‘PORT_IN`, `PORT_OUT`



49
50
51
52
53
54
55
56
57
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 49

def initialize(version, webhook_type)
    super(version)

    # Path Solution
    @solution = { webhook_type: webhook_type,  }
    @uri = "/Porting/Configuration/Webhook/#{@solution[:webhook_type]}"

    
end

Instance Method Details

#deleteBoolean

Delete the PortingWebhookConfigurationDeleteInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



61
62
63
64
65
66
67
68
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 61

def delete

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    @version.delete('DELETE', @uri, headers: headers)
end

#inspectObject

Provide a detailed, user friendly representation



80
81
82
83
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 80

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteContext #{context}>"
end

#to_sObject

Provide a user friendly representation



73
74
75
76
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 73

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Numbers.V1.PortingWebhookConfigurationDeleteContext #{context}>"
end