Class: Twilio::REST::Accounts::V1::SafelistInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ SafelistInstance

Initialize the SafelistInstance

Parameters:

  • Version that contains the resource

  • payload that contains response from Twilio

  • The SID of the Account that created this Safelist resource.

  • The SID of the Call resource to fetch.



237
238
239
240
241
242
243
244
245
246
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 237

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'phone_number' => payload['phone_number'],
    }
end

Instance Method Details

#inspect ⇒ Object

Provide a detailed, user friendly representation



269
270
271
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 269

def inspect
    "<Twilio.Accounts.V1.SafelistInstance>"
end

#phone_number ⇒ String

Returns The phone number or phone number 1k prefix in SafeList.

Returns:

  • The phone number or phone number 1k prefix in SafeList.



257
258
259
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 257

def phone_number
    @properties['phone_number']
end

#sid ⇒ String

Returns The unique string that we created to identify the SafeList resource.

Returns:

  • The unique string that we created to identify the SafeList resource.



251
252
253
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 251

def sid
    @properties['sid']
end

#to_s ⇒ Object

Provide a user friendly representation



263
264
265
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 263

def to_s
    "<Twilio.Accounts.V1.SafelistInstance>"
end