Class: Twilio::REST::Api

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api.rb,
lib/twilio-ruby/rest/api/v2010.rb,
lib/twilio-ruby/rest/api/v2010/account.rb,
lib/twilio-ruby/rest/api/v2010/account/key.rb,
lib/twilio-ruby/rest/api/v2010/account/sip.rb,
lib/twilio-ruby/rest/api/v2010/account/call.rb,
lib/twilio-ruby/rest/api/v2010/account/queue.rb,
lib/twilio-ruby/rest/api/v2010/account/token.rb,
lib/twilio-ruby/rest/api/v2010/account/usage.rb,
lib/twilio-ruby/rest/api/v2010/account/address.rb,
lib/twilio-ruby/rest/api/v2010/account/balance.rb,
lib/twilio-ruby/rest/api/v2010/account/message.rb,
lib/twilio-ruby/rest/api/v2010/account/new_key.rb,
lib/twilio-ruby/rest/api/v2010/account/recording.rb,
lib/twilio-ruby/rest/api/v2010/account/call/event.rb,
lib/twilio-ruby/rest/api/v2010/account/conference.rb,
lib/twilio-ruby/rest/api/v2010/account/short_code.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb,
lib/twilio-ruby/rest/api/v2010/account/application.rb,
lib/twilio-ruby/rest/api/v2010/account/connect_app.rb,
lib/twilio-ruby/rest/api/v2010/account/signing_key.rb,
lib/twilio-ruby/rest/api/v2010/account/call/payment.rb,
lib/twilio-ruby/rest/api/v2010/account/notification.rb,
lib/twilio-ruby/rest/api/v2010/account/queue/member.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record.rb,
lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb,
lib/twilio-ruby/rest/api/v2010/account/message/media.rb,
lib/twilio-ruby/rest/api/v2010/account/transcription.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb,
lib/twilio-ruby/rest/api/v2010/account/call/recording.rb,
lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb,
lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb,
lib/twilio-ruby/rest/api/v2010/account/call/notification.rb,
lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb,
lib/twilio-ruby/rest/api/v2010/account/validation_request.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb,
lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb,
lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb,
lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb,
lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb,
lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb,
lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb,
lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb,
lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb,
lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb,
lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb,
lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb,
lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb,
lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb,
lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb,
lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb,
lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb,
lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb,
lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb,
lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb,
lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb

Defined Under Namespace

Classes: V2010

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Api

Initialize the Api Domain


14
15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/api.rb', line 14

def initialize(twilio)
  super

  @base_url = 'https://api.twilio.com'
  @host = 'api.twilio.com'
  @port = 443

  # Versions
  @v2010 = nil
end

Instance Method Details

#accountObject

Account provided as the authenticating account


33
34
35
# File 'lib/twilio-ruby/rest/api.rb', line 33

def 
  self.v2010.
end

#accounts(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountInstance, Twilio::REST::Api::V2010::AccountList

Parameters:

  • sid (String) (defaults to: :unset)

    A 34 character string that uniquely identifies this resource.

Returns:


42
43
44
# File 'lib/twilio-ruby/rest/api.rb', line 42

def accounts(sid=:unset)
  self.v2010.accounts(sid)
end

#addresses(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AddressInstance, Twilio::REST::Api::V2010::AccountContext::AddressList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the Address resource.

Returns:


51
52
53
# File 'lib/twilio-ruby/rest/api.rb', line 51

def addresses(sid=:unset)
  self..addresses(sid)
end

#applications(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ApplicationInstance, Twilio::REST::Api::V2010::AccountContext::ApplicationList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the Application resource.

Returns:


60
61
62
# File 'lib/twilio-ruby/rest/api.rb', line 60

def applications(sid=:unset)
  self..applications(sid)
end

#authorized_connect_apps(connect_app_sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppInstance, Twilio::REST::Api::V2010::AccountContext::AuthorizedConnectAppList

Parameters:

  • connect_app_sid (String) (defaults to: :unset)

    The SID that we assigned to the Connect App.

Returns:


68
69
70
# File 'lib/twilio-ruby/rest/api.rb', line 68

def authorized_connect_apps(connect_app_sid=:unset)
  self..authorized_connect_apps(connect_app_sid)
end

#available_phone_numbers(country_code = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryInstance, Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryList

Parameters:

  • country_code (String) (defaults to: :unset)

    The ISO-3166-1 country code of the country.

Returns:


78
79
80
# File 'lib/twilio-ruby/rest/api.rb', line 78

def available_phone_numbers(country_code=:unset)
  self..available_phone_numbers(country_code)
end

#balanceTwilio::REST::Api::V2010::AccountContext::BalanceInstance


84
85
86
# File 'lib/twilio-ruby/rest/api.rb', line 84

def balance
  self..balance()
end

#calls(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::CallInstance, Twilio::REST::Api::V2010::AccountContext::CallList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that we created to identify this Call resource.

Returns:


93
94
95
# File 'lib/twilio-ruby/rest/api.rb', line 93

def calls(sid=:unset)
  self..calls(sid)
end

#conferences(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ConferenceInstance, Twilio::REST::Api::V2010::AccountContext::ConferenceList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify this Conference resource.

