Exemplo n.º 1
0
        /// <summary>
        ///     Disable an automated payment reminder.
        /// </summary>
        /// <param name="reminder_id">The reminder_id is the identifier of the auto reminder.</param>
        /// <returns>System.String.<br></br>The success message is "Payment reminder has been disabled."</returns>
        public string DisableAutoReminder(string reminder_id)
        {
            var url      = baseAddress + "/autoreminders/" + reminder_id + "/disable";
            var response = ZohoHttpClient.post(url, getQueryParameters());

            return(SettingsParser.getMessage(response));
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Delete a unit that has been associated to an item.
        /// </summary>
        /// <param name="unit_id">The unit_id.</param>
        /// <returns>System.String.<br></br>The success message is "You have successfully deleted the unit."</returns>
        public string DeleteUnit(string unit_id)
        {
            var url      = baseAddress + "/units/" + unit_id;
            var response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SettingsParser.getMessage(response));
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Deletes the tax exemption.
        /// </summary>
        /// <param name="tax_exemption_id">The tax_exemption_id.</param>
        /// <returns>System.String.</returns>
        public string DeleteTaxExemption(string tax_exemption_id)
        {
            var url      = baseAddress + "/taxexemptions/" + tax_exemption_id;
            var response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SettingsParser.getMessage(response));
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Delete the entered opening balance.
        /// </summary>
        /// <returns>System.String.<br></br>The success message is "The entered opening balance has been deleted."</returns>
        public string DeleteOpeningBalance()
        {
            var url      = baseAddress + "/openingbalances";
            var response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SettingsParser.getMessage(response));
        }
Exemplo n.º 5
0
        /// <summary>
        ///     Deletes the tax authority.
        /// </summary>
        /// <param name="tax_authority_id">The tax_authority_id.</param>
        /// <returns>System.String.</returns>
        public string DeleteTaxAuthority(string tax_authority_id)
        {
            var url      = baseAddress + "/taxauthorities/" + tax_authority_id;
            var response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SettingsParser.getMessage(response));
        }
Exemplo n.º 6
0
        /// <summary>
        ///     Delete an exchange rate for the specified currency.
        /// </summary>
        /// <param name="currency_id">The currency_id is the identifier of the currency.</param>
        /// <param name="exchange_rate_id">
        ///     The exchange_rate_id is the identifier of the exchange rate which is configured for the
        ///     specified currency.
        /// </param>
        /// <returns>System.String.<br></br>The success message is "Exchange rate successfully deleted"</returns>
        public string DeleteAnExchangeRate(string currency_id, string exchange_rate_id)
        {
            var url      = baseAddress + "/currencies/" + currency_id + "/exchangerates/" + exchange_rate_id;
            var response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SettingsParser.getMessage(response));
        }
Exemplo n.º 7
0
        /// <summary>
        ///     Delete a currency. Currency that is associated to transactions cannot be deleted.
        /// </summary>
        /// <param name="currency_id">The currency_id is the identifier of the currency.</param>
        /// <returns>System.String.<br></br>The success message is "The currency has been deleted."</returns>
        public string DeleteCurrency(string currency_id)
        {
            var url      = baseAddress + "/currencies/" + currency_id;
            var response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SettingsParser.getMessage(response));
        }
Exemplo n.º 8
0
        /// <summary>
        /// Delete a created tax group.
        /// </summary>
        /// <param name="tax_group_id">The tax_group_id is the identifier of the tax group.</param>
        /// <returns>System.String.<br></br>The success message is "The tax group has been deleted."</returns>
        public string DeleteTaxGroup(string tax_group_id)
        {
            string url      = baseAddress + "/taxgroups/" + tax_group_id;
            var    response = ZohoHttpClient.delete(url, getQueryParameters());

            return(SettingsParser.getMessage(response));
        }
Exemplo n.º 9
0
        /// <summary>
        ///     Create a unit the can be associated to a line item.
        /// </summary>
        /// <param name="new_unit">The new_unit is the Unit object with unit* as mandatory attribute.</param>
        /// <returns>System.String.<br></br>The success message is "Unit added."</returns>
        public string CreateUnit(Unit new_unit)
        {
            var url        = baseAddress + "/units";
            var json       = JsonConvert.SerializeObject(new_unit);
            var jsonstring = new Dictionary <object, object>();

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

            return(SettingsParser.getMessage(response));
        }