Class: Twilio::REST::Preview::TrustedComms::PhoneCallList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb

Overview

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ PhoneCallList

Initialize the PhoneCallList

Parameters:

  • version (Version)

    Version that contains the resource



20
21
22
23
24
25
26
# File 'lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb', line 20

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}
  @uri = "/Business/PhoneCalls"
end

Instance Method Details

#create(from: nil, to: nil, reason: :unset, application_sid: :unset, caller_id: :unset, fallback_method: :unset, fallback_url: :unset, machine_detection: :unset, machine_detection_silence_timeout: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_speech_threshold: :unset, machine_detection_timeout: :unset, method: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_event: :unset, recording_status_callback_method: :unset, send_digits: :unset, sip_auth_password: :unset, sip_auth_username: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, timeout: :unset, trim: :unset, url: :unset) ⇒ PhoneCallInstance

Create the PhoneCallInstance

Parameters:

Returns:



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb', line 111

def create(from: nil, to: nil, reason: :unset, application_sid: :unset, caller_id: :unset, fallback_method: :unset, fallback_url: :unset, machine_detection: :unset, machine_detection_silence_timeout: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_speech_threshold: :unset, machine_detection_timeout: :unset, method: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_event: :unset, recording_status_callback_method: :unset, send_digits: :unset, sip_auth_password: :unset, sip_auth_username: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, timeout: :unset, trim: :unset, url: :unset)
  data = Twilio::Values.of({
      'From' => from,
      'To' => to,
      'Reason' => reason,
      'ApplicationSid' => application_sid,
      'CallerId' => caller_id,
      'FallbackMethod' => fallback_method,
      'FallbackUrl' => fallback_url,
      'MachineDetection' => machine_detection,
      'MachineDetectionSilenceTimeout' => machine_detection_silence_timeout,
      'MachineDetectionSpeechEndThreshold' => machine_detection_speech_end_threshold,
      'MachineDetectionSpeechThreshold' => machine_detection_speech_threshold,
      'MachineDetectionTimeout' => machine_detection_timeout,
      'Method' => method,
      'Record' => record,
      'RecordingChannels' => recording_channels,
      'RecordingStatusCallback' => recording_status_callback,
      'RecordingStatusCallbackEvent' => Twilio.serialize_list(recording_status_callback_event) { |e| e },
      'RecordingStatusCallbackMethod' => recording_status_callback_method,
      'SendDigits' => send_digits,
      'SipAuthPassword' => sip_auth_password,
      'SipAuthUsername' => sip_auth_username,
      'StatusCallback' => status_callback,
      'StatusCallbackEvent' => Twilio.serialize_list(status_callback_event) { |e| e },
      'StatusCallbackMethod' => status_callback_method,
      'Timeout' => timeout,
      'Trim' => trim,
      'Url' => url,
  })

  payload = @version.create('POST', @uri, data: data)

  PhoneCallInstance.new(@version, payload, )
end

#to_sObject

Provide a user friendly representation



149
150
151
# File 'lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb', line 149

def to_s
  '#<Twilio.Preview.TrustedComms.PhoneCallList>'
end