/// <summary>
        /// Adds a comment to an existing credit note.
        /// </summary>
        /// <param name="creditnote_id">The creditnote_id is the identifier of the crditnote.</param>
        /// <param name="new_comment">The new_comment is the Comment object which is having new comment information.</param>
        /// <returns>Comment object.</returns>
        public Comment AddComment(string creditnote_id, Comment new_comment)
        {
            string url        = baseAddress + "/" + creditnote_id + "/comments";
            var    json       = JsonConvert.SerializeObject(new_comment);
            var    jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var responce = ZohoHttpClient.post(url, getQueryParameters(jsonstring));

            return(CreditNoteParser.getComment(responce));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Update an existing comment of an invoice.
        /// </summary>
        /// <param name="invoice_id">The invoice_id is the identifier of the invoice.</param>
        /// <param name="comment_id">The comment_id is the identifier of the comment of specified invoice.</param>
        /// <param name="update_info">The update_info is the Comment object which contains the updation information.</param>
        /// <returns>Comment object.</returns>
        public Comment UpdateComment(string invoice_id, string comment_id, Comment update_info)
        {
            string url        = baseAddress + "/" + invoice_id + "/comments/" + comment_id;
            var    json       = JsonConvert.SerializeObject(update_info);
            var    jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var responce = ZohoHttpClient.put(url, getQueryParameters(jsonstring));

            return(CreditNoteParser.getComment(responce));
        }