Returns:


102
103
104
# File 'lib/twilio-ruby/rest/api.rb', line 102

def conferences(sid=:unset)
  self..conferences(sid)
end

#connect_apps(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ConnectAppInstance, Twilio::REST::Api::V2010::AccountContext::ConnectAppList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the ConnectApp resource.

Returns:


111
112
113
# File 'lib/twilio-ruby/rest/api.rb', line 111

def connect_apps(sid=:unset)
  self..connect_apps(sid)
end

#incoming_phone_numbers(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberInstance, Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify this IncomingPhoneNumber resource.

Returns:


120
121
122
# File 'lib/twilio-ruby/rest/api.rb', line 120

def incoming_phone_numbers(sid=:unset)
  self..incoming_phone_numbers(sid)
end

#keys(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::KeyInstance, Twilio::REST::Api::V2010::AccountContext::KeyList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the Key resource.

Returns:


129
130
131
# File 'lib/twilio-ruby/rest/api.rb', line 129

def keys(sid=:unset)
  self..keys(sid)
end

#messages(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::MessageInstance, Twilio::REST::Api::V2010::AccountContext::MessageList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the Message resource.

Returns:


138
139
140
# File 'lib/twilio-ruby/rest/api.rb', line 138

def messages(sid=:unset)
  self..messages(sid)
end

#new_keysTwilio::REST::Api::V2010::AccountContext::NewKeyInstance


144
145
146
# File 'lib/twilio-ruby/rest/api.rb', line 144

def new_keys
  self..new_keys()
end

#new_signing_keysTwilio::REST::Api::V2010::AccountContext::NewSigningKeyInstance


150
151
152
# File 'lib/twilio-ruby/rest/api.rb', line 150

def new_signing_keys
  self..new_signing_keys()
end

#notifications(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::NotificationInstance, Twilio::REST::Api::V2010::AccountContext::NotificationList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the Notification resource.

Returns:


159
160
161
# File 'lib/twilio-ruby/rest/api.rb', line 159

def notifications(sid=:unset)
  self..notifications(sid)
end

#outgoing_caller_ids(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdInstance, Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the OutgoingCallerId resource.

Returns:


168
169
170
# File 'lib/twilio-ruby/rest/api.rb', line 168

def outgoing_caller_ids(sid=:unset)
  self..outgoing_caller_ids(sid)
end

#queues(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::QueueInstance, Twilio::REST::Api::V2010::AccountContext::QueueList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify this Queue resource.

Returns:


177
178
179
# File 'lib/twilio-ruby/rest/api.rb', line 177

def queues(sid=:unset)
  self..queues(sid)
end

#recordings(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::RecordingInstance, Twilio::REST::Api::V2010::AccountContext::RecordingList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the Recording resource.

Returns:


186
187
188
# File 'lib/twilio-ruby/rest/api.rb', line 186

def recordings(sid=:unset)
  self..recordings(sid)
end

#short_codes(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::ShortCodeInstance, Twilio::REST::Api::V2010::AccountContext::ShortCodeList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify this ShortCode resource.

Returns:


209
210
211
# File 'lib/twilio-ruby/rest/api.rb', line 209

def short_codes(sid=:unset)
  self..short_codes(sid)
end

#signing_keys(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::SigningKeyInstance, Twilio::REST::Api::V2010::AccountContext::SigningKeyList

Parameters:

  • sid (String) (defaults to: :unset)

    The sid

Returns:


194
195
196
# File 'lib/twilio-ruby/rest/api.rb', line 194

def signing_keys(sid=:unset)
  self..signing_keys(sid)
end

#sipTwilio::REST::Api::V2010::AccountContext::SipInstance


200
201
202
# File 'lib/twilio-ruby/rest/api.rb', line 200

def sip
  self..sip()
end

#to_sObject

Provide a user friendly representation


242
243
244
# File 'lib/twilio-ruby/rest/api.rb', line 242

def to_s
  '#<Twilio::REST::Api>'
end

#tokensTwilio::REST::Api::V2010::AccountContext::TokenInstance


215
216
217
# File 'lib/twilio-ruby/rest/api.rb', line 215

def tokens
  self..tokens()
end

#transcriptions(sid = :unset) ⇒ Twilio::REST::Api::V2010::AccountContext::TranscriptionInstance, Twilio::REST::Api::V2010::AccountContext::TranscriptionList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that that we created to identify the Transcription resource.

Returns:


224
225
226
# File 'lib/twilio-ruby/rest/api.rb', line 224

def transcriptions(sid=:unset)
  self..transcriptions(sid)
end

#usageTwilio::REST::Api::V2010::AccountContext::UsageInstance


230
231
232
# File 'lib/twilio-ruby/rest/api.rb', line 230

def usage
  self..usage()
end

#v2010Object

Version v2010 of api


27
28
29
# File 'lib/twilio-ruby/rest/api.rb', line 27

def v2010
  @v2010 ||= V2010.new self
end

#validation_requestsTwilio::REST::Api::V2010::AccountContext::ValidationRequestInstance


236
237
238
# File 'lib/twilio-ruby/rest/api.rb', line 236

def validation_requests
  self..validation_requests()
end