Closed Jammizzle closed 3 years ago
Ok thank you. I think I can issue a simple fix.
Possibly moving the InvoiceAPIEndpoint const into a
var (
InvoiceAPIEndpoint string = "https://invoice.zoho.com/api/v3/"
)
// SetZohoTLD can be used to set the TLD extension for API calls for example for Zoho in EU and China.
// by default this is set to "com", other options are "eu" and "ch"
func (z *API) SetZohoTLD(s string) {
InvoiceAPIEndpoint = fmt.Sprintf("https://invoice.zoho.%s/api/v3/", s)
}
To match the main package?
Can then optionally add the
InvoiceAPIEndpoint = fmt.Sprintf("https://invoice.zoho.%s/api/v3/", z.ZohoTLD)
Into the New
function in invoice.go:38
Ok, that woulda worked.
I just did a search and replace regex across that folder. I pushed the change to issue-30, just wanted to merge the last PR before I pulled this in. I think I can place a few updates under a tag single revision.
With InvoiceApiEndpoint being a const, any use outside of .com will not succeed