Class: Twilio::REST::Api::V2010::AccountInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account.rb
Instance Method Summary collapse
-
#addresses ⇒ addresses
Access the addresses.
-
#applications ⇒ applications
Access the applications.
-
#auth_token ⇒ String
The authorization token for this account.
-
#authorized_connect_apps ⇒ authorized_connect_apps
Access the authorized_connect_apps.
-
#available_phone_numbers ⇒ available_phone_numbers
Access the available_phone_numbers.
-
#balance ⇒ balance
Access the balance.
-
#calls ⇒ calls
Access the calls.
-
#conferences ⇒ conferences
Access the conferences.
-
#connect_apps ⇒ connect_apps
Access the connect_apps.
-
#context ⇒ AccountContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this account was created, in GMT in RFC 2822 format.
-
#date_updated ⇒ Time
The date that this account was last updated, in GMT in RFC 2822 format.
-
#fetch ⇒ AccountInstance
Fetch the AccountInstance.
-
#friendly_name ⇒ String
A human readable description of this account, up to 64 characters long.
-
#incoming_phone_numbers ⇒ incoming_phone_numbers
Access the incoming_phone_numbers.
-
#initialize(version, payload, sid: nil) ⇒ AccountInstance
constructor
Initialize the AccountInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#keys ⇒ keys
Access the keys.
-
#messages ⇒ messages
Access the messages.
-
#new_keys ⇒ new_keys
Access the new_keys.
-
#new_signing_keys ⇒ new_signing_keys
Access the new_signing_keys.
-
#notifications ⇒ notifications
Access the notifications.
-
#outgoing_caller_ids ⇒ outgoing_caller_ids
Access the outgoing_caller_ids.
-
#owner_account_sid ⇒ String
The unique 34 character id that represents the parent of this account.
-
#queues ⇒ queues
Access the queues.
-
#recordings ⇒ recordings
Access the recordings.
-
#short_codes ⇒ short_codes
Access the short_codes.
-
#sid ⇒ String
A 34 character string that uniquely identifies this resource.
-
#signing_keys ⇒ signing_keys
Access the signing_keys.
-
#sip ⇒ sip
Access the sip.
- #status ⇒ Status
-
#subresource_uris ⇒ Hash
A Map of various subresources available for the given Account Instance.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#tokens ⇒ tokens
Access the tokens.
-
#transcriptions ⇒ transcriptions
Access the transcriptions.
- #type ⇒ Type
-
#update(friendly_name: :unset, status: :unset) ⇒ AccountInstance
Update the AccountInstance.
-
#uri ⇒ String
The URI for this resource, relative to ‘api.twilio.com`.
-
#usage ⇒ usage
Access the usage.
-
#validation_requests ⇒ validation_requests
Access the validation_requests.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ AccountInstance
Initialize the AccountInstance
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 686 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
#addresses ⇒ addresses
Access the addresses
932 933 934 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 932 def addresses context.addresses end |
#applications ⇒ applications
Access the applications
855 856 857 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 855 def applications context.applications end |
#auth_token ⇒ String
Returns The authorization token for this account. This token should be kept a secret, so no sharing.
721 722 723 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 721 def auth_token @properties['auth_token'] end |
#authorized_connect_apps ⇒ authorized_connect_apps
Access the authorized_connect_apps
918 919 920 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 918 def context. end |
#available_phone_numbers ⇒ available_phone_numbers
Access the available_phone_numbers
925 926 927 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 925 def available_phone_numbers context.available_phone_numbers end |
#balance ⇒ balance
Access the balance
834 835 836 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 834 def balance context.balance end |
#calls ⇒ calls
Access the calls
876 877 878 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 876 def calls context.calls end |
#conferences ⇒ conferences
Access the conferences
946 947 948 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 946 def conferences context.conferences end |
#connect_apps ⇒ connect_apps
Access the connect_apps
869 870 871 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 869 def connect_apps context.connect_apps end |
#context ⇒ AccountContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
712 713 714 715 716 717 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 712 def context unless @instance_context @instance_context = AccountContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date that this account was created, in GMT in RFC 2822 format.
727 728 729 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 727 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this account was last updated, in GMT in RFC 2822 format.
733 734 735 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 733 def date_updated @properties['date_updated'] end |
#fetch ⇒ AccountInstance
Fetch the AccountInstance
782 783 784 785 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 782 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human readable description of this account, up to 64 characters long. By default the FriendlyName is your email address.
739 740 741 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 739 def friendly_name @properties['friendly_name'] end |
#incoming_phone_numbers ⇒ incoming_phone_numbers
Access the incoming_phone_numbers
904 905 906 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 904 def incoming_phone_numbers context.incoming_phone_numbers end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
980 981 982 983 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 980 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AccountInstance #{values}>" end |
#keys ⇒ keys
Access the keys
953 954 955 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 953 def keys context.keys end |
#messages ⇒ messages
Access the messages
967 968 969 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 967 def context. end |
#new_keys ⇒ new_keys
Access the new_keys
813 814 815 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 813 def new_keys context.new_keys end |
#new_signing_keys ⇒ new_signing_keys
Access the new_signing_keys
848 849 850 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 848 def new_signing_keys context.new_signing_keys end |
#notifications ⇒ notifications
Access the notifications
960 961 962 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 960 def notifications context.notifications end |
#outgoing_caller_ids ⇒ outgoing_caller_ids
Access the outgoing_caller_ids
890 891 892 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 890 def outgoing_caller_ids context.outgoing_caller_ids end |
#owner_account_sid ⇒ String
Returns The unique 34 character id that represents the parent of this account. The OwnerAccountSid of a parent account is it’s own sid.
745 746 747 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 745 def owner_account_sid @properties['owner_account_sid'] end |
#queues ⇒ queues
Access the queues
911 912 913 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 911 def queues context.queues end |
#recordings ⇒ recordings
Access the recordings
862 863 864 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 862 def recordings context.recordings end |
#short_codes ⇒ short_codes
Access the short_codes
897 898 899 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 897 def short_codes context.short_codes end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
751 752 753 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 751 def sid @properties['sid'] end |
#signing_keys ⇒ signing_keys
Access the signing_keys
883 884 885 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 883 def signing_keys context.signing_keys end |
#sip ⇒ sip
Access the sip
841 842 843 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 841 def sip context.sip end |
#status ⇒ Status
757 758 759 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 757 def status @properties['status'] end |
#subresource_uris ⇒ Hash
Returns A Map of various subresources available for the given Account Instance.
763 764 765 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 763 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
973 974 975 976 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 973 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AccountInstance #{values}>" end |
#tokens ⇒ tokens
Access the tokens
827 828 829 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 827 def tokens context.tokens end |
#transcriptions ⇒ transcriptions
Access the transcriptions
939 940 941 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 939 def transcriptions context.transcriptions end |
#type ⇒ Type
769 770 771 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 769 def type @properties['type'] end |
#update(friendly_name: :unset, status: :unset) ⇒ AccountInstance
Update the AccountInstance
792 793 794 795 796 797 798 799 800 801 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 792 def update( friendly_name: :unset, status: :unset ) context.update( friendly_name: friendly_name, status: status, ) end |
#uri ⇒ String
Returns The URI for this resource, relative to ‘api.twilio.com`.
775 776 777 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 775 def uri @properties['uri'] end |
#usage ⇒ usage
Access the usage
806 807 808 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 806 def usage context.usage end |
#validation_requests ⇒ validation_requests
Access the validation_requests
820 821 822 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 820 def validation_requests context.validation_requests end |