An unofficial Go client library for Moneybird. This package is still experimental and could be subject to heavy change.
import (
"net/http"
"github.com/dannyvankooten/moneybird-go"
)
mb := &moneybird.Client{
Token: "token",
AdministrationID: "administration-id-here",
HTTPClient: &http.Client{},
}
contact, _ := mb.Contact().Create(&moneybird.Contact{
Email: "[email protected]",
FirstName: "John",
LastName: "Doe",
})
See the integration tests for some more working examples.
In order to run the integration tests, you have to configure a sandbox account in Moneybird. Before running the integration tests with go test
, make sure the following environment variables are set.
export MONEYBIRD_TEST_TOKEN="your-sandbox-token"
export MONEYBIRD_TEST_ADMINISTRATION_ID="your-sandbox-administration-id"
MIT Licensed. See the LICENSE file for details.