예제 #1
0
        /// <summary>
        /// Deletes the comment.
        /// </summary>
        /// <param name="salesorder_id">The salesorder_id.</param>
        /// <param name="comment_id">The comment_id.</param>
        /// <returns>System.String.</returns>
        public string DeleteComment(string salesorder_id, string comment_id)
        {
            string url      = baseAddress + "/" + salesorder_id + "/comments/" + comment_id;
            var    response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SalesorderParser.getMessage(response));
        }
예제 #2
0
        /// <summary>
        /// Updates the attachment preference.
        /// </summary>
        /// <param name="salesorder_id">The salesorder_id.</param>
        /// <param name="parameters">The parameters.</param>
        /// <returns>System.String.</returns>
        public string UpdateAttachmentPreference(string salesorder_id, Dictionary <object, object> parameters)
        {
            string url      = baseAddress + "/" + salesorder_id + "/attachment";
            var    response = ZohoHttpClient.put(url, getQueryParameters(parameters));

            return(SalesorderParser.getMessage(response));
        }
예제 #3
0
        /// <summary>
        /// Deletes an attachment.
        /// </summary>
        /// <param name="salesorder_id">The salesorder_id.</param>
        /// <returns>System.String.</returns>
        public string DeleteAnAttachment(string salesorder_id)
        {
            string url      = baseAddress + "/" + salesorder_id + "/attachment";
            var    response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SalesorderParser.getMessage(response));
        }
예제 #4
0
        /// <summary>
        /// Updates the template.
        /// </summary>
        /// <param name="salesorder_id">The salesorder_id.</param>
        /// <param name="template_id">The template_id.</param>
        /// <returns>System.String.</returns>
        public string UpdateTemplate(string salesorder_id, string template_id)
        {
            string url      = baseAddress + "/" + salesorder_id + "/templates/" + template_id;
            var    response = ZohoHttpClient.put(url, getQueryParameters());

            return(SalesorderParser.getMessage(response));
        }
예제 #5
0
        /// <summary>
        /// Marks as void.
        /// </summary>
        /// <param name="salesorder_id">The salesorder_id.</param>
        /// <returns>System.String.</returns>
        public string MarkAsVoid(string salesorder_id)
        {
            string url      = baseAddress + "/" + salesorder_id + "/status/void";
            var    responce = ZohoHttpClient.post(url, getQueryParameters());

            return(SalesorderParser.getMessage(responce));
        }
예제 #6
0
        /// <summary>
        ///     Deletes the specified salesorder_id.
        /// </summary>
        /// <param name="salesorder_id">The salesorder_id.</param>
        /// <returns>System.String.</returns>
        public string Delete(string salesorder_id)
        {
            var url      = baseAddress + "/" + salesorder_id;
            var responce = ZohoHttpClient.delete(url, getQueryParameters());

            return(SalesorderParser.getMessage(responce));
        }
예제 #7
0
        /// <summary>
        /// Adds the attachment.
        /// </summary>
        /// <param name="salesorder_id">The salesorder_id.</param>
        /// <param name="attachment_Path">The attachment_ path.</param>
        /// <param name="parameters">The parameters.</param>
        /// <returns>System.String.</returns>
        public string AddAttachment(string salesorder_id, string attachment_Path, Dictionary <object, object> parameters)
        {
            string url        = baseAddress + "/" + salesorder_id + "/attachment";
            var    attachment = new string[] { attachment_Path };
            var    file       = new KeyValuePair <string, string[]>("attachment", attachment);
            var    responce   = ZohoHttpClient.post(url, getQueryParameters(parameters), null, file);

            return(SalesorderParser.getMessage(responce));
        }
예제 #8
0
        /// <summary>
        /// Sends the email.
        /// </summary>
        /// <param name="salesorder_id">The salesorder_id.</param>
        /// <param name="email_details">The email_datails.</param>
        /// <param name="parameters">The parameters.</param>
        /// <returns>System.String.</returns>
        public string SendEmail(string salesorder_id, EmailNotification email_details, Dictionary <object, object> parameters)
        {
            string url  = baseAddress + "/" + salesorder_id + "/email";
            var    json = JsonConvert.SerializeObject(email_details);

            if (parameters == null)
            {
                parameters = new Dictionary <object, object>();
            }
            parameters.Add("JSONString", json);
            var responce = ZohoHttpClient.post(url, getQueryParameters(parameters));

            return(SalesorderParser.getMessage(responce));
        }