client.go

module
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0

README

Invopop Go Client

The official Invopop API Go Client Library.

Usage

Start using the Invopop Client in your project by importing the library and initializing the client:


import (
    "context"
    "os"

    "github.com/invopop/client.go/invopop"
)

func main() {
    ctx := context.Background()
    token, _ := os.Getenv("INVOPOP_TOKEN")
    ic := invopop.New()
    ic.SetAuthToken(token)

    p := new(invopop.Ping)
    if err := ic.Utils().Ping(ctx, p); err != nil {
        panic(err.Error())
    }
    fmt.Printf("%v\n", p)
}

The Invopop API is split into individual namespaces, these are:

  • Utils - for ensuring you can connect correctly with the Invopop servers and your credentials are correct.
  • Sequence - used for generating sequential numbers or codes called Series.
  • Transform - used to configure Integrations and Workflows that will be requested to be used when processing Jobs.
  • Silo - for storing GOBL envelopes ready to send to integrations via jobs whose output may be stored as attachments.
  • Access - mostly used by apps to get access tokens and manage enrollment data.

Directories

Path Synopsis
Package gateway provides a wrapper around the Invopop gateway service used to respond to incoming messages to process tasks.
Package gateway provides a wrapper around the Invopop gateway service used to respond to incoming messages to process tasks.
Package invopop provides wrappers around the Invopop API
Package invopop provides wrappers around the Invopop API
pkg
echopop
Package echopop adds middleware functions to projects using the Invopop API and the Echo v4 web framework.
Package echopop adds middleware functions to projects using the Invopop API and the Echo v4 web framework.
runner
Package runner helps run applications using a set of defaults that make it easier to handle interrupts and shutdowns.
Package runner helps run applications using a set of defaults that make it easier to handle interrupts and shutdowns.
snippets
Package snippets provides helpers to generate GOBL document snippets.
Package snippets provides helpers to generate GOBL document snippets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL