Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ BundleInstance

Initialize the BundleInstance



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 443

def initialize(version, payload , sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'regulation_sid' => payload['regulation_sid'],
        'friendly_name' => payload['friendly_name'],
        'status' => payload['status'],
        'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
        'email' => payload['email'],
        'status_callback' => payload['status_callback'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'url' => payload['url'],
        'links' => payload['links'],
    }

    # Context
    @instance_context = nil
    @params = { 'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sidString



486
487
488
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 486

def 
    @properties['account_sid']
end

#bundle_copiesbundle_copies

Access the bundle_copies



598
599
600
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 598

def bundle_copies
    context.bundle_copies
end

#contextBundleContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context



471
472
473
474
475
476
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 471

def context
    unless @instance_context
        @instance_context = BundleContext.new(@version , @params['sid'])
    end
    @instance_context
end

#date_createdTime



528
529
530
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 528

def date_created
    @properties['date_created']
end

#date_updatedTime



534
535
536
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 534

def date_updated
    @properties['date_updated']
end

#deleteBoolean

Delete the BundleInstance



553
554
555
556
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 553

def delete

    context.delete
end

#emailString



516
517
518
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 516

def email
    @properties['email']
end

#evaluationsevaluations

Access the evaluations



612
613
614
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 612

def evaluations
    context.evaluations
end

#fetchBundleInstance

Fetch the BundleInstance



561
562
563
564
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 561

def fetch

    context.fetch
end

#friendly_nameString



498
499
500
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 498

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



625
626
627
628
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 625

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Numbers.V2.BundleInstance #{values}>"
end

#item_assignmentsitem_assignments

Access the item_assignments



605
606
607
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 605

def item_assignments
    context.item_assignments
end


546
547
548
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 546

def links
    @properties['links']
end

#regulation_sidString



492
493
494
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 492

def regulation_sid
    @properties['regulation_sid']
end

#replace_itemsreplace_items

Access the replace_items



591
592
593
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 591

def replace_items
    context.replace_items
end

#sidString



480
481
482
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 480

def sid
    @properties['sid']
end

#statusStatus



504
505
506
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 504

def status
    @properties['status']
end

#status_callbackString



522
523
524
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 522

def status_callback
    @properties['status_callback']
end

#to_sObject

Provide a user friendly representation



618
619
620
621
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 618

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Numbers.V2.BundleInstance #{values}>"
end

#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ BundleInstance

Update the BundleInstance



573
574
575
576
577
578
579
580
581
582
583
584
585
586
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 573

def update(
    status: :unset, 
    status_callback: :unset, 
    friendly_name: :unset, 
    email: :unset
)

    context.update(
        status: status, 
        status_callback: status_callback, 
        friendly_name: friendly_name, 
        email: email, 
    )
end

#urlString



540
541
542
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 540

def url
    @properties['url']
end

#valid_untilTime



510
511
512
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 510

def valid_until
    @properties['valid_until']
end