## # This code was generated by # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ # # Twilio - Api # This is the public Twilio REST API. # # NOTE: This class is auto generated by OpenAPI Generator. # https://openapi-generator.tech # Do not edit the class manually. # module Twilio module REST class Api < ApiBase class V2010 < Version class AccountContext < InstanceContext class CallContext < InstanceContext class SiprecList < ListResource ## # Initialize the SiprecList # @param [Version] version Version that contains the resource # @return [SiprecList] SiprecList def initialize(version, account_sid: nil, call_sid: nil) super(version) # Path Solution @solution = { account_sid: account_sid, call_sid: call_sid } @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Siprec.json" end ## # Create the SiprecInstance # @param [String] name The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec. # @param [String] connector_name Unique name used when configuring the connector via Marketplace Add-on. # @param [Track] track # @param [String] status_callback Absolute URL of the status callback. # @param [String] status_callback_method The http method for the status_callback (one of GET, POST). # @param [String] parameter1_name Parameter name # @param [String] parameter1_value Parameter value # @param [String] parameter2_name Parameter name # @param [String] parameter2_value Parameter value # @param [String] parameter3_name Parameter name # @param [String] parameter3_value Parameter value # @param [String] parameter4_name Parameter name # @param [String] parameter4_value Parameter value # @param [String] parameter5_name Parameter name # @param [String] parameter5_value Parameter value # @param [String] parameter6_name Parameter name # @param [String] parameter6_value Parameter value # @param [String] parameter7_name Parameter name # @param [String] parameter7_value Parameter value # @param [String] parameter8_name Parameter name # @param [String] parameter8_value Parameter value # @param [String] parameter9_name Parameter name # @param [String] parameter9_value Parameter value # @param [String] parameter10_name Parameter name # @param [String] parameter10_value Parameter value # @param [String] parameter11_name Parameter name # @param [String] parameter11_value Parameter value # @param [String] parameter12_name Parameter name # @param [String] parameter12_value Parameter value # @param [String] parameter13_name Parameter name # @param [String] parameter13_value Parameter value # @param [String] parameter14_name Parameter name # @param [String] parameter14_value Parameter value # @param [String] parameter15_name Parameter name # @param [String] parameter15_value Parameter value # @param [String] parameter16_name Parameter name # @param [String] parameter16_value Parameter value # @param [String] parameter17_name Parameter name # @param [String] parameter17_value Parameter value # @param [String] parameter18_name Parameter name # @param [String] parameter18_value Parameter value # @param [String] parameter19_name Parameter name # @param [String] parameter19_value Parameter value # @param [String] parameter20_name Parameter name # @param [String] parameter20_value Parameter value # @param [String] parameter21_name Parameter name # @param [String] parameter21_value Parameter value # @param [String] parameter22_name Parameter name # @param [String] parameter22_value Parameter value # @param [String] parameter23_name Parameter name # @param [String] parameter23_value Parameter value # @param [String] parameter24_name Parameter name # @param [String] parameter24_value Parameter value # @param [String] parameter25_name Parameter name # @param [String] parameter25_value Parameter value # @param [String] parameter26_name Parameter name # @param [String] parameter26_value Parameter value # @param [String] parameter27_name Parameter name # @param [String] parameter27_value Parameter value # @param [String] parameter28_name Parameter name # @param [String] parameter28_value Parameter value # @param [String] parameter29_name Parameter name # @param [String] parameter29_value Parameter value # @param [String] parameter30_name Parameter name # @param [String] parameter30_value Parameter value # @param [String] parameter31_name Parameter name # @param [String] parameter31_value Parameter value # @param [String] parameter32_name Parameter name # @param [String] parameter32_value Parameter value # @param [String] parameter33_name Parameter name # @param [String] parameter33_value Parameter value # @param [String] parameter34_name Parameter name # @param [String] parameter34_value Parameter value # @param [String] parameter35_name Parameter name # @param [String] parameter35_value Parameter value # @param [String] parameter36_name Parameter name # @param [String] parameter36_value Parameter value # @param [String] parameter37_name Parameter name # @param [String] parameter37_value Parameter value # @param [String] parameter38_name Parameter name # @param [String] parameter38_value Parameter value # @param [String] parameter39_name Parameter name # @param [String] parameter39_value Parameter value # @param [String] parameter40_name Parameter name # @param [String] parameter40_value Parameter value # @param [String] parameter41_name Parameter name # @param [String] parameter41_value Parameter value # @param [String] parameter42_name Parameter name # @param [String] parameter42_value Parameter value # @param [String] parameter43_name Parameter name # @param [String] parameter43_value Parameter value # @param [String] parameter44_name Parameter name # @param [String] parameter44_value Parameter value # @param [String] parameter45_name Parameter name # @param [String] parameter45_value Parameter value # @param [String] parameter46_name Parameter name # @param [String] parameter46_value Parameter value # @param [String] parameter47_name Parameter name # @param [String] parameter47_value Parameter value # @param [String] parameter48_name Parameter name # @param [String] parameter48_value Parameter value # @param [String] parameter49_name Parameter name # @param [String] parameter49_value Parameter value # @param [String] parameter50_name Parameter name # @param [String] parameter50_value Parameter value # @param [String] parameter51_name Parameter name # @param [String] parameter51_value Parameter value # @param [String] parameter52_name Parameter name # @param [String] parameter52_value Parameter value # @param [String] parameter53_name Parameter name # @param [String] parameter53_value Parameter value # @param [String] parameter54_name Parameter name # @param [String] parameter54_value Parameter value # @param [String] parameter55_name Parameter name # @param [String] parameter55_value Parameter value # @param [String] parameter56_name Parameter name # @param [String] parameter56_value Parameter value # @param [String] parameter57_name Parameter name # @param [String] parameter57_value Parameter value # @param [String] parameter58_name Parameter name # @param [String] parameter58_value Parameter value # @param [String] parameter59_name Parameter name # @param [String] parameter59_value Parameter value # @param [String] parameter60_name Parameter name # @param [String] parameter60_value Parameter value # @param [String] parameter61_name Parameter name # @param [String] parameter61_value Parameter value # @param [String] parameter62_name Parameter name # @param [String] parameter62_value Parameter value # @param [String] parameter63_name Parameter name # @param [String] parameter63_value Parameter value # @param [String] parameter64_name Parameter name # @param [String] parameter64_value Parameter value # @param [String] parameter65_name Parameter name # @param [String] parameter65_value Parameter value # @param [String] parameter66_name Parameter name # @param [String] parameter66_value Parameter value # @param [String] parameter67_name Parameter name # @param [String] parameter67_value Parameter value # @param [String] parameter68_name Parameter name # @param [String] parameter68_value Parameter value # @param [String] parameter69_name Parameter name # @param [String] parameter69_value Parameter value # @param [String] parameter70_name Parameter name # @param [String] parameter70_value Parameter value # @param [String] parameter71_name Parameter name # @param [String] parameter71_value Parameter value # @param [String] parameter72_name Parameter name # @param [String] parameter72_value Parameter value # @param [String] parameter73_name Parameter name # @param [String] parameter73_value Parameter value # @param [String] parameter74_name Parameter name # @param [String] parameter74_value Parameter value # @param [String] parameter75_name Parameter name # @param [String] parameter75_value Parameter value # @param [String] parameter76_name Parameter name # @param [String] parameter76_value Parameter value # @param [String] parameter77_name Parameter name # @param [String] parameter77_value Parameter value # @param [String] parameter78_name Parameter name # @param [String] parameter78_value Parameter value # @param [String] parameter79_name Parameter name # @param [String] parameter79_value Parameter value # @param [String] parameter80_name Parameter name # @param [String] parameter80_value Parameter value # @param [String] parameter81_name Parameter name # @param [String] parameter81_value Parameter value # @param [String] parameter82_name Parameter name # @param [String] parameter82_value Parameter value # @param [String] parameter83_name Parameter name # @param [String] parameter83_value Parameter value # @param [String] parameter84_name Parameter name # @param [String] parameter84_value Parameter value # @param [String] parameter85_name Parameter name # @param [String] parameter85_value Parameter value # @param [String] parameter86_name Parameter name # @param [String] parameter86_value Parameter value # @param [String] parameter87_name Parameter name # @param [String] parameter87_value Parameter value # @param [String] parameter88_name Parameter name # @param [String] parameter88_value Parameter value # @param [String] parameter89_name Parameter name # @param [String] parameter89_value Parameter value # @param [String] parameter90_name Parameter name # @param [String] parameter90_value Parameter value # @param [String] parameter91_name Parameter name # @param [String] parameter91_value Parameter value # @param [String] parameter92_name Parameter name # @param [String] parameter92_value Parameter value # @param [String] parameter93_name Parameter name # @param [String] parameter93_value Parameter value # @param [String] parameter94_name Parameter name # @param [String] parameter94_value Parameter value # @param [String] parameter95_name Parameter name # @param [String] parameter95_value Parameter value # @param [String] parameter96_name Parameter name # @param [String] parameter96_value Parameter value # @param [String] parameter97_name Parameter name # @param [String] parameter97_value Parameter value # @param [String] parameter98_name Parameter name # @param [String] parameter98_value Parameter value # @param [String] parameter99_name Parameter name # @param [String] parameter99_value Parameter value # @return [SiprecInstance] Created SiprecInstance def create( name: :unset, connector_name: :unset, track: :unset, status_callback: :unset, status_callback_method: :unset, parameter1_name: :unset, parameter1_value: :unset, parameter2_name: :unset, parameter2_value: :unset, parameter3_name: :unset, parameter3_value: :unset, parameter4_name: :unset, parameter4_value: :unset, parameter5_name: :unset, parameter5_value: :unset, parameter6_name: :unset, parameter6_value: :unset, parameter7_name: :unset, parameter7_value: :unset, parameter8_name: :unset, parameter8_value: :unset, parameter9_name: :unset, parameter9_value: :unset, parameter10_name: :unset, parameter10_value: :unset, parameter11_name: :unset, parameter11_value: :unset, parameter12_name: :unset, parameter12_value: :unset, parameter13_name: :unset, parameter13_value: :unset, parameter14_name: :unset, parameter14_value: :unset, parameter15_name: :unset, parameter15_value: :unset, parameter16_name: :unset, parameter16_value: :unset, parameter17_name: :unset, parameter17_value: :unset, parameter18_name: :unset, parameter18_value: :unset, parameter19_name: :unset, parameter19_value: :unset, parameter20_name: :unset, parameter20_value: :unset, parameter21_name: :unset, parameter21_value: :unset, parameter22_name: :unset, parameter22_value: :unset, parameter23_name: :unset, parameter23_value: :unset, parameter24_name: :unset, parameter24_value: :unset, parameter25_name: :unset, parameter25_value: :unset, parameter26_name: :unset, parameter26_value: :unset, parameter27_name: :unset, parameter27_value: :unset, parameter28_name: :unset, parameter28_value: :unset, parameter29_name: :unset, parameter29_value: :unset, parameter30_name: :unset, parameter30_value: :unset, parameter31_name: :unset, parameter31_value: :unset, parameter32_name: :unset, parameter32_value: :unset, parameter33_name: :unset, parameter33_value: :unset, parameter34_name: :unset, parameter34_value: :unset, parameter35_name: :unset, parameter35_value: :unset, parameter36_name: :unset, parameter36_value: :unset, parameter37_name: :unset, parameter37_value: :unset, parameter38_name: :unset, parameter38_value: :unset, parameter39_name: :unset, parameter39_value: :unset, parameter40_name: :unset, parameter40_value: :unset, parameter41_name: :unset, parameter41_value: :unset, parameter42_name: :unset, parameter42_value: :unset, parameter43_name: :unset, parameter43_value: :unset, parameter44_name: :unset, parameter44_value: :unset, parameter45_name: :unset, parameter45_value: :unset, parameter46_name: :unset, parameter46_value: :unset, parameter47_name: :unset, parameter47_value: :unset, parameter48_name: :unset, parameter48_value: :unset, parameter49_name: :unset, parameter49_value: :unset, parameter50_name: :unset, parameter50_value: :unset, parameter51_name: :unset, parameter51_value: :unset, parameter52_name: :unset, parameter52_value: :unset, parameter53_name: :unset, parameter53_value: :unset, parameter54_name: :unset, parameter54_value: :unset, parameter55_name: :unset, parameter55_value: :unset, parameter56_name: :unset, parameter56_value: :unset, parameter57_name: :unset, parameter57_value: :unset, parameter58_name: :unset, parameter58_value: :unset, parameter59_name: :unset, parameter59_value: :unset, parameter60_name: :unset, parameter60_value: :unset, parameter61_name: :unset, parameter61_value: :unset, parameter62_name: :unset, parameter62_value: :unset, parameter63_name: :unset, parameter63_value: :unset, parameter64_name: :unset, parameter64_value: :unset, parameter65_name: :unset, parameter65_value: :unset, parameter66_name: :unset, parameter66_value: :unset, parameter67_name: :unset, parameter67_value: :unset, parameter68_name: :unset, parameter68_value: :unset, parameter69_name: :unset, parameter69_value: :unset, parameter70_name: :unset, parameter70_value: :unset, parameter71_name: :unset, parameter71_value: :unset, parameter72_name: :unset, parameter72_value: :unset, parameter73_name: :unset, parameter73_value: :unset, parameter74_name: :unset, parameter74_value: :unset, parameter75_name: :unset, parameter75_value: :unset, parameter76_name: :unset, parameter76_value: :unset, parameter77_name: :unset, parameter77_value: :unset, parameter78_name: :unset, parameter78_value: :unset, parameter79_name: :unset, parameter79_value: :unset, parameter80_name: :unset, parameter80_value: :unset, parameter81_name: :unset, parameter81_value: :unset, parameter82_name: :unset, parameter82_value: :unset, parameter83_name: :unset, parameter83_value: :unset, parameter84_name: :unset, parameter84_value: :unset, parameter85_name: :unset, parameter85_value: :unset, parameter86_name: :unset, parameter86_value: :unset, parameter87_name: :unset, parameter87_value: :unset, parameter88_name: :unset, parameter88_value: :unset, parameter89_name: :unset, parameter89_value: :unset, parameter90_name: :unset, parameter90_value: :unset, parameter91_name: :unset, parameter91_value: :unset, parameter92_name: :unset, parameter92_value: :unset, parameter93_name: :unset, parameter93_value: :unset, parameter94_name: :unset, parameter94_value: :unset, parameter95_name: :unset, parameter95_value: :unset, parameter96_name: :unset, parameter96_value: :unset, parameter97_name: :unset, parameter97_value: :unset, parameter98_name: :unset, parameter98_value: :unset, parameter99_name: :unset, parameter99_value: :unset ) data = Twilio::Values.of({ 'Name' => name, 'ConnectorName' => connector_name, 'Track' => track, 'StatusCallback' => status_callback, 'StatusCallbackMethod' => status_callback_method, 'Parameter1.Name' => parameter1_name, 'Parameter1.Value' => parameter1_value, 'Parameter2.Name' => parameter2_name, 'Parameter2.Value' => parameter2_value, 'Parameter3.Name' => parameter3_name, 'Parameter3.Value' => parameter3_value, 'Parameter4.Name' => parameter4_name, 'Parameter4.Value' => parameter4_value, 'Parameter5.Name' => parameter5_name, 'Parameter5.Value' => parameter5_value, 'Parameter6.Name' => parameter6_name, 'Parameter6.Value' => parameter6_value, 'Parameter7.Name' => parameter7_name, 'Parameter7.Value' => parameter7_value, 'Parameter8.Name' => parameter8_name, 'Parameter8.Value' => parameter8_value, 'Parameter9.Name' => parameter9_name, 'Parameter9.Value' => parameter9_value, 'Parameter10.Name' => parameter10_name, 'Parameter10.Value' => parameter10_value, 'Parameter11.Name' => parameter11_name, 'Parameter11.Value' => parameter11_value, 'Parameter12.Name' => parameter12_name, 'Parameter12.Value' => parameter12_value, 'Parameter13.Name' => parameter13_name, 'Parameter13.Value' => parameter13_value, 'Parameter14.Name' => parameter14_name, 'Parameter14.Value' => parameter14_value, 'Parameter15.Name' => parameter15_name, 'Parameter15.Value' => parameter15_value, 'Parameter16.Name' => parameter16_name, 'Parameter16.Value' => parameter16_value, 'Parameter17.Name' => parameter17_name, 'Parameter17.Value' => parameter17_value, 'Parameter18.Name' => parameter18_name, 'Parameter18.Value' => parameter18_value, 'Parameter19.Name' => parameter19_name, 'Parameter19.Value' => parameter19_value, 'Parameter20.Name' => parameter20_name, 'Parameter20.Value' => parameter20_value, 'Parameter21.Name' => parameter21_name, 'Parameter21.Value' => parameter21_value, 'Parameter22.Name' => parameter22_name, 'Parameter22.Value' => parameter22_value, 'Parameter23.Name' => parameter23_name, 'Parameter23.Value' => parameter23_value, 'Parameter24.Name' => parameter24_name, 'Parameter24.Value' => parameter24_value, 'Parameter25.Name' => parameter25_name, 'Parameter25.Value' => parameter25_value, 'Parameter26.Name' => parameter26_name, 'Parameter26.Value' => parameter26_value, 'Parameter27.Name' => parameter27_name, 'Parameter27.Value' => parameter27_value, 'Parameter28.Name' => parameter28_name, 'Parameter28.Value' => parameter28_value, 'Parameter29.Name' => parameter29_name, 'Parameter29.Value' => parameter29_value, 'Parameter30.Name' => parameter30_name, 'Parameter30.Value' => parameter30_value, 'Parameter31.Name' => parameter31_name, 'Parameter31.Value' => parameter31_value, 'Parameter32.Name' => parameter32_name, 'Parameter32.Value' => parameter32_value, 'Parameter33.Name' => parameter33_name, 'Parameter33.Value' => parameter33_value, 'Parameter34.Name' => parameter34_name, 'Parameter34.Value' => parameter34_value, 'Parameter35.Name' => parameter35_name, 'Parameter35.Value' => parameter35_value, 'Parameter36.Name' => parameter36_name, 'Parameter36.Value' => parameter36_value, 'Parameter37.Name' => parameter37_name, 'Parameter37.Value' => parameter37_value, 'Parameter38.Name' => parameter38_name, 'Parameter38.Value' => parameter38_value, 'Parameter39.Name' => parameter39_name, 'Parameter39.Value' => parameter39_value, 'Parameter40.Name' => parameter40_name, 'Parameter40.Value' => parameter40_value, 'Parameter41.Name' => parameter41_name, 'Parameter41.Value' => parameter41_value, 'Parameter42.Name' => parameter42_name, 'Parameter42.Value' => parameter42_value, 'Parameter43.Name' => parameter43_name, 'Parameter43.Value' => parameter43_value, 'Parameter44.Name' => parameter44_name, 'Parameter44.Value' => parameter44_value, 'Parameter45.Name' => parameter45_name, 'Parameter45.Value' => parameter45_value, 'Parameter46.Name' => parameter46_name, 'Parameter46.Value' => parameter46_value, 'Parameter47.Name' => parameter47_name, 'Parameter47.Value' => parameter47_value, 'Parameter48.Name' => parameter48_name, 'Parameter48.Value' => parameter48_value, 'Parameter49.Name' => parameter49_name, 'Parameter49.Value' => parameter49_value, 'Parameter50.Name' => parameter50_name, 'Parameter50.Value' => parameter50_value, 'Parameter51.Name' => parameter51_name, 'Parameter51.Value' => parameter51_value, 'Parameter52.Name' => parameter52_name, 'Parameter52.Value' => parameter52_value, 'Parameter53.Name' => parameter53_name, 'Parameter53.Value' => parameter53_value, 'Parameter54.Name' => parameter54_name, 'Parameter54.Value' => parameter54_value, 'Parameter55.Name' => parameter55_name, 'Parameter55.Value' => parameter55_value, 'Parameter56.Name' => parameter56_name, 'Parameter56.Value' => parameter56_value, 'Parameter57.Name' => parameter57_name, 'Parameter57.Value' => parameter57_value, 'Parameter58.Name' => parameter58_name, 'Parameter58.Value' => parameter58_value, 'Parameter59.Name' => parameter59_name, 'Parameter59.Value' => parameter59_value, 'Parameter60.Name' => parameter60_name, 'Parameter60.Value' => parameter60_value, 'Parameter61.Name' => parameter61_name, 'Parameter61.Value' => parameter61_value, 'Parameter62.Name' => parameter62_name, 'Parameter62.Value' => parameter62_value, 'Parameter63.Name' => parameter63_name, 'Parameter63.Value' => parameter63_value, 'Parameter64.Name' => parameter64_name, 'Parameter64.Value' => parameter64_value, 'Parameter65.Name' => parameter65_name, 'Parameter65.Value' => parameter65_value, 'Parameter66.Name' => parameter66_name, 'Parameter66.Value' => parameter66_value, 'Parameter67.Name' => parameter67_name, 'Parameter67.Value' => parameter67_value, 'Parameter68.Name' => parameter68_name, 'Parameter68.Value' => parameter68_value, 'Parameter69.Name' => parameter69_name, 'Parameter69.Value' => parameter69_value, 'Parameter70.Name' => parameter70_name, 'Parameter70.Value' => parameter70_value, 'Parameter71.Name' => parameter71_name, 'Parameter71.Value' => parameter71_value, 'Parameter72.Name' => parameter72_name, 'Parameter72.Value' => parameter72_value, 'Parameter73.Name' => parameter73_name, 'Parameter73.Value' => parameter73_value, 'Parameter74.Name' => parameter74_name, 'Parameter74.Value' => parameter74_value, 'Parameter75.Name' => parameter75_name, 'Parameter75.Value' => parameter75_value, 'Parameter76.Name' => parameter76_name, 'Parameter76.Value' => parameter76_value, 'Parameter77.Name' => parameter77_name, 'Parameter77.Value' => parameter77_value, 'Parameter78.Name' => parameter78_name, 'Parameter78.Value' => parameter78_value, 'Parameter79.Name' => parameter79_name, 'Parameter79.Value' => parameter79_value, 'Parameter80.Name' => parameter80_name, 'Parameter80.Value' => parameter80_value, 'Parameter81.Name' => parameter81_name, 'Parameter81.Value' => parameter81_value, 'Parameter82.Name' => parameter82_name, 'Parameter82.Value' => parameter82_value, 'Parameter83.Name' => parameter83_name, 'Parameter83.Value' => parameter83_value, 'Parameter84.Name' => parameter84_name, 'Parameter84.Value' => parameter84_value, 'Parameter85.Name' => parameter85_name, 'Parameter85.Value' => parameter85_value, 'Parameter86.Name' => parameter86_name, 'Parameter86.Value' => parameter86_value, 'Parameter87.Name' => parameter87_name, 'Parameter87.Value' => parameter87_value, 'Parameter88.Name' => parameter88_name, 'Parameter88.Value' => parameter88_value, 'Parameter89.Name' => parameter89_name, 'Parameter89.Value' => parameter89_value, 'Parameter90.Name' => parameter90_name, 'Parameter90.Value' => parameter90_value, 'Parameter91.Name' => parameter91_name, 'Parameter91.Value' => parameter91_value, 'Parameter92.Name' => parameter92_name, 'Parameter92.Value' => parameter92_value, 'Parameter93.Name' => parameter93_name, 'Parameter93.Value' => parameter93_value, 'Parameter94.Name' => parameter94_name, 'Parameter94.Value' => parameter94_value, 'Parameter95.Name' => parameter95_name, 'Parameter95.Value' => parameter95_value, 'Parameter96.Name' => parameter96_name, 'Parameter96.Value' => parameter96_value, 'Parameter97.Name' => parameter97_name, 'Parameter97.Value' => parameter97_value, 'Parameter98.Name' => parameter98_name, 'Parameter98.Value' => parameter98_value, 'Parameter99.Name' => parameter99_name, 'Parameter99.Value' => parameter99_value, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) SiprecInstance.new( @version, payload, account_sid: @solution[:account_sid], call_sid: @solution[:call_sid], ) end # Provide a user friendly representation def to_s '#' end end class SiprecContext < InstanceContext ## # Initialize the SiprecContext # @param [Version] version Version that contains the resource # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Siprec resource. # @param [String] call_sid The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Siprec resource is associated with. # @param [String] sid The SID of the Siprec resource, or the `name` used when creating the resource # @return [SiprecContext] SiprecContext def initialize(version, account_sid, call_sid, sid) super(version) # Path Solution @solution = { account_sid: account_sid, call_sid: call_sid, sid: sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Siprec/#{@solution[:sid]}.json" end ## # Update the SiprecInstance # @param [UpdateStatus] status # @return [SiprecInstance] Updated SiprecInstance def update( status: nil ) data = Twilio::Values.of({ 'Status' => status, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) SiprecInstance.new( @version, payload, account_sid: @solution[:account_sid], call_sid: @solution[:call_sid], sid: @solution[:sid], ) end ## # Provide a user friendly representation def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#" end ## # Provide a detailed, user friendly representation def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#" end end class SiprecPage < Page ## # Initialize the SiprecPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [SiprecPage] SiprecPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of SiprecInstance # @param [Hash] payload Payload response from the API # @return [SiprecInstance] SiprecInstance def get_instance(payload) SiprecInstance.new(@version, payload, account_sid: @solution[:account_sid], call_sid: @solution[:call_sid]) end ## # Provide a user friendly representation def to_s '' end end class SiprecInstance < InstanceResource ## # Initialize the SiprecInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] account_sid The SID of the # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Siprec # resource. # @param [String] sid The SID of the Call resource to fetch. # @return [SiprecInstance] SiprecInstance def initialize(version, payload , account_sid: nil, call_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'call_sid' => payload['call_sid'], 'name' => payload['name'], 'status' => payload['status'], 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'uri' => payload['uri'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'call_sid' => call_sid || @properties['call_sid'] ,'sid' => sid || @properties['sid'] , } end ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @return [SiprecContext] CallContext for this CallInstance def context unless @instance_context @instance_context = SiprecContext.new(@version , @params['account_sid'], @params['call_sid'], @params['sid']) end @instance_context end ## # @return [String] The SID of the Siprec resource. def sid @properties['sid'] end ## # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Siprec resource. def account_sid @properties['account_sid'] end ## # @return [String] The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Siprec resource is associated with. def call_sid @properties['call_sid'] end ## # @return [String] The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec. def name @properties['name'] end ## # @return [Status] def status @properties['status'] end ## # @return [Time] The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. def date_updated @properties['date_updated'] end ## # @return [String] The URI of the resource, relative to `https://api.twilio.com`. def uri @properties['uri'] end ## # Update the SiprecInstance # @param [UpdateStatus] status # @return [SiprecInstance] Updated SiprecInstance def update( status: nil ) context.update( status: status, ) end ## # Provide a user friendly representation def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "" end ## # Provide a detailed, user friendly representation def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "" end end end end end end end end