Пример #1
0
        /// <summary>
        ///     Marks a contact person as primary for the contact.
        /// </summary>
        /// <param name="contact_person_id">The contact_person_id is the identifier of the contact person.</param>
        /// <returns>
        ///     System.String.<br></br>The success message is "This contact person has been marked as your primary contact
        ///     person."
        /// </returns>
        public string MarkAsPrimaryContactPerson(string contact_person_id)
        {
            var url      = baseAddress + "/contactpersons/" + contact_person_id + "/primary";
            var responce = ZohoHttpClient.post(url, getQueryParameters());

            return(ContactParser.getMessage(responce));
        }
Пример #2
0
        /// <summary>
        ///     Deletes an existing contact person.
        /// </summary>
        /// <param name="contact_Person_id">The contact_ person_id is the identifier of the contact person.</param>
        /// <returns>System.String.<br></br>The success message is "The contact person has been deleted."</returns>
        public string DeleteContactPerson(string contact_Person_id)
        {
            var url      = baseAddress + "/contactpersons/" + contact_Person_id;
            var responce = ZohoHttpClient.delete(url, getQueryParameters());

            return(ContactParser.getMessage(responce));
        }
Пример #3
0
        /// <summary>
        ///     Use this API to stop tracking payments to a vendor for 1099 reporting. (Note: This API is only available when the
        ///     organization's country is U.S.A)
        /// </summary>
        /// <param name="contact_id">The contact_id is the identifier of the contact.</param>
        /// <returns>System.String.<br></br>The success message is "1099 tracking is disabled."</returns>
        public string UnTrack1099(string contact_id)
        {
            var url      = baseAddress + "/" + contact_id + "/untrack1099";
            var responce = ZohoHttpClient.post(url, getQueryParameters());

            return(ContactParser.getMessage(responce));
        }
Пример #4
0
        /// <summary>
        ///     Disables automated payment reminders for a contact.
        /// </summary>
        /// <param name="contact_id">The contact_id is the identifier of the contact.</param>
        /// <returns>System.String.<br></br>The success message is "All reminders associated with this contact have been stopped."</returns>
        public string DisablePaymentReminder(string contact_id)
        {
            var url      = baseAddress + "/" + contact_id + "/paymentreminder/disable";
            var responce = ZohoHttpClient.post(url, getQueryParameters());

            return(ContactParser.getMessage(responce));
        }
Пример #5
0
        /// <summary>
        ///     Marks a contact as inactive.
        /// </summary>
        /// <param name="contact_id">The contact_id is the identifier of the contact.</param>
        /// <returns>System.String.<br></br>The success message is "The contact has been marked as inactive."</returns>
        public string MarkAsInactive(string contact_id)
        {
            var url      = baseAddress + "/" + contact_id + "/inactive";
            var responce = ZohoHttpClient.post(url, getQueryParameters());

            return(ContactParser.getMessage(responce));
        }
Пример #6
0
        /// <summary>
        /// Sends email to contact.
        /// </summary>
        /// <param name="contact_id">The contact_id is the identifier of the contact.</param>
        /// <param name="email_content">The email_content.</param>
        /// <param name="parameters">The parameters contains the query string in the form of key-value pair.<br></br>The possible key as mentioned below: <br></br>br>send_customer_statement - Send customer statement pdf with email. <br></br></param>
        /// <param name="attachment_paths">The attachment_paths are the attached files information.</param>
        /// <returns>System.String.<br></br>The success message is "Email has been sent."</returns>
        public string SendEmailContact(string contact_id, EmailNotification email_content, Dictionary <object, object> parameters, string[] attachment_paths)
        {
            string url        = baseAddress + "/" + contact_id + "/email";
            var    json       = JsonConvert.SerializeObject(email_content);
            var    jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var files    = new KeyValuePair <string, string[]>("attachments", attachment_paths);
            var responce = ZohoHttpClient.post(url, getQueryParameters(), jsonstring, files);

            return(ContactParser.getMessage(responce));
        }