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

Inherits:
Twilio::REST::InstanceResource show all
Defined in:
lib/twilio-ruby/rest/insights/v3/result.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, operation_id: nil) ⇒ ResultInstance

Initialize the ResultInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this Result resource.

  • sid (String) —

    The SID of the Call resource to fetch.



147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 147

def initialize(version, payload , operation_id: nil)
    
    apiV1Version = ApiV1Version.new version.domain, version
    super(apiV1Version)
    
    # Marshaled Properties
    @properties = { 
        'domain' => payload['domain'],
        'items' => payload['items'],
        'meta' => payload['meta'],
    }
end

Instance Method Details

#domain ⇒ String

Returns Indicates the business domain the query was executed against.

Returns:

  • (String) —

    Indicates the business domain the query was executed against



163
164
165
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 163

def domain
    @properties['domain']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



187
188
189
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 187

def inspect
    "<Twilio.Insights.V3.ResultInstance>"
end

#items ⇒ Array<Hash<String, Object>>

Returns Array of result objects containing the query results. Each object contains properties matching the requested measures and dimensions.

Returns:

  • (Array<Hash<String, Object>>) —

    Array of result objects containing the query results. Each object contains properties matching the requested measures and dimensions.



169
170
171
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 169

def items
    @properties['items']
end

#meta ⇒ PaginationMeta

Returns:

  • (PaginationMeta)


175
176
177
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 175

def meta
    @properties['meta']
end

#to_s ⇒ Object

Provide a user friendly representation



181
182
183
# File 'lib/twilio-ruby/rest/insights/v3/result.rb', line 181

def to_s
    "<Twilio.Insights.V3.ResultInstance>"
end