A Go client library for Moneybird
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml
LICENSE add LICENSE file Mar 10, 2017
README.md add coveralls.io integration to show test coverage Mar 10, 2017
client.go add newlines to log statements Jan 15, 2018
client_test.go add /webhooks client functions Mar 8, 2017
contact.go uppercase ID in func signatures Mar 9, 2017
contact_integration_test.go improve test errors for tests covering multiple func's Mar 10, 2017
invoice.go add _destroy attribute for invoice detail Nov 24, 2017
invoice_integration_test.go fix failing test Jan 15, 2018
invoice_note.go Add support for invoice notes, closes #4 Mar 10, 2017
invoice_payment.go update endpoint for registering payment Jan 15, 2018
invoice_sending.go add first few integration tests, #1 Mar 9, 2017
ledger_account.go spelling error in code comment Nov 24, 2017
ledger_account_integration_test.go add missing ledger account integration tests Mar 10, 2017
response.go always close response body after consuming Aug 6, 2018
response_test.go add /ledger_accounts endpoint functions Mar 8, 2017
tax_rate.go prefix error strings with pkg name Mar 31, 2017
tax_rate_integration_test.go rename All to List in TaxRate struct methods Mar 9, 2017
test_values.go add first few integration tests, #1 Mar 9, 2017
webhooks.go fix non pointer values passed to json decode Mar 9, 2017
webhooks_integration_test.go add test for creating a webhook Mar 9, 2017
workflow.go add more integration tests. #1 Mar 9, 2017
workflow_integration_test.go rename to integration_tests and add example line to readme, #1 Mar 9, 2017

README.md

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.