Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsInstance
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#context ⇒ TrustProductsEvaluationsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date_created.
-
#fetch ⇒ TrustProductsEvaluationsInstance
Fetch the TrustProductsEvaluationsInstance.
-
#initialize(version, payload, trust_product_sid: nil, sid: nil) ⇒ TrustProductsEvaluationsInstance
constructor
Initialize the TrustProductsEvaluationsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#policy_sid ⇒ String
The unique string of a policy.
-
#results ⇒ Array[Hash]
The results of the Evaluation resource.
-
#sid ⇒ String
The unique string that identifies the Evaluation resource.
-
#status ⇒ trust_products_evaluations.Status
The compliance status of the Evaluation resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trust_product_sid ⇒ String
The unique string that identifies the resource.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, trust_product_sid: nil, sid: nil) ⇒ TrustProductsEvaluationsInstance
Initialize the TrustProductsEvaluationsInstance
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 220 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, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
263 264 265 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 263 def account_sid @properties['account_sid'] end |
#context ⇒ TrustProductsEvaluationsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
244 245 246 247 248 249 250 251 252 253 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 244 def context unless @instance_context @instance_context = TrustProductsEvaluationsContext.new( @version, @params['trust_product_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date_created.
293 294 295 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 293 def date_created @properties['date_created'] end |
#fetch ⇒ TrustProductsEvaluationsInstance
Fetch the TrustProductsEvaluationsInstance
306 307 308 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 306 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
319 320 321 322 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 319 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.TrustProductsEvaluationsInstance #{values}>" end |
#policy_sid ⇒ String
Returns The unique string of a policy.
269 270 271 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 269 def policy_sid @properties['policy_sid'] end |
#results ⇒ Array[Hash]
Returns The results of the Evaluation resource.
287 288 289 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 287 def results @properties['results'] end |
#sid ⇒ String
Returns The unique string that identifies the Evaluation resource.
257 258 259 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 257 def sid @properties['sid'] end |
#status ⇒ trust_products_evaluations.Status
Returns The compliance status of the Evaluation resource.
281 282 283 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 281 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
312 313 314 315 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 312 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trusthub.V1.TrustProductsEvaluationsInstance #{values}>" end |
#trust_product_sid ⇒ String
Returns The unique string that identifies the resource.
275 276 277 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 275 def trust_product_sid @properties['trust_product_sid'] end |
#url ⇒ String
Returns The url.
299 300 301 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 299 def url @properties['url'] end |