Class: Twilio::REST::Api::V2010::AccountInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account.rb

Instance Method Summary collapse

Constructor Details

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

Initialize the AccountInstance



656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 656

def initialize(version, payload, sid: nil)
  super(version)

  # Marshaled Properties
  @properties = {
      'auth_token' => payload['auth_token'],
      'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
      'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
      'friendly_name' => payload['friendly_name'],
      'owner_account_sid' => payload['owner_account_sid'],
      'sid' => payload['sid'],
      'status' => payload['status'],
      'subresource_uris' => payload['subresource_uris'],
      'type' => payload['type'],
      'uri' => payload['uri'],
  }

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

Instance Method Details

#addressesaddresses

Access the addresses



771
772
773
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 771

def addresses
  context.addresses
end

#applicationsapplications

Access the applications



778
779
780
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 778

def applications
  context.applications
end

#auth_tokenString



691
692
693
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 691

def auth_token
  @properties['auth_token']
end

#authorized_connect_appsauthorized_connect_apps

Access the authorized_connect_apps



785
786
787
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 785

def authorized_connect_apps
  context.authorized_connect_apps
end

#available_phone_numbersavailable_phone_numbers

Access the available_phone_numbers



792
793
794
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 792

def available_phone_numbers
  context.available_phone_numbers
end

#balancebalance

Access the balance



799
800
801
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 799

def balance
  context.balance
end

#callscalls

Access the calls



806
807
808
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 806

def calls
  context.calls
end

#conferencesconferences

Access the conferences



813
814
815
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 813

def conferences
  context.conferences
end

#connect_appsconnect_apps

Access the connect_apps



820
821
822
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 820

def connect_apps
  context.connect_apps
end

#contextAccountContext

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



682
683
684
685
686
687
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 682

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

#date_createdTime



697
698
699
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 697

def date_created
  @properties['date_created']
end

#date_updatedTime



703
704
705
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 703

def date_updated
  @properties['date_updated']
end

#fetchAccountInstance

Fetch the AccountInstance



752
753
754
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 752

def fetch
  context.fetch
end

#friendly_nameString



709
710
711
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 709

def friendly_name
  @properties['friendly_name']
end

#incoming_phone_numbersincoming_phone_numbers

Access the incoming_phone_numbers



827
828
829
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 827

def incoming_phone_numbers
  context.incoming_phone_numbers
end

#inspectObject

Provide a detailed, user friendly representation



945
946
947
948
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 945

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

#keyskeys

Access the keys



834
835
836
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 834

def keys
  context.keys
end

#messagesmessages

Access the messages



841
842
843
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 841

def messages
  context.messages
end

#new_keysnew_keys

Access the new_keys



848
849
850
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 848

def new_keys
  context.new_keys
end

#new_signing_keysnew_signing_keys

Access the new_signing_keys



855
856
857
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 855

def new_signing_keys
  context.new_signing_keys
end

#notificationsnotifications

Access the notifications



862
863
864
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 862

def notifications
  context.notifications
end

#outgoing_caller_idsoutgoing_caller_ids

Access the outgoing_caller_ids



869
870
871
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 869

def outgoing_caller_ids
  context.outgoing_caller_ids
end

#owner_account_sidString



715
716
717
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 715

def 
  @properties['owner_account_sid']
end

#queuesqueues

Access the queues



876
877
878
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 876

def queues
  context.queues
end

#recordingsrecordings

Access the recordings



883
884
885
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 883

def recordings
  context.recordings
end

#short_codesshort_codes

Access the short_codes



904
905
906
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 904

def short_codes
  context.short_codes
end

#sidString



721
722
723
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 721

def sid
  @properties['sid']
end

#signing_keyssigning_keys

Access the signing_keys



890
891
892
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 890

def signing_keys
  context.signing_keys
end

#sipsip

Access the sip



897
898
899
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 897

def sip
  context.sip
end

#statusaccount.Status



727
728
729
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 727

def status
  @properties['status']
end

#subresource_urisString



733
734
735
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 733

def subresource_uris
  @properties['subresource_uris']
end

#to_sObject

Provide a user friendly representation



938
939
940
941
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 938

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

#tokenstokens

Access the tokens



911
912
913
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 911

def tokens
  context.tokens
end

#transcriptionstranscriptions

Access the transcriptions



918
919
920
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 918

def transcriptions
  context.transcriptions
end

#typeaccount.Type



739
740
741
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 739

def type
  @properties['type']
end

#update(friendly_name: :unset, status: :unset) ⇒ AccountInstance

Update the AccountInstance



764
765
766
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 764

def update(friendly_name: :unset, status: :unset)
  context.update(friendly_name: friendly_name, status: status, )
end

#uriString



745
746
747
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 745

def uri
  @properties['uri']
end

#usageusage

Access the usage



925
926
927
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 925

def usage
  context.usage
end

#validation_requestsvalidation_requests

Access the validation_requests



932
933
934
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 932

def validation_requests
  context.validation_requests
end