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

Public Class Methods

new(version, sid) click to toggle source

Initialize the BundleContext @param [Version] version Version that contains the resource @param [String] sid The unique string that we created to identify the Bundle

resource.

@return [BundleContext] BundleContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
230 def initialize(version, sid)
231   super(version)
232 
233   # Path Solution
234   @solution = {sid: sid, }
235   @uri = "/RegulatoryCompliance/Bundles/#{@solution[:sid]}"
236 
237   # Dependents
238   @evaluations = nil
239   @item_assignments = nil
240 end

Public Instance Methods

delete() click to toggle source

Delete the BundleInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
277 def delete
278    @version.delete('DELETE', @uri)
279 end
evaluations(sid=:unset) click to toggle source

Access the evaluations @return [EvaluationList] @return [EvaluationContext] if sid was passed.

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
285 def evaluations(sid=:unset)
286   raise ArgumentError, 'sid cannot be nil' if sid.nil?
287 
288   if sid != :unset
289     return EvaluationContext.new(@version, @solution[:sid], sid, )
290   end
291 
292   unless @evaluations
293     @evaluations = EvaluationList.new(@version, bundle_sid: @solution[:sid], )
294   end
295 
296   @evaluations
297 end
fetch() click to toggle source

Fetch the BundleInstance @return [BundleInstance] Fetched BundleInstance

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
245 def fetch
246   payload = @version.fetch('GET', @uri)
247 
248   BundleInstance.new(@version, payload, sid: @solution[:sid], )
249 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
326 def inspect
327   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
328   "#<Twilio.Numbers.V2.BundleContext #{context}>"
329 end
item_assignments(sid=:unset) click to toggle source

Access the item_assignments @return [ItemAssignmentList] @return [ItemAssignmentContext] if sid was passed.

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
303 def item_assignments(sid=:unset)
304   raise ArgumentError, 'sid cannot be nil' if sid.nil?
305 
306   if sid != :unset
307     return ItemAssignmentContext.new(@version, @solution[:sid], sid, )
308   end
309 
310   unless @item_assignments
311     @item_assignments = ItemAssignmentList.new(@version, bundle_sid: @solution[:sid], )
312   end
313 
314   @item_assignments
315 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
319 def to_s
320   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
321   "#<Twilio.Numbers.V2.BundleContext #{context}>"
322 end
update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) click to toggle source

Update the BundleInstance @param [bundle.Status] status The verification status of the Bundle resource. @param [String] status_callback The URL we call to inform your application of

status changes.

@param [String] friendly_name The string that you assigned to describe the

resource.

@param [String] email The email address that will receive updates when the

Bundle resource changes status.

@return [BundleInstance] Updated BundleInstance

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
261 def update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset)
262   data = Twilio::Values.of({
263       'Status' => status,
264       'StatusCallback' => status_callback,
265       'FriendlyName' => friendly_name,
266       'Email' => email,
267   })
268 
269   payload = @version.update('POST', @uri, data: data)
270 
271   BundleInstance.new(@version, payload, sid: @solution[:sid], )
272 end