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, #credentials, #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
-
#assistants ⇒ Object
Access the Assistants Twilio Domain.
- #authorized_connect_apps(connectAppSid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance, Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppList
- #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.
-
#iam ⇒ Object
Access the Iam 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.
-
#marketplace ⇒ Object
Access the Marketplace 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.
-
#preview_iam ⇒ Object
Access the PreviewIam 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, #credential_provider, #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
215 216 217 |
# File 'lib/twilio-ruby/rest/client.rb', line 215 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
223 224 225 |
# File 'lib/twilio-ruby/rest/client.rb', line 223 def applications(sid=:unset) self.api.v2010.account.applications(sid) end |
#assistants ⇒ Object
Access the Assistants Twilio Domain
31 32 33 |
# File 'lib/twilio-ruby/rest/client.rb', line 31 def assistants @assistants ||= Assistants.new self end |
#authorized_connect_apps(connectAppSid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance, Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppList
231 232 233 |
# File 'lib/twilio-ruby/rest/client.rb', line 231 def (connectAppSid=:unset) self.api.v2010.account.(connectAppSid) end |
#available_phone_numbers(countryCode = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryInstance, Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryList
239 240 241 |
# File 'lib/twilio-ruby/rest/client.rb', line 239 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
248 249 250 |
# File 'lib/twilio-ruby/rest/client.rb', line 248 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
256 257 258 |
# File 'lib/twilio-ruby/rest/client.rb', line 256 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
264 265 266 |
# File 'lib/twilio-ruby/rest/client.rb', line 264 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 |
#iam ⇒ Object
Access the Iam Twilio Domain
76 77 78 |
# File 'lib/twilio-ruby/rest/client.rb', line 76 def iam @iam ||= Iam.new self end |
#incoming_phone_numbers(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberInstance, Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList
272 273 274 |
# File 'lib/twilio-ruby/rest/client.rb', line 272 def incoming_phone_numbers(sid=:unset) self.api.v2010.account.incoming_phone_numbers(sid) end |
#insights ⇒ Object
Access the Insights Twilio Domain
81 82 83 |
# File 'lib/twilio-ruby/rest/client.rb', line 81 def insights @insights ||= Insights.new self end |
#intelligence ⇒ Object
Access the Intelligence Twilio Domain
86 87 88 |
# File 'lib/twilio-ruby/rest/client.rb', line 86 def intelligence @intelligence ||= Intelligence.new self end |
#ip_messaging ⇒ Object
Access the IpMessaging Twilio Domain
91 92 93 |
# File 'lib/twilio-ruby/rest/client.rb', line 91 def ip_messaging @ip_messaging ||= IpMessaging.new self end |
#keys(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::KeyInstance, Twilio::REST::Api::V2010::AccountContext::KeyList
280 281 282 |
# File 'lib/twilio-ruby/rest/client.rb', line 280 def keys(sid=:unset) self.api.v2010.account.keys(sid) end |
#lookups ⇒ Object
Access the Lookups Twilio Domain
96 97 98 |
# File 'lib/twilio-ruby/rest/client.rb', line 96 def lookups @lookups ||= Lookups.new self end |
#marketplace ⇒ Object
Access the Marketplace Twilio Domain
101 102 103 |
# File 'lib/twilio-ruby/rest/client.rb', line 101 def marketplace @marketplace ||= Marketplace.new self end |
#messages(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::MessageInstance, Twilio::REST::Api::V2010::AccountContext::MessageList
288 289 290 |
# File 'lib/twilio-ruby/rest/client.rb', line 288 def (sid=:unset) self.api.v2010.account.(sid) end |
#messaging ⇒ Object
Access the Messaging Twilio Domain
106 107 108 |
# File 'lib/twilio-ruby/rest/client.rb', line 106 def messaging @messaging ||= Messaging.new self end |
#microvisor ⇒ Object
Access the Microvisor Twilio Domain
111 112 113 |
# File 'lib/twilio-ruby/rest/client.rb', line 111 def microvisor @microvisor ||= Microvisor.new self end |
#monitor ⇒ Object
Access the Monitor Twilio Domain
116 117 118 |
# File 'lib/twilio-ruby/rest/client.rb', line 116 def monitor @monitor ||= Monitor.new self end |
#notifications(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::NotificationInstance, Twilio::REST::Api::V2010::AccountContext::NotificationList
298 299 300 |
# File 'lib/twilio-ruby/rest/client.rb', line 298 def notifications(sid=:unset) self.api.v2010.account.notifications(sid) end |
#notify ⇒ Object
Access the Notify Twilio Domain
121 122 123 |
# File 'lib/twilio-ruby/rest/client.rb', line 121 def notify @notify ||= Notify.new self end |
#numbers ⇒ Object
Access the Numbers Twilio Domain
126 127 128 |
# File 'lib/twilio-ruby/rest/client.rb', line 126 def numbers @numbers ||= Numbers.new self end |
#oauth ⇒ Object
Access the Oauth Twilio Domain
131 132 133 |
# File 'lib/twilio-ruby/rest/client.rb', line 131 def oauth @oauth ||= Oauth.new self end |
#outgoing_caller_ids(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdInstance, Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdList
306 307 308 |
# File 'lib/twilio-ruby/rest/client.rb', line 306 def outgoing_caller_ids(sid=:unset) self.api.v2010.account.outgoing_caller_ids(sid) end |
#preview ⇒ Object
Access the Preview Twilio Domain
136 137 138 |
# File 'lib/twilio-ruby/rest/client.rb', line 136 def preview @preview ||= Preview.new self end |
#preview_iam ⇒ Object
Access the PreviewIam Twilio Domain
71 72 73 |
# File 'lib/twilio-ruby/rest/client.rb', line 71 def preview_iam @preview_iam ||= PreviewIam.new self end |
#pricing ⇒ Object
Access the Pricing Twilio Domain
141 142 143 |
# File 'lib/twilio-ruby/rest/client.rb', line 141 def pricing @pricing ||= Pricing.new self end |
#proxy ⇒ Object
Access the Proxy Twilio Domain
146 147 148 |
# File 'lib/twilio-ruby/rest/client.rb', line 146 def proxy @proxy ||= Proxy.new self end |
#queues(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::QueueInstance, Twilio::REST::Api::V2010::AccountContext::QueueList
314 315 316 |
# File 'lib/twilio-ruby/rest/client.rb', line 314 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
322 323 324 |
# File 'lib/twilio-ruby/rest/client.rb', line 322 def recordings(sid=:unset) self.api.v2010.account.recordings(sid) end |
#routes ⇒ Object
Access the Routes Twilio Domain
151 152 153 |
# File 'lib/twilio-ruby/rest/client.rb', line 151 def routes @routes ||= Routes.new self end |
#serverless ⇒ Object
Access the Serverless Twilio Domain
156 157 158 |
# File 'lib/twilio-ruby/rest/client.rb', line 156 def serverless @serverless ||= Serverless.new self end |
#short_codes(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ShortCodeInstance, Twilio::REST::Api::V2010::AccountContext::ShortCodeList
330 331 332 |
# File 'lib/twilio-ruby/rest/client.rb', line 330 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
337 338 339 |
# File 'lib/twilio-ruby/rest/client.rb', line 337 def signing_keys(sid=:unset) self.api.v2010.account.signing_keys(sid) end |
#studio ⇒ Object
Access the Studio Twilio Domain
161 162 163 |
# File 'lib/twilio-ruby/rest/client.rb', line 161 def studio @studio ||= Studio.new self end |
#supersim ⇒ Object
Access the Supersim Twilio Domain
166 167 168 |
# File 'lib/twilio-ruby/rest/client.rb', line 166 def supersim @supersim ||= Supersim.new self end |
#sync ⇒ Object
Access the Sync Twilio Domain
171 172 173 |
# File 'lib/twilio-ruby/rest/client.rb', line 171 def sync @sync ||= Sync.new self end |
#taskrouter ⇒ Object
Access the Taskrouter Twilio Domain
176 177 178 |
# File 'lib/twilio-ruby/rest/client.rb', line 176 def taskrouter @taskrouter ||= Taskrouter.new self end |
#to_s ⇒ Object
Provide a user friendly representation
355 356 357 |
# File 'lib/twilio-ruby/rest/client.rb', line 355 def to_s "#<Twilio::REST::Client #{@account_sid}>" end |
#transcriptions(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::TranscriptionInstance, Twilio::REST::Api::V2010::AccountContext::TranscriptionList
347 348 349 |
# File 'lib/twilio-ruby/rest/client.rb', line 347 def transcriptions(sid=:unset) self.api.v2010.account.transcriptions(sid) end |
#trunking ⇒ Object
Access the Trunking Twilio Domain
181 182 183 |
# File 'lib/twilio-ruby/rest/client.rb', line 181 def trunking @trunking ||= Trunking.new self end |
#trusthub ⇒ Object
Access the Trusthub Twilio Domain
186 187 188 |
# File 'lib/twilio-ruby/rest/client.rb', line 186 def trusthub @trusthub ||= Trusthub.new self end |
#verify ⇒ Object
Access the Verify Twilio Domain
191 192 193 |
# File 'lib/twilio-ruby/rest/client.rb', line 191 def verify @verify ||= Verify.new self end |
#video ⇒ Object
Access the Video Twilio Domain
196 197 198 |
# File 'lib/twilio-ruby/rest/client.rb', line 196 def video @video ||= Video.new self end |