class Twilio::REST::Api::V2010::AccountInstance

Public Class Methods

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

Initialize the AccountInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The Account Sid that uniquely identifies the account to

fetch

@return [AccountInstance] AccountInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account.rb
656 def initialize(version, payload, sid: nil)
657   super(version)
658 
659   # Marshaled Properties
660   @properties = {
661       'auth_token' => payload['auth_token'],
662       'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
663       'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
664       'friendly_name' => payload['friendly_name'],
665       'owner_account_sid' => payload['owner_account_sid'],
666       'sid' => payload['sid'],
667       'status' => payload['status'],
668       'subresource_uris' => payload['subresource_uris'],
669       'type' => payload['type'],
670       'uri' => payload['uri'],
671   }
672 
673   # Context
674   @instance_context = nil
675   @params = {'sid' => sid || @properties['sid'], }
676 end

Public Instance Methods

addresses() click to toggle source

Access the addresses @return [addresses] addresses

    # File lib/twilio-ruby/rest/api/v2010/account.rb
771 def addresses
772   context.addresses
773 end
applications() click to toggle source

Access the applications @return [applications] applications

    # File lib/twilio-ruby/rest/api/v2010/account.rb
778 def applications
779   context.applications
780 end
auth_token() click to toggle source

@return [String] The authorization token for this account

    # File lib/twilio-ruby/rest/api/v2010/account.rb
691 def auth_token
692   @properties['auth_token']
693 end
authorized_connect_apps() click to toggle source

Access the authorized_connect_apps @return [authorized_connect_apps] authorized_connect_apps

    # File lib/twilio-ruby/rest/api/v2010/account.rb
785 def authorized_connect_apps
786   context.authorized_connect_apps
787 end
available_phone_numbers() click to toggle source

Access the available_phone_numbers @return [available_phone_numbers] available_phone_numbers

    # File lib/twilio-ruby/rest/api/v2010/account.rb
792 def available_phone_numbers
793   context.available_phone_numbers
794 end
balance() click to toggle source

Access the balance @return [balance] balance

    # File lib/twilio-ruby/rest/api/v2010/account.rb
799 def balance
800   context.balance
801 end
calls() click to toggle source

Access the calls @return [calls] calls

    # File lib/twilio-ruby/rest/api/v2010/account.rb
806 def calls
807   context.calls
808 end
conferences() click to toggle source

Access the conferences @return [conferences] conferences

    # File lib/twilio-ruby/rest/api/v2010/account.rb
813 def conferences
814   context.conferences
815 end
connect_apps() click to toggle source

Access the connect_apps @return [connect_apps] connect_apps

    # File lib/twilio-ruby/rest/api/v2010/account.rb
820 def connect_apps
821   context.connect_apps
822 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 [AccountContext] AccountContext for this AccountInstance

    # File lib/twilio-ruby/rest/api/v2010/account.rb
682 def context
683   unless @instance_context
684     @instance_context = AccountContext.new(@version, @params['sid'], )
685   end
686   @instance_context
687 end
date_created() click to toggle source

@return [Time] The date this account was created

    # File lib/twilio-ruby/rest/api/v2010/account.rb
697 def date_created
698   @properties['date_created']
699 end
date_updated() click to toggle source

@return [Time] The date this account was last updated

    # File lib/twilio-ruby/rest/api/v2010/account.rb
703 def date_updated
704   @properties['date_updated']
705 end
fetch() click to toggle source

Fetch the AccountInstance @return [AccountInstance] Fetched AccountInstance

    # File lib/twilio-ruby/rest/api/v2010/account.rb
752 def fetch
753   context.fetch
754 end
friendly_name() click to toggle source

@return [String] A human readable description of this account

    # File lib/twilio-ruby/rest/api/v2010/account.rb
709 def friendly_name
710   @properties['friendly_name']
711 end
incoming_phone_numbers() click to toggle source

Access the incoming_phone_numbers @return [incoming_phone_numbers] incoming_phone_numbers

    # File lib/twilio-ruby/rest/api/v2010/account.rb
827 def incoming_phone_numbers
828   context.incoming_phone_numbers
829 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account.rb
945 def inspect
946   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
947   "<Twilio.Api.V2010.AccountInstance #{values}>"
948 end
keys() click to toggle source

Access the keys @return [keys] keys

    # File lib/twilio-ruby/rest/api/v2010/account.rb
834 def keys
835   context.keys
836 end
messages() click to toggle source

Access the messages @return [messages] messages

    # File lib/twilio-ruby/rest/api/v2010/account.rb
841 def messages
842   context.messages
843 end
new_keys() click to toggle source

