class Twilio::REST::Api::V2010::AccountInstance
Public Class Methods
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
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
Access the addresses @return [addresses] addresses
# File lib/twilio-ruby/rest/api/v2010/account.rb 771 def addresses 772 context.addresses 773 end
Access the applications @return [applications] applications
# File lib/twilio-ruby/rest/api/v2010/account.rb 778 def applications 779 context.applications 780 end
@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
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
Access the balance @return [balance] balance
# File lib/twilio-ruby/rest/api/v2010/account.rb 799 def balance 800 context.balance 801 end
Access the calls @return [calls] calls
# File lib/twilio-ruby/rest/api/v2010/account.rb 806 def calls 807 context.calls 808 end
Access the conferences @return [conferences] conferences
# File lib/twilio-ruby/rest/api/v2010/account.rb 813 def conferences 814 context.conferences 815 end
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
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
@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
@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 the AccountInstance
@return [AccountInstance] Fetched AccountInstance
# File lib/twilio-ruby/rest/api/v2010/account.rb 752 def fetch 753 context.fetch 754 end
@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
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
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
Access the keys @return [keys] keys
# File lib/twilio-ruby/rest/api/v2010/account.rb 834 def keys 835 context.keys 836 end
Access the messages @return [messages] messages
# File lib/twilio-ruby/rest/api/v2010/account.rb 841 def messages 842 context.messages 843 end
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
Access the notifications @return [notifications] notifications
# File lib/twilio-ruby/rest/api/v2010/account.rb 862 def notifications 863 context.notifications 864 end
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
@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
Access the queues @return [queues] queues
# File lib/twilio-ruby/rest/api/v2010/account.rb 876 def queues 877 context.queues 878 end
Access the recordings @return [recordings] recordings
# File lib/twilio-ruby/rest/api/v2010/account.rb 883 def recordings 884 context.recordings 885 end
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
@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
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
Access the sip @return [sip] sip
# File lib/twilio-ruby/rest/api/v2010/account.rb 897 def sip 898 context.sip 899 end
@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
@return [String] Account Instance Subresources
# File lib/twilio-ruby/rest/api/v2010/account.rb 733 def subresource_uris 734 @properties['subresource_uris'] 735 end
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
Access the tokens @return [tokens] tokens
# File lib/twilio-ruby/rest/api/v2010/account.rb 911 def tokens 912 context.tokens 913 end
Access the transcriptions @return [transcriptions] transcriptions
# File lib/twilio-ruby/rest/api/v2010/account.rb 918 def transcriptions 919 context.transcriptions 920 end
@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 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
@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
Access the usage @return [usage] usage
# File lib/twilio-ruby/rest/api/v2010/account.rb 925 def usage 926 context.usage 927 end
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