class Twilio::REST::Api
Public Class Methods
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 provided as the authenticating account
# File lib/twilio-ruby/rest/api.rb 33 def account 34 self.v2010.account 35 end
@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
@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
@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
@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
@return [Twilio::REST::Api::V2010::AccountContext::BalanceInstance]
# File lib/twilio-ruby/rest/api.rb 84 def balance 85 self.account.balance() 86 end
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@return [Twilio::REST::Api::V2010::AccountContext::SipInstance]
# File lib/twilio-ruby/rest/api.rb 200 def sip 201 self.account.sip() 202 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/api.rb 242 def to_s 243 '#<Twilio::REST::Api>' 244 end
@return [Twilio::REST::Api::V2010::AccountContext::TokenInstance]
# File lib/twilio-ruby/rest/api.rb 215 def tokens 216 self.account.tokens() 217 end
@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
@return [Twilio::REST::Api::V2010::AccountContext::UsageInstance]
# File lib/twilio-ruby/rest/api.rb 230 def usage 231 self.account.usage() 232 end
Version
v2010 of api
# File lib/twilio-ruby/rest/api.rb 27 def v2010 28 @v2010 ||= V2010.new self 29 end
@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