Class: Twilio::REST::Lookups::V2::QueryList::CallerName

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ CallerName

Returns a new instance of CallerName.



43
44
45
46
47
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 43

def initialize(payload)
        @caller_name = payload["caller_name"]
        @caller_type = payload["caller_type"]
        @error_code = payload["error_code"]
end

Instance Attribute Details

#caller_nameObject

Parameters:



42
43
44
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 42

def caller_name
  @caller_name
end

#caller_typeObject

Parameters:



42
43
44
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 42

def caller_type
  @caller_type
end

#error_codeObject

Parameters:



42
43
44
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 42

def error_code
  @error_code
end

Instance Method Details

#to_json(options = {}) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 48

def to_json(options = {})
{
        "caller_name": @caller_name,
        "caller_type": @caller_type,
        "error_code": @error_code,
}.to_json(options)
end