/// <summary> /// Get the details of a recurring invoice. /// </summary> /// <param name="recurring_invoice_id">The recurring_invoice_id is the identifier of the recuuring invoice.</param> /// <returns>RecurringInvoice object.</returns> public RecurringInvoice Get(string recurring_invoice_id) { var url = baseAddress + "/" + recurring_invoice_id; var responce = ZohoHttpClient.get(url, getQueryParameters()); return(RecurringInvoiceParser.getRecurringInvoice(responce)); }
/// <summary> /// Update an existing recurring invoice. To delete a line item just remove it from the line_items list. /// </summary> /// <param name="recurring_invoice_id">The recurring_invoice_id is the identifier of the recuuring invoice.</param> /// <param name="update_info">The update_info is the RecurringInvoice object which contains the updation information.</param> /// <returns>RecurringInvoice object.</returns> public RecurringInvoice Update(string recurring_invoice_id, RecurringInvoice update_info) { var url = baseAddress + "/" + recurring_invoice_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(RecurringInvoiceParser.getRecurringInvoice(responce)); }
/// <summary> /// Create a recurring invoice for customer. /// </summary> /// <param name="new_recurring_invoice_info">The new_recurring_invoice_info is the RecurringInvoice object with recurrence_name,customer_id and recurrence_frequency as mandatory attributes.</param> /// <returns>RecurringInvoice object.</returns> public RecurringInvoice Create(RecurringInvoice new_recurring_invoice_info) { string url = baseAddress; var json = JsonConvert.SerializeObject(new_recurring_invoice_info); var jsonstring = new Dictionary <object, object>(); jsonstring.Add("JSONString", json); var responce = ZohoHttpClient.post(url, getQueryParameters(jsonstring)); return(RecurringInvoiceParser.getRecurringInvoice(responce)); }