Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, trust_product_sid: nil, sid: nil) ⇒ TrustProductsEvaluationsInstance

Initialize the TrustProductsEvaluationsInstance



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 248

def initialize(version, payload , trust_product_sid: nil, sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'policy_sid' => payload['policy_sid'],
        'trust_product_sid' => payload['trust_product_sid'],
        'status' => payload['status'],
        'results' => payload['results'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'trust_product_sid' => trust_product_sid  || @properties['trust_product_sid']  ,'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sidString



287
288
289
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 287

def 
    @properties['account_sid']
end

#contextTrustProductsEvaluationsContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context



272
273
274
275
276
277
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 272

def context
    unless @instance_context
        @instance_context = TrustProductsEvaluationsContext.new(@version , @params['trust_product_sid'], @params['sid'])
    end
    @instance_context
end

#date_createdTime



317
318
319
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 317

def date_created
    @properties['date_created']
end

#fetchTrustProductsEvaluationsInstance

Fetch the TrustProductsEvaluationsInstance



330
331
332
333
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 330

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



344
345
346
347
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 344

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Trusthub.V1.TrustProductsEvaluationsInstance #{values}>"
end

#policy_sidString



293
294
295
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 293

def policy_sid
    @properties['policy_sid']
end

#resultsArray<Hash>



311
312
313
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 311

def results
    @properties['results']
end

#sidString



281
282
283
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 281

def sid
    @properties['sid']
end

#statusStatus



305
306
307
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 305

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



337
338
339
340
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 337

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Trusthub.V1.TrustProductsEvaluationsInstance #{values}>"
end

#trust_product_sidString



299
300
301
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 299

def trust_product_sid
    @properties['trust_product_sid']
end

#urlString



323
324
325
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 323

def url
    @properties['url']
end