Class: Twilio::REST::Numbers::V1::WebhookInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ WebhookInstance

Initialize the WebhookInstance



184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/twilio-ruby/rest/numbers/v1/webhook.rb', line 184

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'],
        'port_in_target_date_created' => Twilio.deserialize_iso8601_datetime(payload['port_in_target_date_created']),
        'port_out_target_date_created' => Twilio.deserialize_iso8601_datetime(payload['port_out_target_date_created']),
    }
end

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



244
245
246
# File 'lib/twilio-ruby/rest/numbers/v1/webhook.rb', line 244

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

#notifications_ofArray<String>



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

def notifications_of
    @properties['notifications_of']
end

#port_in_target_date_createdTime



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

def port_in_target_date_created
    @properties['port_in_target_date_created']
end

#port_in_target_urlString



208
209
210
# File 'lib/twilio-ruby/rest/numbers/v1/webhook.rb', line 208

def port_in_target_url
    @properties['port_in_target_url']
end

#port_out_target_date_createdTime



232
233
234
# File 'lib/twilio-ruby/rest/numbers/v1/webhook.rb', line 232

def port_out_target_date_created
    @properties['port_out_target_date_created']
end

#port_out_target_urlString



214
215
216
# File 'lib/twilio-ruby/rest/numbers/v1/webhook.rb', line 214

def port_out_target_url
    @properties['port_out_target_url']
end

#to_sObject

Provide a user friendly representation



238
239
240
# File 'lib/twilio-ruby/rest/numbers/v1/webhook.rb', line 238

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

#urlString



202
203
204
# File 'lib/twilio-ruby/rest/numbers/v1/webhook.rb', line 202

def url
    @properties['url']
end