xero

package
v0.0.0-...-4b6a049 Latest Latest
Warning

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

Go to latest
Published: May 18, 2015 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIException

type APIException struct {
	XMLName     xml.Name `xml:"ApiException"`
	Type        string
	ErrorNumber int
	Message     string
}

APIException model for error response

type Options

type Options struct {
	ModifiedAfter string
	Values        url.Values
}

Options adds optional parameters to Xero requests

type Xoauth

type Xoauth struct {
	*oauth.Client
}

Xoauth is a wrapper around oauth.Client

func NewClient

func NewClient(token string, key []byte) (client Xoauth, err error)

NewClient initializes the oauth Client

func (Xoauth) GetAllInvoices

func (client Xoauth) GetAllInvoices() (allInvoices invoice.Invoices, err error)

GetAllInvoices gives you all the invoices of the org

func (Xoauth) NewInvoice

func (client Xoauth) NewInvoice(inv []invoice.Invoice) (resp string, err error)

NewInvoice creates one or more invoices

func (Xoauth) NewManualJournal

func (client Xoauth) NewManualJournal(journ manualjournal.Journal) (resp string, err error)

NewManualJournal creates one Journal

func (Xoauth) NewPayment

func (client Xoauth) NewPayment(paym []payment.Payment) ([]string, error)

NewPayment creates one or more payments for the given Invoices

func (Xoauth) PostRequest

func (client Xoauth) PostRequest(path string, payload string) (response string, err error)

PostRequest sends POST requests to xero APIs with a form as payload

func (Xoauth) Request

func (client Xoauth) Request(method string, path string, otherOptions *Options) (response string, err error)

Request sends requests to xero APIs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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