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



735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 735

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



779
780
781
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 779

def 
    @properties['account_sid']
end

#bundle_copiesbundle_copies

Access the bundle_copies



891
892
893
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 891

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



764
765
766
767
768
769
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 764

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

#date_createdTime



821
822
823
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 821

def date_created
    @properties['date_created']
end

#date_updatedTime



827
828
829
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 827

def date_updated
    @properties['date_updated']
end

#deleteBoolean

Delete the BundleInstance



846
847
848
849
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 846

def delete

    context.delete
end

#emailString



809
810
811
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 809

def email
    @properties['email']
end

#evaluationsevaluations

Access the evaluations



905
906
907
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 905

def evaluations
    context.evaluations
end

#fetchBundleInstance

Fetch the BundleInstance



854
855
856
857
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 854

def fetch

    context.fetch
end

#friendly_nameString



791
792
793
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 791

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



918
919
920
921
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 918

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

#item_assignmentsitem_assignments

Access the item_assignments



898
899
900
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 898

def item_assignments
    context.item_assignments
end


839
840
841
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 839

def links
    @properties['links']
end

#regulation_sidString



785
786
787
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 785

def regulation_sid
    @properties['regulation_sid']
end

#replace_itemsreplace_items

Access the replace_items



884
885
886
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 884

def replace_items
    context.replace_items
end

#sidString



773
774
775
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 773

def sid
    @properties['sid']
end

#statusStatus



797
798
799
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 797

def status
    @properties['status']
end

#status_callbackString



815
816
817
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 815

def status_callback
    @properties['status_callback']
end

#to_sObject

Provide a user friendly representation



911
912
913
914
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 911

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



866
867
868
869
870
871
872
873
874
875
876
877
878
879
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 866

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



833
834
835
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 833

def url
    @properties['url']
end

#valid_untilTime



803
804
805
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 803

def valid_until
    @properties['valid_until']
end