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.



259
260
261
262
263
264
265
266
267
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 259

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

Instance Method Details

#inspect ⇒ Object

Provide a detailed, user friendly representation



284
285
286
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 284

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

#phone_numbers ⇒ Array<LookupBatchResponse>

Returns:

  • (Array<LookupBatchResponse>)


272
273
274
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 272

def phone_numbers
    @properties['phone_numbers']
end

#to_s ⇒ Object

Provide a user friendly representation



278
279
280
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 278

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