You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 20, 2021. It is now read-only.
Can someone provide an example for creating an invoice from a command line program without a callback URL? I'm struggling mostly with the session creation.
I'm looking for something along these lines:
xeroKey:="my xero key"xeroSecret:="my xero secret"invoices:= accounting.Invoices{
Invoices: []accounting.Invoice{
{
Type: "ACCREC",
Status: "DRAFT",
Contact: accounting.Contact{
ContactID: "restaurant xero contact id 001",
},
LineItems: []accounting.LineItem{
{
Description: "first line item",
Quantity: 1,
UnitAmount: 2,
LineAmount: 3,
TaxType: "tax type 01",
AccountCode: "account code 01",
},
{
Description: "second line item",
Quantity: 4,
UnitAmount: 5,
LineAmount: 6,
TaxType: "tax type 02",
AccountCode: "account code 02",
},
},
DueDate: "2019-06-30",
},
},
}
// no callback URL here since it's not a server making the call but a cli programprovider:=xerogolang.New(xeroKey, xeroSecret, "")
session:="??? how to get one without the callback?"res, err:=invoices.Create(provider, session)
iferr!=nil {
returnerr
}
fmt.Println(res)
Hi there,
Can someone provide an example for creating an invoice from a command line program without a callback URL? I'm struggling mostly with the
sessioncreation.I'm looking for something along these lines:
Thanks.