Class: Twilio::REST::Numbers::V1::PortingWebhookConfigurationInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ PortingWebhookConfigurationInstance

Initialize the PortingWebhookConfigurationInstance

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 PortingWebhookConfiguration resource.

  • sid (String)

    The SID of the Call resource to fetch.



96
97
98
99
100
101
102
103
104
105
106
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 96

def initialize(version, payload )
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'url' => payload['url'],
        'port_in_target_url' => payload['port_in_target_url'],
        'port_out_target_url' => payload['port_out_target_url'],
        'notifications_of' => payload['notifications_of'],
    }
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



141
142
143
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 141

def inspect
    "<Twilio.Numbers.V1.PortingWebhookConfigurationInstance>"
end

#notifications_ofArray<String>

Returns List of notification events to send a request to the webhook URL.

Returns:

  • (Array<String>)

    List of notification events to send a request to the webhook URL



129
130
131
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 129

def notifications_of
    @properties['notifications_of']
end

#port_in_target_urlString

Returns Webhook URL to send a request when a port in request or port in phone number event happens.

Returns:

  • (String)

    Webhook URL to send a request when a port in request or port in phone number event happens



117
118
119
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 117

def port_in_target_url
    @properties['port_in_target_url']
end

#port_out_target_urlString

Returns Webhook URL to send a request when a port out phone number event happens.

Returns:

  • (String)

    Webhook URL to send a request when a port out phone number event happens



123
124
125
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 123

def port_out_target_url
    @properties['port_out_target_url']
end

#to_sObject

Provide a user friendly representation



135
136
137
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 135

def to_s
    "<Twilio.Numbers.V1.PortingWebhookConfigurationInstance>"
end

#urlString

Returns The URL of the webhook configuration request.

Returns:

  • (String)

    The URL of the webhook configuration request



111
112
113
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 111

def url
    @properties['url']
end