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.
-
#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 this account was created.
-
#date_updated ⇒ Time
The date this account was last updated.
-
#fetch ⇒ AccountInstance
Fetch a AccountInstance.
-
#friendly_name ⇒ String
A human readable description of this account.
-
#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 representing 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 ⇒ account.Status
The status of this account.
-
#subresource_uris ⇒ String
Account Instance Subresources.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#tokens ⇒ tokens
Access the tokens.
-
#transcriptions ⇒ transcriptions
Access the transcriptions.
-
#type ⇒ account.Type
The type of this account.
-
#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
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 647 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
761 762 763 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 761 def addresses context.addresses end |
#applications ⇒ applications
Access the applications
768 769 770 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 768 def applications context.applications end |
#auth_token ⇒ String
Returns The authorization token for this account.
682 683 684 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 682 def auth_token @properties['auth_token'] end |
#authorized_connect_apps ⇒ authorized_connect_apps
Access the authorized_connect_apps
775 776 777 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 775 def context. end |
#available_phone_numbers ⇒ available_phone_numbers
Access the available_phone_numbers
782 783 784 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 782 def available_phone_numbers context.available_phone_numbers end |
#calls ⇒ calls
Access the calls
789 790 791 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 789 def calls context.calls end |
#conferences ⇒ conferences
Access the conferences
796 797 798 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 796 def conferences context.conferences end |
#connect_apps ⇒ connect_apps
Access the connect_apps
803 804 805 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 803 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
673 674 675 676 677 678 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 673 def context unless @instance_context @instance_context = AccountContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date this account was created.
688 689 690 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 688 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this account was last updated.
694 695 696 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 694 def date_updated @properties['date_updated'] end |
#fetch ⇒ AccountInstance
Fetch a AccountInstance
743 744 745 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 743 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human readable description of this account.
700 701 702 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 700 def friendly_name @properties['friendly_name'] end |
#incoming_phone_numbers ⇒ incoming_phone_numbers
Access the incoming_phone_numbers
810 811 812 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 810 def incoming_phone_numbers context.incoming_phone_numbers end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
928 929 930 931 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 928 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AccountInstance #{values}>" end |
#keys ⇒ keys
Access the keys
817 818 819 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 817 def keys context.keys end |
#messages ⇒ messages
Access the messages
824 825 826 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 824 def context. end |
#new_keys ⇒ new_keys
Access the new_keys
831 832 833 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 831 def new_keys context.new_keys end |
#new_signing_keys ⇒ new_signing_keys
Access the new_signing_keys
838 839 840 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 838 def new_signing_keys context.new_signing_keys end |
#notifications ⇒ notifications
Access the notifications
845 846 847 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 845 def notifications context.notifications end |
#outgoing_caller_ids ⇒ outgoing_caller_ids
Access the outgoing_caller_ids
852 853 854 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 852 def outgoing_caller_ids context.outgoing_caller_ids end |
#owner_account_sid ⇒ String
Returns The unique 34 character id representing the parent of this account.
706 707 708 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 706 def owner_account_sid @properties['owner_account_sid'] end |
#queues ⇒ queues
Access the queues
859 860 861 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 859 def queues context.queues end |
#recordings ⇒ recordings
Access the recordings
866 867 868 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 866 def recordings context.recordings end |
#short_codes ⇒ short_codes
Access the short_codes
887 888 889 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 887 def short_codes context.short_codes end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
712 713 714 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 712 def sid @properties['sid'] end |
#signing_keys ⇒ signing_keys
Access the signing_keys
873 874 875 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 873 def signing_keys context.signing_keys end |
#sip ⇒ sip
Access the sip
880 881 882 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 880 def sip context.sip end |
#status ⇒ account.Status
Returns The status of this account.
718 719 720 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 718 def status @properties['status'] end |
#subresource_uris ⇒ String
Returns Account Instance Subresources.
724 725 726 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 724 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
921 922 923 924 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 921 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AccountInstance #{values}>" end |
#tokens ⇒ tokens
Access the tokens
894 895 896 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 894 def tokens context.tokens end |
#transcriptions ⇒ transcriptions
Access the transcriptions
901 902 903 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 901 def transcriptions context.transcriptions end |
#type ⇒ account.Type
Returns The type of this account.
730 731 732 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 730 def type @properties['type'] end |
#update(friendly_name: :unset, status: :unset) ⇒ AccountInstance
Update the AccountInstance
754 755 756 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 754 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`.
736 737 738 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 736 def uri @properties['uri'] end |
#usage ⇒ usage
Access the usage
908 909 910 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 908 def usage context.usage end |
#validation_requests ⇒ validation_requests
Access the validation_requests
915 916 917 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 915 def validation_requests context.validation_requests end |