/// <summary> /// Gets the details of a recurring expense. /// </summary> /// <param name="recurring_expense_id">The recurring_expense_id is the identifier of the recurrence expnse.</param> /// <returns>RecurringExpense object.</returns> public RecurringExpense Get(string recurring_expense_id) { var url = baseAddress + "/" + recurring_expense_id; var responce = ZohoHttpClient.get(url, getQueryParameters()); return(RecurringExpenseParser.getRecurringExpense(responce)); }
/// <summary> /// Updates the specified existing recurring expense . /// </summary> /// <param name="recurring_expense_id">The recurring_expense_id is the identifier of the recurrence expnse.</param> /// <param name="update_info">The update_info is the RecurringExpense object which contains the updation information.</param> /// <returns>RecurringExpense object.</returns> public RecurringExpense Update(string recurring_expense_id, RecurringExpense update_info) { var url = baseAddress + "/" + recurring_expense_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(RecurringExpenseParser.getRecurringExpense(responce)); }
/// <summary> /// Creates the new recurring expense. /// </summary> /// <param name="new_recurring_expense"> /// The new_recurring_expense is the recurringExpense object with /// amount_id,paid_through_id,recurrence_name,star_date,recurrence_frequency,amount and repeat_every as mandatory /// attributes. /// </param> /// <returns>RecurringExpense object.</returns> public RecurringExpense Create(RecurringExpense new_recurring_expense) { var url = baseAddress; var json = JsonConvert.SerializeObject(new_recurring_expense); var jsonstring = new Dictionary <object, object>(); jsonstring.Add("JSONString", json); var responce = ZohoHttpClient.post(url, getQueryParameters(jsonstring)); return(RecurringExpenseParser.getRecurringExpense(responce)); }