Class: Twilio::REST::Insights::V3::QueryList::InsightsQueryRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ InsightsQueryRequest

Returns a new instance of InsightsQueryRequest.



26
27
28
29
# File 'lib/twilio-ruby/rest/insights/v3/query.rb', line 26

def initialize(payload)
        @domain = payload["domain"]
        @query = payload["query"]
end

Instance Attribute Details

#domainObject

Parameters:

  • : (domain)
    String

    The business domain to execute the query against

  • : (query)
    QueryList.QueryDefinition


25
26
27
# File 'lib/twilio-ruby/rest/insights/v3/query.rb', line 25

def domain
  @domain
end

#queryObject

Parameters:

  • : (domain)
    String

    The business domain to execute the query against

  • : (query)
    QueryList.QueryDefinition


25
26
27
# File 'lib/twilio-ruby/rest/insights/v3/query.rb', line 25

def query
  @query
end

Instance Method Details

#to_json(options = {}) ⇒ Object



30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/insights/v3/query.rb', line 30

def to_json(options = {})
{
        "domain": @domain,
        "query": @query,
}.to_json(options)
end