Class: Twilio::REST::Insights::V3::ResultList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Insights::V3::ResultList
- Defined in:
- lib/twilio-ruby/rest/insights/v3/result.rb
Instance Method Summary collapse
-
#fetch(page_size: :unset, page_token: :unset) ⇒ ResultInstance
Fetch the ResultInstance.
-
#fetch_with_metadata(page_size: :unset, page_token: :unset) ⇒ ResultInstance
Fetch the ResultInstanceMetadata.
-
#initialize(version, operation_id: nil) ⇒ ResultList
constructor
Initialize the ResultList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, operation_id: nil) ⇒ ResultList
Initialize the ResultList
26 27 28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 26 def initialize(version, operation_id: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Path Solution @solution = { operation_id: operation_id } @uri = "/InsightsDomains/Conversations/QueryJobs/#{@solution[:operation_id]}/Results" end |
Instance Method Details
#fetch(page_size: :unset, page_token: :unset) ⇒ ResultInstance
Fetch the ResultInstance
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 40 def fetch( page_size: :unset, page_token: :unset ) params = Twilio::Values.of({ 'pageSize' => page_size, 'pageToken' => page_token, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) ResultInstance.new( @version, payload, operation_id: @solution[:operation_id], ) end |
#fetch_with_metadata(page_size: :unset, page_token: :unset) ⇒ ResultInstance
Fetch the ResultInstanceMetadata
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 68 def ( page_size: :unset, page_token: :unset ) params = Twilio::Values.of({ 'pageSize' => page_size, 'pageToken' => page_token, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, params: params, headers: headers) result_instance = ResultInstance.new( @version, response.body, operation_id: @solution[:operation_id], ) ResultInstanceMetadata.new( @version, result_instance, response.headers, response.status_code ) end |
#to_s ⇒ Object
Provide a user friendly representation
101 102 103 |
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 101 def to_s '#<Twilio.Insights.V3.ResultList>' end |