Class: Twilio::REST::Insights::V3

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/insights/v3.rb,
lib/twilio-ruby/rest/insights/v3/query.rb,
lib/twilio-ruby/rest/insights/v3/result.rb,
lib/twilio-ruby/rest/insights/v3/metadata.rb,
lib/twilio-ruby/rest/insights/v3/query_job.rb

Defined Under Namespace

Classes: MetadataInstance, MetadataList, MetadataPage, QueryInstance, QueryJobContext, QueryJobInstance, QueryJobInstanceMetadata, QueryJobList, QueryJobListResponse, QueryJobPage, QueryJobPageMetadata, QueryList, QueryPage, ResultInstance, ResultList, ResultPage

Instance Attribute Summary

Attributes inherited from Version

#domain, #version

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #create_with_metadata, #delete, #delete_with_metadata, #exception, #fetch, #fetch_with_metadata, #page, #patch, #read_limits, #relative_uri, #request, #stream, #stream_with_metadata, #update, #update_with_metadata

Constructor Details

#initialize(domain) ⇒ V3

Initialize the V3 version of Insights



21
22
23
24
25
26
27
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 21

def initialize(domain)
    super
    @version = 'v3'
    @metadata = nil
    @query = nil
    @query_jobs = nil
end

Instance Method Details

#metadata ⇒ Twilio::REST::Insights::V3::MetadataList



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

def 
    @metadata ||= MetadataList.new self
end

#query ⇒ Twilio::REST::Insights::V3::QueryList



36
37
38
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 36

def query
    @query ||= QueryList.new self
end

#query_jobs(operation_id = :unset) ⇒ Twilio::REST::Insights::V3::QueryJobContext, Twilio::REST::Insights::V3::QueryJobList

Parameters:

  • operation_id (String) (defaults to: :unset) —

    The unique identifier for the asynchronous query operation, in TTID format.

Returns:



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 43

def query_jobs(operation_id=:unset)
    if operation_id.nil?
        raise ArgumentError, 'operation_id cannot be nil'
    end

    if operation_id == :unset
        @query_jobs ||= QueryJobList.new self
    else
        QueryJobContext.new(self, operation_id)
    end
end

#to_s ⇒ Object

Provide a user friendly representation



56
57
58
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 56

def to_s
    '<Twilio::REST::Insights::V3>';
end