lib/twilio-ruby/rest/api/v2010/account/call.rb in twilio-ruby-5.58.3 vs lib/twilio-ruby/rest/api/v2010/account/call.rb in twilio-ruby-5.59.0
- old
+ new
@@ -158,11 +158,11 @@
# information, see the {Url
# Parameter}[https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter]
# section in {Making Calls}[https://www.twilio.com/docs/voice/make-calls].
# @param [String] twiml TwiML instructions for the call Twilio will use without
# fetching Twiml from url parameter. If both `twiml` and `url` are provided then
- # `twiml` parameter will be ignored.
+ # `twiml` parameter will be ignored. Max 4000 characters.
# @param [String] application_sid The SID of the Application resource that will
# handle the call, if the call will be handled by an application.
# @return [CallInstance] Created CallInstance
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
data = Twilio::Values.of({
@@ -440,10 +440,11 @@
@recordings = nil
@notifications = nil
@feedback = nil
@events = nil
@payments = nil
+ @siprec = nil
end
##
# Delete the CallInstance
# @return [Boolean] true if delete succeeds, false otherwise
@@ -597,10 +598,28 @@
@payments
end
##
+ # Access the siprec
+ # @return [SiprecList]
+ # @return [SiprecContext] if sid was passed.
+ def siprec(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
+ if sid != :unset
+ return SiprecContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
+ end
+
+ unless @siprec
+ @siprec = SiprecList.new(@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
+ end
+
+ @siprec
+ end
+
+ ##
# Provide a user friendly representation
def to_s
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
"#<Twilio.Api.V2010.CallContext #{context}>"
end
@@ -928,9 +947,16 @@
##
# Access the payments
# @return [payments] payments
def payments
context.payments
+ end
+
+ ##
+ # Access the siprec
+ # @return [siprec] siprec
+ def siprec
+ context.siprec
end
##
# Provide a user friendly representation
def to_s
\ No newline at end of file