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](www.twilio.com/docs/iam/api/account) that created the trust_product resource.
-
#context ⇒ TrustProductsEvaluationsContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #date_created ⇒ Time
-
#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 that is associated to the trust_product resource.
-
#results ⇒ Array<Hash>
The results of the Evaluation which includes the valid and invalid attributes.
-
#sid ⇒ String
The unique string that identifies the Evaluation resource.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trust_product_sid ⇒ String
The unique string that we created to identify the trust_product resource.
- #url ⇒ String
Constructor Details
#initialize(version, payload, trust_product_sid: nil, sid: nil) ⇒ TrustProductsEvaluationsInstance
Initialize the TrustProductsEvaluationsInstance
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 232 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_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the trust_product resource.
271 272 273 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 271 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
256 257 258 259 260 261 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 256 def context unless @instance_context @instance_context = TrustProductsEvaluationsContext.new(@version , @params['trust_product_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
301 302 303 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 301 def date_created @properties['date_created'] end |
#fetch ⇒ TrustProductsEvaluationsInstance
Fetch the TrustProductsEvaluationsInstance
314 315 316 317 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 314 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
328 329 330 331 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 328 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 that is associated to the trust_product resource.
277 278 279 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 277 def policy_sid @properties['policy_sid'] end |
#results ⇒ Array<Hash>
Returns The results of the Evaluation which includes the valid and invalid attributes.
295 296 297 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 295 def results @properties['results'] end |
#sid ⇒ String
Returns The unique string that identifies the Evaluation resource.
265 266 267 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 265 def sid @properties['sid'] end |
#status ⇒ Status
289 290 291 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 289 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
321 322 323 324 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 321 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 we created to identify the trust_product resource.
283 284 285 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 283 def trust_product_sid @properties['trust_product_sid'] end |
#url ⇒ String
307 308 309 |
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb', line 307 def url @properties['url'] end |