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

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this Bundle resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 751

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

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Bundle resource.

Returns:



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

def 
    @properties['account_sid']
end

#bundle_copiesbundle_copies

Access the bundle_copies

Returns:



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

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

Returns:



780
781
782
783
784
785
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 780

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

#date_createdTime

Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



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

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



843
844
845
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 843

def date_updated
    @properties['date_updated']
end

#deleteBoolean

Delete the BundleInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



862
863
864
865
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 862

def delete

    context.delete
end

#emailString

Returns The email address that will receive updates when the Bundle resource changes status.

Returns:

  • (String)

    The email address that will receive updates when the Bundle resource changes status.



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

def email
    @properties['email']
end

#evaluationsevaluations

Access the evaluations

Returns:



921
922
923
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 921

def evaluations
    context.evaluations
end

#fetchBundleInstance

Fetch the BundleInstance

Returns:



870
871
872
873
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 870

def fetch

    context.fetch
end

#friendly_nameString

Returns The string that you assigned to describe the resource.

Returns:

  • (String)

    The string that you assigned to describe the resource.



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

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



934
935
936
937
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 934

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

#item_assignmentsitem_assignments

Access the item_assignments

Returns:



914
915
916
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 914

def item_assignments
    context.item_assignments
end

Returns The URLs of the Assigned Items of the Bundle resource.

Returns:

  • (Hash)

    The URLs of the Assigned Items of the Bundle resource.



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

def links
    @properties['links']
end

#regulation_sidString

Returns The unique string of a regulation that is associated to the Bundle resource.

Returns:

  • (String)

    The unique string of a regulation that is associated to the Bundle resource.



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

def regulation_sid
    @properties['regulation_sid']
end

#replace_itemsreplace_items

Access the replace_items

Returns:



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

def replace_items
    context.replace_items
end

#sidString

Returns The unique string that we created to identify the Bundle resource.

Returns:

  • (String)

    The unique string that we created to identify the Bundle resource.



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

def sid
    @properties['sid']
end

#statusStatus

Returns:

  • (Status)


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

def status
    @properties['status']
end

#status_callbackString

Returns The URL we call to inform your application of status changes.

Returns:

  • (String)

    The URL we call to inform your application of status changes.



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

def status_callback
    @properties['status_callback']
end

#to_sObject

Provide a user friendly representation



927
928
929
930
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 927

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

Parameters:

  • status (Status) (defaults to: :unset)
  • status_callback (String) (defaults to: :unset)

    The URL we call to inform your application of status changes.

  • friendly_name (String) (defaults to: :unset)

    The string that you assigned to describe the resource.

  • email (String) (defaults to: :unset)

    The email address that will receive updates when the Bundle resource changes status.

Returns:



882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 882

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

Returns The absolute URL of the Bundle resource.

Returns:

  • (String)

    The absolute URL of the Bundle resource.



849
850
851
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 849

def url
    @properties['url']
end

#valid_untilTime

Returns The date and time in GMT in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format when the resource will be valid until.

Returns:



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

def valid_until
    @properties['valid_until']
end