Class: Twilio::REST::Client
- Inherits:
-
ClientBase
- Object
- ClientBase
- Twilio::REST::Client
- Defined in:
- lib/twilio-ruby/rest/client.rb
Overview
A client for accessing the Twilio API.
Instance Attribute Summary
Attributes inherited from ClientBase
#account_sid, #auth_token, #edge, #http_client, #logger, #password, #region, #user_agent_extensions, #username
Instance Method Summary collapse
-
#accounts ⇒ Object
Access the Accounts Twilio Domain.
- #addresses(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AddressInstance, Twilio::REST::Api::V2010::AccountContext::AddressList
-
#api ⇒ Object
Access the Api Twilio Domain.
- #applications(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ApplicationInstance, Twilio::REST::Api::V2010::AccountContext::ApplicationList
- #authorized_connect_apps(connectAppSid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance, Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppList
-
#autopilot ⇒ Object
Access the Autopilot Twilio Domain.
- #available_phone_numbers(countryCode = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryInstance, Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryList
-
#bulkexports ⇒ Object
Access the Bulkexports Twilio Domain.
- #calls(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::CallInstance, Twilio::REST::Api::V2010::AccountContext::CallList
-
#chat ⇒ Object
Access the Chat Twilio Domain.
- #conferences(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ConferenceInstance, Twilio::REST::Api::V2010::AccountContext::ConferenceList
- #connect_apps(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance, Twilio::REST::Api::V2010::AccountContext::ConnectAppList
-
#content ⇒ Object
Access the Content Twilio Domain.
-
#conversations ⇒ Object
Access the Conversations Twilio Domain.
-
#events ⇒ Object
Access the Events Twilio Domain.
-
#flex_api ⇒ Object
Access the FlexApi Twilio Domain.
-
#frontline_api ⇒ Object
Access the FrontlineApi Twilio Domain.
- #incoming_phone_numbers(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberInstance, Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList
-
#insights ⇒ Object
Access the Insights Twilio Domain.
-
#intelligence ⇒ Object
Access the Intelligence Twilio Domain.
-
#ip_messaging ⇒ Object
Access the IpMessaging Twilio Domain.
- #keys(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::KeyInstance, Twilio::REST::Api::V2010::AccountContext::KeyList
-
#lookups ⇒ Object
Access the Lookups Twilio Domain.
-
#media ⇒ Object
Access the Media Twilio Domain.
- #messages(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::MessageInstance, Twilio::REST::Api::V2010::AccountContext::MessageList
-
#messaging ⇒ Object
Access the Messaging Twilio Domain.
-
#microvisor ⇒ Object
Access the Microvisor Twilio Domain.
-
#monitor ⇒ Object
Access the Monitor Twilio Domain.
- #notifications(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::NotificationInstance, Twilio::REST::Api::V2010::AccountContext::NotificationList
-
#notify ⇒ Object
Access the Notify Twilio Domain.
-
#numbers ⇒ Object
Access the Numbers Twilio Domain.
-
#oauth ⇒ Object
Access the Oauth Twilio Domain.
- #outgoing_caller_ids(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdInstance, Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdList
-
#preview ⇒ Object
Access the Preview Twilio Domain.
-
#pricing ⇒ Object
Access the Pricing Twilio Domain.
-
#proxy ⇒ Object
Access the Proxy Twilio Domain.
- #queues(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::QueueInstance, Twilio::REST::Api::V2010::AccountContext::QueueList
- #recordings(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::RecordingInstance, Twilio::REST::Api::V2010::AccountContext::RecordingList
-
#routes ⇒ Object
Access the Routes Twilio Domain.
-
#serverless ⇒ Object
Access the Serverless Twilio Domain.
- #short_codes(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ShortCodeInstance, Twilio::REST::Api::V2010::AccountContext::ShortCodeList
- #signing_keys(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::SigningKeyInstance, Twilio::REST::Api::V2010::AccountContext::SigningKeyList
-
#studio ⇒ Object
Access the Studio Twilio Domain.
-
#supersim ⇒ Object
Access the Supersim Twilio Domain.
-
#sync ⇒ Object
Access the Sync Twilio Domain.
-
#taskrouter ⇒ Object
Access the Taskrouter Twilio Domain.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #transcriptions(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::TranscriptionInstance, Twilio::REST::Api::V2010::AccountContext::TranscriptionList
-
#trunking ⇒ Object
Access the Trunking Twilio Domain.
-
#trusthub ⇒ Object
Access the Trusthub Twilio Domain.
-
#verify ⇒ Object
Access the Verify Twilio Domain.
-
#video ⇒ Object
Access the Video Twilio Domain.
-
#voice ⇒ Object
Access the Voice Twilio Domain.
-
#wireless ⇒ Object
Access the Wireless Twilio Domain.
Methods inherited from ClientBase
#build_uri, #generate_headers, #initialize, #request, #validate_ssl_certificate
Constructor Details
This class inherits a constructor from Twilio::REST::ClientBase
Instance Method Details
#accounts ⇒ Object
Access the Accounts Twilio Domain
21 22 23 |
# File 'lib/twilio-ruby/rest/client.rb', line 21 def accounts @accounts ||= Accounts.new self end |
#addresses(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AddressInstance, Twilio::REST::Api::V2010::AccountContext::AddressList
205 206 207 |
# File 'lib/twilio-ruby/rest/client.rb', line 205 def addresses(sid=:unset) self.api.v2010.account.addresses(sid) end |
#api ⇒ Object
Access the Api Twilio Domain
26 27 28 |
# File 'lib/twilio-ruby/rest/client.rb', line 26 def api @api ||= Api.new self end |
#applications(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ApplicationInstance, Twilio::REST::Api::V2010::AccountContext::ApplicationList
213 214 215 |
# File 'lib/twilio-ruby/rest/client.rb', line 213 def applications(sid=:unset) self.api.v2010.account.applications(sid) end |
#authorized_connect_apps(connectAppSid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance, Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppList
221 222 223 |
# File 'lib/twilio-ruby/rest/client.rb', line 221 def (connectAppSid=:unset) self.api.v2010.account.(connectAppSid) end |
#autopilot ⇒ Object
Access the Autopilot Twilio Domain
31 32 33 |
# File 'lib/twilio-ruby/rest/client.rb', line 31 def autopilot @autopilot ||= Autopilot.new self end |
#available_phone_numbers(countryCode = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryInstance, Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryList
229 230 231 |
# File 'lib/twilio-ruby/rest/client.rb', line 229 def available_phone_numbers(countryCode=:unset) self.api.v2010.account.available_phone_numbers(countryCode) end |
#bulkexports ⇒ Object
Access the Bulkexports Twilio Domain
36 37 38 |
# File 'lib/twilio-ruby/rest/client.rb', line 36 def bulkexports @bulkexports ||= Bulkexports.new self end |
#calls(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::CallInstance, Twilio::REST::Api::V2010::AccountContext::CallList
238 239 240 |
# File 'lib/twilio-ruby/rest/client.rb', line 238 def calls(sid=:unset) self.api.v2010.account.calls(sid) end |
#chat ⇒ Object
Access the Chat Twilio Domain
41 42 43 |
# File 'lib/twilio-ruby/rest/client.rb', line 41 def chat @chat ||= Chat.new self end |
#conferences(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ConferenceInstance, Twilio::REST::Api::V2010::AccountContext::ConferenceList
246 247 248 |
# File 'lib/twilio-ruby/rest/client.rb', line 246 def conferences(sid=:unset) self.api.v2010.account.conferences(sid) end |
#connect_apps(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance, Twilio::REST::Api::V2010::AccountContext::ConnectAppList
254 255 256 |
# File 'lib/twilio-ruby/rest/client.rb', line 254 def connect_apps(sid=:unset) self.api.v2010.account.connect_apps(sid) end |
#content ⇒ Object
Access the Content Twilio Domain
46 47 48 |
# File 'lib/twilio-ruby/rest/client.rb', line 46 def content @content ||= Content.new self end |
#conversations ⇒ Object
Access the Conversations Twilio Domain
51 52 53 |
# File 'lib/twilio-ruby/rest/client.rb', line 51 def conversations @conversations ||= Conversations.new self end |
#events ⇒ Object
Access the Events Twilio Domain
56 57 58 |
# File 'lib/twilio-ruby/rest/client.rb', line 56 def events @events ||= Events.new self end |
#flex_api ⇒ Object
Access the FlexApi Twilio Domain
61 62 63 |
# File 'lib/twilio-ruby/rest/client.rb', line 61 def flex_api @flex_api ||= FlexApi.new self end |
#frontline_api ⇒ Object
Access the FrontlineApi Twilio Domain
66 67 68 |
# File 'lib/twilio-ruby/rest/client.rb', line 66 def frontline_api @frontline_api ||= FrontlineApi.new self end |
#incoming_phone_numbers(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberInstance, Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList
262 263 264 |
# File 'lib/twilio-ruby/rest/client.rb', line 262 def incoming_phone_numbers(sid=:unset) self.api.v2010.account.incoming_phone_numbers(sid) end |
#insights ⇒ Object
Access the Insights Twilio Domain
71 72 73 |
# File 'lib/twilio-ruby/rest/client.rb', line 71 def insights @insights ||= Insights.new self end |
#intelligence ⇒ Object
Access the Intelligence Twilio Domain
76 77 78 |
# File 'lib/twilio-ruby/rest/client.rb', line 76 def intelligence @intelligence ||= Intelligence.new self end |
#ip_messaging ⇒ Object
Access the IpMessaging Twilio Domain
81 82 83 |
# File 'lib/twilio-ruby/rest/client.rb', line 81 def ip_messaging @ip_messaging ||= IpMessaging.new self end |
#keys(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::KeyInstance, Twilio::REST::Api::V2010::AccountContext::KeyList
270 271 272 |
# File 'lib/twilio-ruby/rest/client.rb', line 270 def keys(sid=:unset) self.api.v2010.account.keys(sid) end |
#lookups ⇒ Object
Access the Lookups Twilio Domain
86 87 88 |
# File 'lib/twilio-ruby/rest/client.rb', line 86 def lookups @lookups ||= Lookups.new self end |
#media ⇒ Object
Access the Media Twilio Domain
91 92 93 |
# File 'lib/twilio-ruby/rest/client.rb', line 91 def media @media ||= Media.new self end |
#messages(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::MessageInstance, Twilio::REST::Api::V2010::AccountContext::MessageList
278 279 280 |
# File 'lib/twilio-ruby/rest/client.rb', line 278 def (sid=:unset) self.api.v2010.account.(sid) end |
#messaging ⇒ Object
Access the Messaging Twilio Domain
96 97 98 |
# File 'lib/twilio-ruby/rest/client.rb', line 96 def messaging @messaging ||= Messaging.new self end |
#microvisor ⇒ Object
Access the Microvisor Twilio Domain
101 102 103 |
# File 'lib/twilio-ruby/rest/client.rb', line 101 def microvisor @microvisor ||= Microvisor.new self end |
#monitor ⇒ Object
Access the Monitor Twilio Domain
106 107 108 |
# File 'lib/twilio-ruby/rest/client.rb', line 106 def monitor @monitor ||= Monitor.new self end |
#notifications(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::NotificationInstance, Twilio::REST::Api::V2010::AccountContext::NotificationList
288 289 290 |
# File 'lib/twilio-ruby/rest/client.rb', line 288 def notifications(sid=:unset) self.api.v2010.account.notifications(sid) end |
#notify ⇒ Object
Access the Notify Twilio Domain
111 112 113 |
# File 'lib/twilio-ruby/rest/client.rb', line 111 def notify @notify ||= Notify.new self end |
#numbers ⇒ Object
Access the Numbers Twilio Domain
116 117 118 |
# File 'lib/twilio-ruby/rest/client.rb', line 116 def numbers @numbers ||= Numbers.new self end |
#oauth ⇒ Object
Access the Oauth Twilio Domain
121 122 123 |
# File 'lib/twilio-ruby/rest/client.rb', line 121 def oauth @oauth ||= Oauth.new self end |
#outgoing_caller_ids(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdInstance, Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdList
296 297 298 |
# File 'lib/twilio-ruby/rest/client.rb', line 296 def outgoing_caller_ids(sid=:unset) self.api.v2010.account.outgoing_caller_ids(sid) end |
#preview ⇒ Object
Access the Preview Twilio Domain
126 127 128 |
# File 'lib/twilio-ruby/rest/client.rb', line 126 def preview @preview ||= Preview.new self end |
#pricing ⇒ Object
Access the Pricing Twilio Domain
131 132 133 |
# File 'lib/twilio-ruby/rest/client.rb', line 131 def pricing @pricing ||= Pricing.new self end |
#proxy ⇒ Object
Access the Proxy Twilio Domain
136 137 138 |
# File 'lib/twilio-ruby/rest/client.rb', line 136 def proxy @proxy ||= Proxy.new self end |
#queues(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::QueueInstance, Twilio::REST::Api::V2010::AccountContext::QueueList
304 305 306 |
# File 'lib/twilio-ruby/rest/client.rb', line 304 def queues(sid=:unset) self.api.v2010.account.queues(sid) end |
#recordings(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::RecordingInstance, Twilio::REST::Api::V2010::AccountContext::RecordingList
312 313 314 |
# File 'lib/twilio-ruby/rest/client.rb', line 312 def recordings(sid=:unset) self.api.v2010.account.recordings(sid) end |
#routes ⇒ Object
Access the Routes Twilio Domain
141 142 143 |
# File 'lib/twilio-ruby/rest/client.rb', line 141 def routes @routes ||= Routes.new self end |
#serverless ⇒ Object
Access the Serverless Twilio Domain
146 147 148 |
# File 'lib/twilio-ruby/rest/client.rb', line 146 def serverless @serverless ||= Serverless.new self end |
#short_codes(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ShortCodeInstance, Twilio::REST::Api::V2010::AccountContext::ShortCodeList
320 321 322 |
# File 'lib/twilio-ruby/rest/client.rb', line 320 def short_codes(sid=:unset) self.api.v2010.account.short_codes(sid) end |
#signing_keys(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::SigningKeyInstance, Twilio::REST::Api::V2010::AccountContext::SigningKeyList
327 328 329 |
# File 'lib/twilio-ruby/rest/client.rb', line 327 def signing_keys(sid=:unset) self.api.v2010.account.signing_keys(sid) end |
#studio ⇒ Object
Access the Studio Twilio Domain
151 152 153 |
# File 'lib/twilio-ruby/rest/client.rb', line 151 def studio @studio ||= Studio.new self end |
#supersim ⇒ Object
Access the Supersim Twilio Domain
156 157 158 |
# File 'lib/twilio-ruby/rest/client.rb', line 156 def supersim @supersim ||= Supersim.new self end |
#sync ⇒ Object
Access the Sync Twilio Domain
161 162 163 |
# File 'lib/twilio-ruby/rest/client.rb', line 161 def sync @sync ||= Sync.new self end |
#taskrouter ⇒ Object
Access the Taskrouter Twilio Domain
166 167 168 |
# File 'lib/twilio-ruby/rest/client.rb', line 166 def taskrouter @taskrouter ||= Taskrouter.new self end |
#to_s ⇒ Object
Provide a user friendly representation
345 346 347 |
# File 'lib/twilio-ruby/rest/client.rb', line 345 def to_s "#<Twilio::REST::Client #{@account_sid}>" end |
#transcriptions(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::TranscriptionInstance, Twilio::REST::Api::V2010::AccountContext::TranscriptionList
337 338 339 |
# File 'lib/twilio-ruby/rest/client.rb', line 337 def transcriptions(sid=:unset) self.api.v2010.account.transcriptions(sid) end |
#trunking ⇒ Object
Access the Trunking Twilio Domain
171 172 173 |
# File 'lib/twilio-ruby/rest/client.rb', line 171 def trunking @trunking ||= Trunking.new self end |
#trusthub ⇒ Object
Access the Trusthub Twilio Domain
176 177 178 |
# File 'lib/twilio-ruby/rest/client.rb', line 176 def trusthub @trusthub ||= Trusthub.new self end |
#verify ⇒ Object
Access the Verify Twilio Domain
181 182 183 |
# File 'lib/twilio-ruby/rest/client.rb', line 181 def verify @verify ||= Verify.new self end |
#video ⇒ Object
Access the Video Twilio Domain
186 187 188 |
# File 'lib/twilio-ruby/rest/client.rb', line 186 def video @video ||= Video.new self end |