コード例 #1
0
 /// <summary>
 /// Update a single call.
 /// </summary>
 /// <param name="callId">The callId of the target call.</param>
 /// <param name="callOptions">Optional CallTermOptions instance to be used when updating a call.</param>
 /// <exception cref="PersyException">Thrown upon failed request.</exception>
 public void update(string callId, CallTermOptions callOptions = null)
 {
     base.POST(String.Format("{0}/{1}", this.path, callId), ((callOptions != null) ? callOptions.toJson() : null));
 }
コード例 #2
0
        /// <summary>
        /// Update a single call.
        /// </summary>
        /// <param name="callId">The callId of the target call.</param>
        /// <param name="callOptions">>Optional CallTermOptions instance to be used when updating a call.</param>
        /// <returns>The call matching the callId provided.</returns>
        /// <exception cref="PersyException">Thrown upon failed request.</exception>
        public Call update(string callId, CallTermOptions callOptions = null)
        {
            string json = base.POST(String.Format("{0}/{1}", this.path, callId), ((callOptions != null) ? callOptions.toJson() : null));

            if (string.IsNullOrEmpty(json) == true)
            {
                throw new PersyException(String.Format("Failed to update call {0} information", callId ?? ""));
            }

            return(Call.fromJson(json));
        }