Access the new_keys @return [new_keys] new_keys

    # File lib/twilio-ruby/rest/api/v2010/account.rb
848 def new_keys
849   context.new_keys
850 end
new_signing_keys() click to toggle source

Access the new_signing_keys @return [new_signing_keys] new_signing_keys

    # File lib/twilio-ruby/rest/api/v2010/account.rb
855 def new_signing_keys
856   context.new_signing_keys
857 end
notifications() click to toggle source

Access the notifications @return [notifications] notifications

    # File lib/twilio-ruby/rest/api/v2010/account.rb
862 def notifications
863   context.notifications
864 end
outgoing_caller_ids() click to toggle source

Access the outgoing_caller_ids @return [outgoing_caller_ids] outgoing_caller_ids

    # File lib/twilio-ruby/rest/api/v2010/account.rb
869 def outgoing_caller_ids
870   context.outgoing_caller_ids
871 end
owner_account_sid() click to toggle source

@return [String] The unique 34 character id representing the parent of this account

    # File lib/twilio-ruby/rest/api/v2010/account.rb
715 def owner_account_sid
716   @properties['owner_account_sid']
717 end
queues() click to toggle source

Access the queues @return [queues] queues

    # File lib/twilio-ruby/rest/api/v2010/account.rb
876 def queues
877   context.queues
878 end
recordings() click to toggle source

Access the recordings @return [recordings] recordings

    # File lib/twilio-ruby/rest/api/v2010/account.rb
883 def recordings
884   context.recordings
885 end
short_codes() click to toggle source

Access the short_codes @return [short_codes] short_codes

    # File lib/twilio-ruby/rest/api/v2010/account.rb
904 def short_codes
905   context.short_codes
906 end
sid() click to toggle source

@return [String] A 34 character string that uniquely identifies this resource.

    # File lib/twilio-ruby/rest/api/v2010/account.rb
721 def sid
722   @properties['sid']
723 end
signing_keys() click to toggle source

Access the signing_keys @return [signing_keys] signing_keys

    # File lib/twilio-ruby/rest/api/v2010/account.rb
890 def signing_keys
891   context.signing_keys
892 end
sip() click to toggle source

Access the sip @return [sip] sip

    # File lib/twilio-ruby/rest/api/v2010/account.rb
897 def sip
898   context.sip
899 end
status() click to toggle source

@return [account.Status] The status of this account

    # File lib/twilio-ruby/rest/api/v2010/account.rb
727 def status
728   @properties['status']
729 end
subresource_uris() click to toggle source

@return [String] Account Instance Subresources

    # File lib/twilio-ruby/rest/api/v2010/account.rb
733 def subresource_uris
734   @properties['subresource_uris']
735 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account.rb
938 def to_s
939   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
940   "<Twilio.Api.V2010.AccountInstance #{values}>"
941 end
tokens() click to toggle source

Access the tokens @return [tokens] tokens

    # File lib/twilio-ruby/rest/api/v2010/account.rb
911 def tokens
912   context.tokens
913 end
transcriptions() click to toggle source

Access the transcriptions @return [transcriptions] transcriptions

    # File lib/twilio-ruby/rest/api/v2010/account.rb
918 def transcriptions
919   context.transcriptions
920 end
type() click to toggle source

@return [account.Type] The type of this account

    # File lib/twilio-ruby/rest/api/v2010/account.rb
739 def type
740   @properties['type']
741 end
update(friendly_name: :unset, status: :unset) click to toggle source

Update the AccountInstance @param [String] friendly_name Update the human-readable description of this

Account

@param [account.Status] status Alter the status of this account: use `closed` to

irreversibly close this account, `suspended` to temporarily suspend it, or
`active` to reactivate it.

@return [AccountInstance] Updated AccountInstance

    # File lib/twilio-ruby/rest/api/v2010/account.rb
764 def update(friendly_name: :unset, status: :unset)
765   context.update(friendly_name: friendly_name, status: status, )
766 end
uri() click to toggle source

@return [String] The URI for this resource, relative to `api.twilio.com`

    # File lib/twilio-ruby/rest/api/v2010/account.rb
745 def uri
746   @properties['uri']
747 end
usage() click to toggle source

Access the usage @return [usage] usage

    # File lib/twilio-ruby/rest/api/v2010/account.rb
925 def usage
926   context.usage
927 end
validation_requests() click to toggle source

Access the validation_requests @return [validation_requests] validation_requests

    # File lib/twilio-ruby/rest/api/v2010/account.rb
932 def validation_requests
933   context.validation_requests
934 end