Exemple #1
0
        /// <summary>
        /// List all invoices with pagination.
        /// </summary>
        /// <param name="parameters">The parameters is the Dictionary object which contains the filters in the form of key,value pairs to refine the list.<br></br>The possible filters are listed below<br></br>
        /// <table>
        /// <tr><td>invoice_number</td><td>Search invoices by invoice number.<br></br>Variants: <i>invoice_number_startswith</i> and <i>invoice_number_contains</i></td></tr>
        /// <tr><td>item_name</td><td>Search invoices by item name.<br></br>Variants: <i>item_name_startswith</i> and <i>item_name_contains</i></td></tr>
        /// <tr><td>item_id</td><td>Search invoices by item id.</td></tr>
        /// <tr><td>item_description</td><td>Search invoices by item description.<br></br>Variants: <i>item_description_startswith</i> and <i>item_description_contains</i></td></tr>
        /// <tr><td>reference_number</td><td>Search invoices by invoice reference number (i.e., P.O.#).<br></br>Variants: <i>reference_number_startswith</i> and <i>reference_number_contains</i></td></tr>
        /// <tr><td>customer_name</td><td>Search invoices by customer name.<br></br>Variants: <i>customer_name_startswith</i> and <i>customer_name_contains</i></td></tr>
        /// <tr><td>recurring_invoice_id</td><td>Search invoices by recurring profile id.</td></tr>
        /// <tr><td>email</td><td>Search invoices by customer contact persons email.</td></tr>
        /// <tr><td>total</td><td>Search invoices by invoice total.<br></br>Variants: <i>total_less_than, total_less_equals, total_greater_than</i> and <i>total_greater_equals</i></td></tr>
        /// <tr><td>balance</td><td>Search invoices by invoice total.<br></br>Variants: <i>balance_less_than, balance_less_equals, balance_greater_than</i> and <i>balance_greater_equals</i></td></tr>
        /// <tr><td>date</td><td>Search invoices by invoice date.<br></br>Variants: <i>date_start, date_end, date_before</i> and <i>date_after</i></td></tr>
        /// <tr><td>due_date</td><td>Search invoices by due date.<br></br>Variants: <i>due_date_start, due_date_end, due_date_before</i> and <i>due_date_after</i></td></tr>
        /// <tr><td>status</td><td>Search invoices by invoice status.<br></br>Allowed Values: <i>sent, draft, overdue, paid, void, unpaid, partiallypaid</i> and <i>viewed</i></td></tr>
        /// <tr><td>customer_id</td><td>Search invoices by customer id.</td></tr>
        /// <tr><td>custom_field</td><td>Search invoices by custom fields.<br></br>Variants: <i>custom_field_startswith</i> and <i>custom_field_contains</i></td></tr>
        /// <tr><td>filter_by</td><td>Filter invoices by any status or payment expected date.<br></br>Allowed Values: <i>Status.All, Status.Sent, Status.Draft, Status.OverDue, Status.Paid, Status.Void, Status.Unpaid, Status.PartiallyPaid, Status.Viewed</i> and <i>Date.PaymentExpectedDate</i></td></tr>
        /// <tr><td>search_text</td><td>Search invoices by invoice number or purchase order or customer name.</td></tr>
        /// <tr><td>sort_column</td><td>Sort invoices.<br></br>Allowed Values: <i>customer_name, invoice_number, date, due_date, total, balance</i> and <i>created_time</i></td></tr>
        /// </table>
        /// </param>
        /// <returns>InvoicesList object.</returns>
        public InvoicesList GetInvoices(Dictionary <object, object> parameters)
        {
            string url      = baseAddress;
            var    responce = ZohoHttpClient.get(url, getQueryParameters(parameters));

            return(InvoiceParser.getInvoiceList(responce));
        }
Exemple #2
0
//------------------------------------------------------------------------------------------------------
        /// <summary>
        ///     Lists invoices created for this project.
        /// </summary>
        /// <param name="project_id">The project_id is the identifier of the project.</param>
        /// <param name="parameters">
        ///     The parameters is the Dictionary object which contains the following filters in the form of key,value pair to
        ///     refine the list.<br></br>
        ///     <table>
        ///         <tr>
        ///             <td>sort_column</td>
        ///             <td>
        ///                 Sort invoices raised.<br></br>Allowed Values: <i>invoice_number, date, total, balance</i> and
        ///                 <i>created_time</i>
        ///             </td>
        ///         </tr>
        ///     </table>
        /// </param>
        /// <returns>InvoicesList.</returns>
        public InvoicesList GetInvoices(string project_id, Dictionary <object, object> parameters)
        {
            var url      = baseAddress + "/" + project_id + "/invoices";
            var responce = ZohoHttpClient.get(url, getQueryParameters(parameters));

            return(InvoiceParser.getInvoiceList(responce));
        }