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.



129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 129

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

#inspect ⇒ Object

Provide a detailed, user friendly representation



175
176
177
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 175

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

#notifications_of ⇒ Array<String>

Returns A list to filter what notification events to receive for this account and its sub accounts. If it is an empty list, then it means that there are no filters for the notifications events to send in each webhook and all events will get sent.

Returns:

  • (Array<String>) —

    A list to filter what notification events to receive for this account and its sub accounts. If it is an empty list, then it means that there are no filters for the notifications events to send in each webhook and all events will get sent.



163
164
165
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 163

def notifications_of
    @properties['notifications_of']
end

#port_in_target_url ⇒ String

Returns The complete webhook url that will be called when a notification event for port in request or port in phone number happens.

Returns:

  • (String) —

    The complete webhook url that will be called when a notification event for port in request or port in phone number happens



151
152
153
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 151

def port_in_target_url
    @properties['port_in_target_url']
end

#port_out_target_url ⇒ String

Returns The complete webhook url that will be called when a notification event for a port out phone number happens.

Returns:

  • (String) —

    The complete webhook url that will be called when a notification event for a port out phone number happens.



157
158
159
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 157

def port_out_target_url
    @properties['port_out_target_url']
end

#to_s ⇒ Object

Provide a user friendly representation



169
170
171
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 169

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

#url ⇒ String

Returns The URL of the webhook configuration request.

Returns:

  • (String) —

    The URL of the webhook configuration request



145
146
147
# File 'lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb', line 145

def url
    @properties['url']
end