moneybird-go icon indicating copy to clipboard operation
moneybird-go copied to clipboard

A Go client library for Moneybird

Moneybird Go

GoDoc Build Status Coverage Status

An unofficial Go client library for Moneybird. This package is still experimental and could be subject to heavy change.

Usage

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.

Testing

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"

License

MIT Licensed. See the LICENSE file for details.