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.



195
196
197
198
199
200
201
202
203
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 195

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

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

Instance Method Details

#context ⇒ PortingWebhookConfigurationDeleteContext

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

Returns:



209
210
211
212
213
214
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 209

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

#delete ⇒ Boolean

Delete the PortingWebhookConfigurationDeleteInstance

Returns:

  • (Boolean) —

    True if delete succeeds, false otherwise



219
220
221
222
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 219

def delete

    context.delete
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



233
234
235
236
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 233

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

#to_s ⇒ Object

Provide a user friendly representation



226
227
228
229
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb', line 226

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