lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb in twilio-ruby-5.34.0 vs lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb in twilio-ruby-5.34.1

- old
+ new

@@ -240,10 +240,11 @@ # Path Solution @solution = {sid: sid, } @uri = "/RegulatoryCompliance/Bundles/#{@solution[:sid]}" # Dependents + @evaluations = nil @item_assignments = nil end ## # Fetch a BundleInstance @@ -286,10 +287,28 @@ BundleInstance.new(@version, payload, sid: @solution[:sid], ) end ## + # Access the evaluations + # @return [EvaluationList] + # @return [EvaluationContext] if sid was passed. + def evaluations(sid=:unset) + raise ArgumentError, 'sid cannot be nil' if sid.nil? + + if sid != :unset + return EvaluationContext.new(@version, @solution[:sid], sid, ) + end + + unless @evaluations + @evaluations = EvaluationList.new(@version, bundle_sid: @solution[:sid], ) + end + + @evaluations + end + + ## # Access the item_assignments # @return [ItemAssignmentList] # @return [ItemAssignmentContext] if sid was passed. def item_assignments(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? @@ -450,9 +469,16 @@ status: status, status_callback: status_callback, friendly_name: friendly_name, email: email, ) + end + + ## + # Access the evaluations + # @return [evaluations] evaluations + def evaluations + context.evaluations end ## # Access the item_assignments # @return [item_assignments] item_assignments \ No newline at end of file