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 (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 Safelist resource.

  • sid (String)

    The SID of the Call resource to fetch.



296
297
298
299
300
301
302
303
304
305
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 296

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

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



328
329
330
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 328

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

#phone_numberString

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

Returns:

  • (String)

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



316
317
318
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 316

def phone_number
    @properties['phone_number']
end

#sidString

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

Returns:

  • (String)

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



310
311
312
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 310

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



322
323
324
# File 'lib/twilio-ruby/rest/accounts/v1/safelist.rb', line 322

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