Class: Twilio::REST::Lookups::V2::QueryList::CallerName
- Inherits:
-
Object
- Object
- Twilio::REST::Lookups::V2::QueryList::CallerName
- Defined in:
- lib/twilio-ruby/rest/lookups/v2/query.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ CallerName
constructor
A new instance of CallerName.
- #to_json(options = {}) ⇒ Object
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_name ⇒ Object
42 43 44 |
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 42 def caller_name @caller_name end |
#caller_type ⇒ Object
42 43 44 |
# File 'lib/twilio-ruby/rest/lookups/v2/query.rb', line 42 def caller_type @caller_type end |
#error_code ⇒ Object
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( = {}) { "caller_name": @caller_name, "caller_type": @caller_type, "error_code": @error_code, }.to_json() end |