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
943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 943 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
1190 1191 1192 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1190 def addresses context.addresses end |
#applications ⇒ applications
Access the applications
1113 1114 1115 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1113 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.
979 980 981 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 979 def auth_token @properties['auth_token'] end |
#authorized_connect_apps ⇒ authorized_connect_apps
Access the authorized_connect_apps
1176 1177 1178 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1176 def context. end |
#available_phone_numbers ⇒ available_phone_numbers
Access the available_phone_numbers
1183 1184 1185 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1183 def available_phone_numbers context.available_phone_numbers end |
#balance ⇒ balance
Access the balance
1092 1093 1094 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1092 def balance context.balance end |
#calls ⇒ calls
Access the calls
1134 1135 1136 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1134 def calls context.calls end |
#conferences ⇒ conferences
Access the conferences
1204 1205 1206 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1204 def conferences context.conferences end |
#connect_apps ⇒ connect_apps
Access the connect_apps
1127 1128 1129 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1127 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
970 971 972 973 974 975 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 970 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.
985 986 987 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 985 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.
991 992 993 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 991 def date_updated @properties['date_updated'] end |
#fetch ⇒ AccountInstance
Fetch the AccountInstance
1040 1041 1042 1043 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1040 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.
997 998 999 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 997 def friendly_name @properties['friendly_name'] end |
#incoming_phone_numbers ⇒ incoming_phone_numbers
Access the incoming_phone_numbers
1162 1163 1164 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1162 def incoming_phone_numbers context.incoming_phone_numbers end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
1238 1239 1240 1241 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1238 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AccountInstance #{values}>" end |
#keys ⇒ keys
Access the keys
1211 1212 1213 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1211 def keys context.keys end |
#messages ⇒ messages
Access the messages
1225 1226 1227 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1225 def context. end |
#new_keys ⇒ new_keys
Access the new_keys
1071 1072 1073 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1071 def new_keys context.new_keys end |
#new_signing_keys ⇒ new_signing_keys
Access the new_signing_keys
1106 1107 1108 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1106 def new_signing_keys context.new_signing_keys end |
#notifications ⇒ notifications
Access the notifications
1218 1219 1220 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1218 def notifications context.notifications end |
#outgoing_caller_ids ⇒ outgoing_caller_ids
Access the outgoing_caller_ids
1148 1149 1150 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1148 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.
1003 1004 1005 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1003 def owner_account_sid @properties['owner_account_sid'] end |
#queues ⇒ queues
Access the queues
1169 1170 1171 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1169 def queues context.queues end |
#recordings ⇒ recordings
Access the recordings
1120 1121 1122 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1120 def recordings context.recordings end |
#short_codes ⇒ short_codes
Access the short_codes
1155 1156 1157 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1155 def short_codes context.short_codes end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
1009 1010 1011 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1009 def sid @properties['sid'] end |
#signing_keys ⇒ signing_keys
Access the signing_keys
1141 1142 1143 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1141 def signing_keys context.signing_keys end |
#sip ⇒ sip
Access the sip
1099 1100 1101 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1099 def sip context.sip end |
#status ⇒ Status
1015 1016 1017 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1015 def status @properties['status'] end |
#subresource_uris ⇒ Hash
Returns A Map of various subresources available for the given Account Instance.
1021 1022 1023 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1021 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
1231 1232 1233 1234 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1231 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AccountInstance #{values}>" end |
#tokens ⇒ tokens
Access the tokens
1085 1086 1087 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1085 def tokens context.tokens end |
#transcriptions ⇒ transcriptions
Access the transcriptions
1197 1198 1199 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1197 def transcriptions context.transcriptions end |
#type ⇒ Type
1027 1028 1029 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1027 def type @properties['type'] end |
#update(friendly_name: :unset, status: :unset) ⇒ AccountInstance
Update the AccountInstance
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1050 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`.
1033 1034 1035 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1033 def uri @properties['uri'] end |
#usage ⇒ usage
Access the usage
1064 1065 1066 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1064 def usage context.usage end |
#validation_requests ⇒ validation_requests
Access the validation_requests
1078 1079 1080 |
# File 'lib/twilio-ruby/rest/api/v2010/account.rb', line 1078 def validation_requests context.validation_requests end |