func (c *API) CreateInvoice(request interface{}) (data CreateInvoiceResponse, err error) {
	endpoint := zoho.Endpoint{
		Name:         InvoicesModule,
		URL:          fmt.Sprintf("https://invoice.zoho.%s/api/v3/%s", c.ZohoTLD, InvoicesModule),
		Method:       zoho.HTTPPost,
		ResponseData: &CreateInvoiceResponse{},
		URLParameters: map[string]zoho.Parameter{
			"filter_by": "",
		},
		RequestBody: request,
		BodyFormat:  zoho.JSON_STRING,
		Headers: map[string]string{
			InvoiceAPIEndpointHeader: c.OrganizationID,
		},
	}
	err = c.Zoho.HTTPRequest(&endpoint)
	if err != nil {
		return CreateInvoiceResponse{}, fmt.Errorf("Failed to create invoice: %s", err)
	}
	if v, ok := endpoint.ResponseData.(*CreateInvoiceResponse); ok {
		if v.Code != 0 {
			return *v, fmt.Errorf("Failed to create invoice: %s", v.Message)
		}
		endpointSent := zoho.Endpoint{
			Name:         InvoicesModule,
			URL:          fmt.Sprintf("https://invoice.zoho.%s/api/v3/%s/%s/status/sent", c.ZohoTLD, InvoicesModule, v.Invoice.InvoiceId),
			Method:       zoho.HTTPPost,
			ResponseData: &InvoiceSent{},
			BodyFormat:   zoho.JSON_STRING,
			Headers: map[string]string{
				InvoiceAPIEndpointHeader: c.OrganizationID,
			},
		}
		err = c.Zoho.HTTPRequest(&endpointSent)
		if err != nil {
			return *v, fmt.Errorf("Failed to mark invoice as sent: %s", err)
		}
		return *v, nil
	}
	return CreateInvoiceResponse{}, fmt.Errorf("Data retrieved was not 'CreateInvoiceResponse'")
}
https://www.zoho.com/invoice/api/v3/#Invoices_Create_an_invoice
func (c *API) CreateInvoice(request interface{}, OrganizationID string, params map[string]zoho.Parameter) (data ListContactsResponse, err error) {
package invoice
import (
	"fmt"
	zoho "github.com/schmorrison/Zoho"
)