class Twilio::REST::Trusthub::V1::CustomerProfilesContext::CustomerProfilesEvaluationsInstance
Public Class Methods
Initialize the CustomerProfilesEvaluationsInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] customer_profile_sid
The unique string that we created to
identify the customer_profile resource.
@param [String] sid The unique string that identifies the Evaluation resource. @return [CustomerProfilesEvaluationsInstance] CustomerProfilesEvaluationsInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 220 def initialize(version, payload, customer_profile_sid: nil, sid: nil) 221 super(version) 222 223 # Marshaled Properties 224 @properties = { 225 'sid' => payload['sid'], 226 'account_sid' => payload['account_sid'], 227 'policy_sid' => payload['policy_sid'], 228 'customer_profile_sid' => payload['customer_profile_sid'], 229 'status' => payload['status'], 230 'results' => payload['results'], 231 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 232 'url' => payload['url'], 233 } 234 235 # Context 236 @instance_context = nil 237 @params = {'customer_profile_sid' => customer_profile_sid, 'sid' => sid || @properties['sid'], } 238 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 263 def account_sid 264 @properties['account_sid'] 265 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [CustomerProfilesEvaluationsContext] CustomerProfilesEvaluationsContext
for this CustomerProfilesEvaluationsInstance
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 244 def context 245 unless @instance_context 246 @instance_context = CustomerProfilesEvaluationsContext.new( 247 @version, 248 @params['customer_profile_sid'], 249 @params['sid'], 250 ) 251 end 252 @instance_context 253 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 275 def customer_profile_sid 276 @properties['customer_profile_sid'] 277 end
@return [Time] The date_created
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 293 def date_created 294 @properties['date_created'] 295 end
Fetch the CustomerProfilesEvaluationsInstance
@return [CustomerProfilesEvaluationsInstance] Fetched CustomerProfilesEvaluationsInstance
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 306 def fetch 307 context.fetch 308 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 319 def inspect 320 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 321 "<Twilio.Trusthub.V1.CustomerProfilesEvaluationsInstance #{values}>" 322 end
@return [String] The unique string of a policy
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 269 def policy_sid 270 @properties['policy_sid'] 271 end
@return [Array] The results of the Evaluation resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 287 def results 288 @properties['results'] 289 end
@return [String] The unique string that identifies the Evaluation resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 257 def sid 258 @properties['sid'] 259 end
@return [customer_profiles_evaluations.Status] The compliance status of the Evaluation resource
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 281 def status 282 @properties['status'] 283 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 312 def to_s 313 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 314 "<Twilio.Trusthub.V1.CustomerProfilesEvaluationsInstance #{values}>" 315 end
@return [String] The url
# File lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb 299 def url 300 @properties['url'] 301 end