Class: Twilio::REST::Insights::V3::MetadataList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Insights::V3::MetadataList
- Defined in:
- lib/twilio-ruby/rest/insights/v3/metadata.rb
Instance Method Summary collapse
-
#fetch ⇒ MetadataInstance
Fetch the MetadataInstance.
-
#fetch_with_metadata ⇒ MetadataInstance
Fetch the MetadataInstanceMetadata.
-
#initialize(version) ⇒ MetadataList
constructor
Initialize the MetadataList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ MetadataList
Initialize the MetadataList
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
#fetch ⇒ MetadataInstance
Fetch the MetadataInstance
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_metadata ⇒ MetadataInstance
Fetch the MetadataInstanceMetadata
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_s ⇒ Object
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 |