class Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleInstance

Public Class Methods

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

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

resource.

@return [BundleInstance] BundleInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
340 def initialize(version, payload, sid: nil)
341   super(version)
342 
343   # Marshaled Properties
344   @properties = {
345       'sid' => payload['sid'],
346       'account_sid' => payload['account_sid'],
347       'regulation_sid' => payload['regulation_sid'],
348       'friendly_name' => payload['friendly_name'],
349       'status' => payload['status'],
350       'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
351       'email' => payload['email'],
352       'status_callback' => payload['status_callback'],
353       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
354       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
355       'url' => payload['url'],
356       'links' => payload['links'],
357   }
358 
359   # Context
360   @instance_context = nil
361   @params = {'sid' => sid || @properties['sid'], }
362 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.rb
383 def account_sid
384   @properties['account_sid']
385 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 [BundleContext] BundleContext for this BundleInstance

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
368 def context
369   unless @instance_context
370     @instance_context = BundleContext.new(@version, @params['sid'], )
371   end
372   @instance_context
373 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
425 def date_created
426   @properties['date_created']
427 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
431 def date_updated
432   @properties['date_updated']
433 end
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
476 def delete
477   context.delete
478 end
email() click to toggle source

@return [String] The email address

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
413 def email
414   @properties['email']
415 end
evaluations() click to toggle source

Access the evaluations @return [evaluations] evaluations

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
483 def evaluations
484   context.evaluations
485 end
fetch() click to toggle source

Fetch the BundleInstance @return [BundleInstance] Fetched BundleInstance

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
450 def fetch
451   context.fetch
452 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the resource

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
395 def friendly_name
396   @properties['friendly_name']
397 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
503 def inspect
504   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
505   "<Twilio.Numbers.V2.BundleInstance #{values}>"
506 end
item_assignments() click to toggle source

Access the item_assignments @return [item_assignments] item_assignments

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
490 def item_assignments
491   context.item_assignments
492 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.rb
389 def regulation_sid
390   @properties['regulation_sid']
391 end
sid() click to toggle source

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

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

@return [bundle.Status] The verification status of the Bundle resource

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
401 def status
402   @properties['status']
403 end
status_callback() click to toggle source

@return [String] The URL we call to inform your application of status changes.

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
419 def status_callback
420   @properties['status_callback']
421 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
496 def to_s
497   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
498   "<Twilio.Numbers.V2.BundleInstance #{values}>"
499 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
464 def update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset)
465   context.update(
466       status: status,
467       status_callback: status_callback,
468       friendly_name: friendly_name,
469       email: email,
470   )
471 end
url() click to toggle source

@return [String] The absolute URL of the Bundle resource

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
437 def url
438   @properties['url']
439 end
valid_until() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource will be valid until.

    # File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
407 def valid_until
408   @properties['valid_until']
409 end