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,
lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb,
lib/twilio-ruby/rest/insights/v3/custom_field_mappings_capacity.rb

Defined Under Namespace

Classes: CustomFieldMappingContext, CustomFieldMappingInstance, CustomFieldMappingInstanceMetadata, CustomFieldMappingList, CustomFieldMappingListResponse, CustomFieldMappingPage, CustomFieldMappingPageMetadata, CustomFieldMappingsCapacityInstance, CustomFieldMappingsCapacityList, CustomFieldMappingsCapacityPage, 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
28
29
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 21

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

Instance Method Details

#custom_field_mappings(mapping_id = :unset) ⇒ Twilio::REST::Insights::V3::CustomFieldMappingContext, Twilio::REST::Insights::V3::CustomFieldMappingList

Parameters:

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

    The unique identifier of the custom field mapping, as returned in id when the mapping was created.

Returns:



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 35

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

    if mapping_id == :unset
        @custom_field_mappings ||= CustomFieldMappingList.new self
    else
        CustomFieldMappingContext.new(self, mapping_id)
    end
end

#custom_field_mappings_capacity ⇒ Twilio::REST::Insights::V3::CustomFieldMappingsCapacityList



48
49
50
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 48

def custom_field_mappings_capacity
    @custom_field_mappings_capacity ||= CustomFieldMappingsCapacityList.new self
end

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



53
54
55
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 53

def 
    @metadata ||= MetadataList.new self
end

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



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

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:



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 65

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



78
79
80
# File 'lib/twilio-ruby/rest/insights/v3.rb', line 78

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