class Twilio::REST::Api

Public Class Methods

new(twilio) click to toggle source

Initialize the Api Domain

Calls superclass method Twilio::REST::Domain::new
   # File lib/twilio-ruby/rest/api.rb
14 def initialize(twilio)
15   super
16 
17   @base_url = 'https://api.twilio.com'
18   @host = 'api.twilio.com'
19   @port = 443
20 
21   # Versions
22   @v2010 = nil
23 end

Public Instance Methods

account() click to toggle source

Account provided as the authenticating account

   # File lib/twilio-ruby/rest/api.rb
33 def account
34   self.v2010.account
35 end
accounts(sid=:unset) click to toggle source

@param [String] sid A 34 character string that uniquely identifies this

resource.

@return [Twilio::REST::Api::V2010::AccountInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountList]

   # File lib/twilio-ruby/rest/api.rb
42 def accounts(sid=:unset)
43   self.v2010.accounts(sid)
44 end
addresses(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the

Address resource.

@return [Twilio::REST::Api::V2010::AccountContext::AddressInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::AddressList]

   # File lib/twilio-ruby/rest/api.rb
51 def addresses(sid=:unset)
52   self.account.addresses(sid)
53 end
applications(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the

Application resource.

@return [Twilio::REST::Api::V2010::AccountContext::ApplicationInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::ApplicationList]

   # File lib/twilio-ruby/rest/api.rb
60 def applications(sid=:unset)
61   self.account.applications(sid)
62 end
authorized_connect_apps(connect_app_sid=:unset) click to toggle source

@param [String] connect_app_sid The SID that we assigned to the Connect App. @return [Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance] if connect_app_sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppList]

   # File lib/twilio-ruby/rest/api.rb
68 def authorized_connect_apps(connect_app_sid=:unset)
69   self.account.authorized_connect_apps(connect_app_sid)
70 end
available_phone_numbers(country_code=:unset) click to toggle source

@param [String] country_code The

{ISO-3166-1}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] country code of
the country.

@return [Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryInstance] if country_code was passed. @return [Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryList]

   # File lib/twilio-ruby/rest/api.rb
78 def available_phone_numbers(country_code=:unset)
79   self.account.available_phone_numbers(country_code)
80 end
balance() click to toggle source

@return [Twilio::REST::Api::V2010::AccountContext::BalanceInstance]

   # File lib/twilio-ruby/rest/api.rb
84 def balance
85   self.account.balance()
86 end
calls(sid=:unset) click to toggle source

@param [String] sid The unique string that we created to identify this Call

resource.

@return [Twilio::REST::Api::V2010::AccountContext::CallInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::CallList]

   # File lib/twilio-ruby/rest/api.rb
