invoice

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: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InvoiceLineAmountTypeEXCLUSIVE - Invoice lines are exclusive of tax (default)
	InvoiceLineAmountTypeEXCLUSIVE = "Exclusive"
	// InvoiceLineAmountTypeINCLUSIVE - Invoice lines are inclusive tax
	InvoiceLineAmountTypeINCLUSIVE = "Inclusive"
	// InvoiceLineAmountTypeNOTAX - Invoices lines have no tax
	InvoiceLineAmountTypeNOTAX = "NoTax"
)
View Source
const (
	// Path is the relative API path for invoices
	Path = "/api.xro/2.0/Invoices"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	XMLName      xml.Name `xml:"Address"`
	AddressType  string
	AddressLine1 string
	AddressLine2 string
	City         string
	Region       string
	PostalCode   string
	Country      string
}

Address is the Contact Address model

type ContactType

type ContactType struct {
	XMLName   xml.Name `xml:"Contact"`
	Name      string
	Addresses []Address `xml:"Addresses>Address"`
}

ContactType is the Invoice Contact content model

type Invoice

type Invoice struct {
	XMLName             xml.Name `xml:"Invoice"`
	InvoiceID           string   `xml:",omitempty"`
	InvoiceNumber       string   `xml:",omitempty"`
	Type                string
	Contact             ContactType
	Date                string
	DueDate             string
	ExpectedPaymentDate string
	Status              string
	LineAmountTypes     string
	LineItems           LineItem
	Reference           string
}

Invoice is the Invoice model

type Invoices

type Invoices struct {
	Invoices []Invoice `xml:"Invoices"`
}

Invoices is the Invoices array model

type LineItem

type LineItem struct {
	LineItem LineItemObj
}

LineItem is the Invoice LineItem model

type LineItemObj

type LineItemObj struct {
	Description string
	Quantity    string
	UnitAmount  string
	AccountCode string
}

LineItemObj is the LineItem content model

type Response

type Response struct {
	ID           string `xml:"Id"`
	Status       string `xml:",omitempty"`
	ProviderName string
	DateTimeUTC  string
	Invoices     []Invoice `xml:"Invoices>Invoice"`
}

Response is the xero request response model for invoices

Jump to

Keyboard shortcuts

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