rollick / moneybird-go

A Go client library for Moneybird

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A Go client library for Moneybird

License:MIT License


Languages

Language:Go 100.0%