class Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::EvaluationInstance

Public Class Methods

new(version, payload, bundle_sid: nil, sid: nil) click to toggle source

Initialize the EvaluationInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] bundle_sid The unique string that we created to identify the

Bundle resource.

@param [String] sid The unique string that identifies the Evaluation resource. @return [EvaluationInstance] EvaluationInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
204 def initialize(version, payload, bundle_sid: nil, sid: nil)
205   super(version)
206 
207   # Marshaled Properties
208   @properties = {
209       'sid' => payload['sid'],
210       'account_sid' => payload['account_sid'],
211       'regulation_sid' => payload['regulation_sid'],
212       'bundle_sid' => payload['bundle_sid'],
213       'status' => payload['status'],
214       'results' => payload['results'],
215       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
216       'url' => payload['url'],
217   }
218 
219   # Context
220   @instance_context = nil
221   @params = {'bundle_sid' => bundle_sid, 'sid' => sid || @properties['sid'], }
222 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
243 def account_sid
244   @properties['account_sid']
245 end
bundle_sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
255 def bundle_sid
256   @properties['bundle_sid']
257 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [EvaluationContext] EvaluationContext for this EvaluationInstance

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
228 def context
229   unless @instance_context
230     @instance_context = EvaluationContext.new(@version, @params['bundle_sid'], @params['sid'], )
231   end
232   @instance_context
233 end
date_created() click to toggle source

@return [Time] The date_created

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
273 def date_created
274   @properties['date_created']
275 end
fetch() click to toggle source

Fetch the EvaluationInstance @return [EvaluationInstance] Fetched EvaluationInstance

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
286 def fetch
287   context.fetch
288 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
299 def inspect
300   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
301   "<Twilio.Numbers.V2.EvaluationInstance #{values}>"
302 end
regulation_sid() click to toggle source

@return [String] The unique string of a regulation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
249 def regulation_sid
250   @properties['regulation_sid']
251 end
results() click to toggle source

@return [Array] The results of the Evaluation resource

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
267 def results
268   @properties['results']
269 end
sid() click to toggle source

@return [String] The unique string that identifies the Evaluation resource

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
237 def sid
238   @properties['sid']
239 end
status() click to toggle source

@return [evaluation.Status] The compliance status of the Evaluation resource

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
261 def status
262   @properties['status']
263 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
292 def to_s
293   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
294   "<Twilio.Numbers.V2.EvaluationInstance #{values}>"
295 end
url() click to toggle source

@return [String] The url

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb
279 def url
280   @properties['url']
281 end