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

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

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ MetadataList

Initialize the MetadataList

Parameters:

  • version (Version)

    Version that contains the resource



26
27
28
29
30
31
32
33
34
# File 'lib/twilio-ruby/rest/insights/v3/metadata.rb', line 26

def initialize(version)
    
    apiV1Version = ApiV1Version.new version.domain, version
    super(apiV1Version)
    # Path Solution
    @solution = {  }
    @uri = "/InsightsDomains/Conversations/Metadata"
    
end

Instance Method Details

#fetchMetadataInstance

Fetch the MetadataInstance

Returns:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/twilio-ruby/rest/insights/v3/metadata.rb', line 38

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    MetadataInstance.new(
        @version,
        payload,
    )
end

#fetch_with_metadataMetadataInstance

Fetch the MetadataInstanceMetadata

Returns:



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/twilio-ruby/rest/insights/v3/metadata.rb', line 56

def 

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    response = @version.('GET', @uri, headers: headers)
     = MetadataInstance.new(
        @version,
        response.body,
    )
    MetadataInstanceMetadata.new(
        @version,
        ,
        response.headers,
        response.status_code
    )
end

#to_sObject

Provide a user friendly representation



81
82
83
# File 'lib/twilio-ruby/rest/insights/v3/metadata.rb', line 81

def to_s
    '#<Twilio.Insights.V3.MetadataList>'
end