93 def calls(sid=:unset)
94   self.account.calls(sid)
95 end
conferences(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify this

Conference resource.

@return [Twilio::REST::Api::V2010::AccountContext::ConferenceInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::ConferenceList]

    # File lib/twilio-ruby/rest/api.rb
102 def conferences(sid=:unset)
103   self.account.conferences(sid)
104 end
connect_apps(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the

ConnectApp resource.

@return [Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::ConnectAppList]

    # File lib/twilio-ruby/rest/api.rb
111 def connect_apps(sid=:unset)
112   self.account.connect_apps(sid)
113 end
incoming_phone_numbers(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify this

IncomingPhoneNumber resource.

@return [Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList]

    # File lib/twilio-ruby/rest/api.rb
120 def incoming_phone_numbers(sid=:unset)
121   self.account.incoming_phone_numbers(sid)
122 end
keys(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the Key

resource.

@return [Twilio::REST::Api::V2010::AccountContext::KeyInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::KeyList]

    # File lib/twilio-ruby/rest/api.rb
129 def keys(sid=:unset)
130   self.account.keys(sid)
131 end
messages(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the

Message resource.

@return [Twilio::REST::Api::V2010::AccountContext::MessageInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::MessageList]

    # File lib/twilio-ruby/rest/api.rb
138 def messages(sid=:unset)
139   self.account.messages(sid)
140 end
new_keys() click to toggle source

@return [Twilio::REST::Api::V2010::AccountContext::NewKeyInstance]

    # File lib/twilio-ruby/rest/api.rb
144 def new_keys
145   self.account.new_keys()
146 end
new_signing_keys() click to toggle source

@return [Twilio::REST::Api::V2010::AccountContext::NewSigningKeyInstance]

    # File lib/twilio-ruby/rest/api.rb
150 def new_signing_keys
151   self.account.new_signing_keys()
152 end
notifications(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the

Notification resource.

@return [Twilio::REST::Api::V2010::AccountContext::NotificationInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::NotificationList]

    # File lib/twilio-ruby/rest/api.rb
159 def notifications(sid=:unset)
160   self.account.notifications(sid)
161 end
outgoing_caller_ids(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the

OutgoingCallerId resource.

@return [Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdList]

    # File lib/twilio-ruby/rest/api.rb
168 def outgoing_caller_ids(sid=:unset)
169   self.account.outgoing_caller_ids(sid)
170 end
queues(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify this

Queue resource.

@return [Twilio::REST::Api::V2010::AccountContext::QueueInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::QueueList]

    # File lib/twilio-ruby/rest/api.rb
177 def queues(sid=:unset)
178   self.account.queues(sid)
179 end
recordings(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the

Recording resource.

@return [Twilio::REST::Api::V2010::AccountContext::RecordingInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::RecordingList]

    # File lib/twilio-ruby/rest/api.rb
186 def recordings(sid=:unset)
187   self.account.recordings(sid)
188 end
short_codes(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify this

ShortCode resource.

@return [Twilio::REST::Api::V2010::AccountContext::ShortCodeInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::ShortCodeList]

    # File lib/twilio-ruby/rest/api.rb
209 def short_codes(sid=:unset)
210   self.account.short_codes(sid)
211 end
signing_keys(sid=:unset) click to toggle source

@param [String] sid The sid @return [Twilio::REST::Api::V2010::AccountContext::SigningKeyInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::SigningKeyList]

    # File lib/twilio-ruby/rest/api.rb
194 def signing_keys(sid=:unset)
195   self.account.signing_keys(sid)
196 end
sip() click to toggle source

@return [Twilio::REST::Api::V2010::AccountContext::SipInstance]

    # File lib/twilio-ruby/rest/api.rb
200 def sip
201   self.account.sip()
202 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api.rb
242 def to_s
243   '#<Twilio::REST::Api>'
244 end
tokens() click to toggle source

@return [Twilio::REST::Api::V2010::AccountContext::TokenInstance]

    # File lib/twilio-ruby/rest/api.rb
215 def tokens
216   self.account.tokens()
217 end
transcriptions(sid=:unset) click to toggle source

@param [String] sid The unique string that that we created to identify the

Transcription resource.

@return [Twilio::REST::Api::V2010::AccountContext::TranscriptionInstance] if sid was passed. @return [Twilio::REST::Api::V2010::AccountContext::TranscriptionList]

    # File lib/twilio-ruby/rest/api.rb
224 def transcriptions(sid=:unset)
225   self.account.transcriptions(sid)
226 end
usage() click to toggle source

@return [Twilio::REST::Api::V2010::AccountContext::UsageInstance]

    # File lib/twilio-ruby/rest/api.rb
230 def usage
231   self.account.usage()
232 end
v2010() click to toggle source

Version v2010 of api

   # File lib/twilio-ruby/rest/api.rb
27 def v2010
28   @v2010 ||= V2010.new self
29 end
validation_requests() click to toggle source

@return [Twilio::REST::Api::V2010::AccountContext::ValidationRequestInstance]

    # File lib/twilio-ruby/rest/api.rb
236 def validation_requests
237   self.account.validation_requests()
238 end