Class: Twilio::REST::Lookups::V2::QueryInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/lookups/v2/query.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ QueryInstance

Initialize the QueryInstance

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

  • sid (String)

    The SID of the Call resource to fetch.



424
425
426
427
428
429
430
431
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 424

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

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



448
449
450
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 448

def inspect
    "<Twilio.Lookups.V2.QueryInstance>"
end

#phone_numbersArray<LookupResponseWithCorId>

Returns:

  • (Array<LookupResponseWithCorId>)


436
437
438
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 436

def phone_numbers
    @properties['phone_numbers']
end

#to_sObject

Provide a user friendly representation



442
443
444
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 442

def to_s
    "<Twilio.Lookups.V2.QueryInstance>"
end