Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

dannyvankooten/moneybird-go

Repository files navigation

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: "john@doe.com",
  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.