freeagentapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package freeagentapi contains typed models for the FreeAgent REST API. Response shapes are derived from live API responses; request shapes mirror the API's accepted JSON payloads.

To regenerate reference types from the OpenAPI spec (query-param structs only — the spec has no response schemas):

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountManager

type AccountManager struct {
	URL       string `json:"url"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
}

type AccountManagerResponse

type AccountManagerResponse struct {
	AccountManager AccountManager `json:"account_manager"`
}

type AccountManagersResponse

type AccountManagersResponse struct {
	AccountManagers []AccountManager `json:"account_managers"`
}

type Attachment

type Attachment struct {
	URL         string `json:"url"`
	ContentSrc  string `json:"content_src"`
	ContentType string `json:"content_type"`
	FileName    string `json:"file_name"`
	FileSize    int    `json:"file_size"`
	ExpiresAt   string `json:"expires_at"`
}

Attachment represents an attachment returned by the API.

type AttachmentInput

type AttachmentInput struct {
	FileName    string `json:"file_name"`
	ContentType string `json:"content_type"`
	Data        string `json:"data"` // base64-encoded file bytes
	Description string `json:"description,omitempty"`
}

AttachmentInput is used when uploading an attachment.

type BankAccount

type BankAccount struct {
	URL            string `json:"url"`
	Name           string `json:"name"`
	Type           string `json:"type"`
	Status         string `json:"status"`
	IsPersonal     bool   `json:"is_personal"`
	OpeningBalance string `json:"opening_balance"`
	CreatedAt      string `json:"created_at"`
	UpdatedAt      string `json:"updated_at"`
}

type BankAccountInput

type BankAccountInput struct {
	Name           string `json:"name,omitempty"`
	Type           string `json:"type,omitempty"`
	Status         string `json:"status,omitempty"`
	IsPersonal     *bool  `json:"is_personal,omitempty"`
	OpeningBalance string `json:"opening_balance,omitempty"`
}

type BankAccountResponse

type BankAccountResponse struct {
	BankAccount BankAccount `json:"bank_account"`
}

type BankAccountsResponse

type BankAccountsResponse struct {
	BankAccounts []BankAccount `json:"bank_accounts"`
}

type BankTransaction

type BankTransaction struct {
	URL                         string `json:"url"`
	BankAccount                 string `json:"bank_account"`
	DatedOn                     string `json:"dated_on"`
	Description                 string `json:"description"`
	Amount                      string `json:"amount"`
	IsManual                    bool   `json:"is_manual"`
	IsLocked                    bool   `json:"is_locked"`
	MarkedForReview             bool   `json:"marked_for_review"`
	BankTransactionExplanations []struct {
		URL string `json:"url"`
	} `json:"bank_transaction_explanations"`
	UpdatedAt string `json:"updated_at"`
	CreatedAt string `json:"created_at"`
}

BankTransaction represents a FreeAgent bank transaction.

type BankTransactionExplanation

type BankTransactionExplanation struct {
	URL             string      `json:"url"`
	BankAccount     string      `json:"bank_account"`
	BankTransaction string      `json:"bank_transaction"`
	Category        string      `json:"category"`
	DatedOn         string      `json:"dated_on"`
	Description     string      `json:"description"`
	GrossValue      string      `json:"gross_value"`
	SalesTaxStatus  string      `json:"sales_tax_status,omitempty"`
	SalesTaxRate    string      `json:"sales_tax_rate,omitempty"`
	MarkedForReview bool        `json:"marked_for_review"`
	IsLocked        bool        `json:"is_locked"`
	IsDeletable     bool        `json:"is_deletable"`
	Attachment      *Attachment `json:"attachment,omitempty"`
	UpdatedAt       string      `json:"updated_at"`
	CreatedAt       string      `json:"created_at"`
}

BankTransactionExplanation represents a FreeAgent bank transaction explanation.

type BankTransactionExplanationInput

type BankTransactionExplanationInput struct {
	BankTransaction string           `json:"bank_transaction,omitempty"`
	DatedOn         string           `json:"dated_on,omitempty"`
	Description     string           `json:"description,omitempty"`
	GrossValue      string           `json:"gross_value,omitempty"`
	Category        string           `json:"category,omitempty"`
	SalesTaxStatus  string           `json:"sales_tax_status,omitempty"`
	SalesTaxRate    string           `json:"sales_tax_rate,omitempty"`
	Project         string           `json:"project,omitempty"`
	MarkedForReview *bool            `json:"marked_for_review,omitempty"`
	Attachment      *AttachmentInput `json:"attachment,omitempty"`
}

type BankTransactionExplanationResponse

type BankTransactionExplanationResponse struct {
	BankTransactionExplanation BankTransactionExplanation `json:"bank_transaction_explanation"`
}

type BankTransactionExplanationsResponse

type BankTransactionExplanationsResponse struct {
	BankTransactionExplanations []BankTransactionExplanation `json:"bank_transaction_explanations"`
}

type BankTransactionResponse

type BankTransactionResponse struct {
	BankTransaction BankTransaction `json:"bank_transaction"`
}

type BankTransactionsResponse

type BankTransactionsResponse struct {
	BankTransactions []BankTransaction `json:"bank_transactions"`
}

type Bill

type Bill struct {
	URL           string      `json:"url"`
	Contact       string      `json:"contact"`
	ContactName   string      `json:"contact_name"`
	Reference     string      `json:"reference"`
	DatedOn       string      `json:"dated_on"`
	DueOn         string      `json:"due_on"`
	Currency      string      `json:"currency"`
	TotalValue    string      `json:"total_value"`
	NetValue      string      `json:"net_value"`
	PaidValue     string      `json:"paid_value"`
	DueValue      string      `json:"due_value"`
	SalesTaxValue string      `json:"sales_tax_value"`
	Status        string      `json:"status"`
	IsLocked      bool        `json:"is_locked"`
	BillItems     []BillItem  `json:"bill_items,omitempty"`
	Attachment    *Attachment `json:"attachment,omitempty"`
	UpdatedAt     string      `json:"updated_at"`
	CreatedAt     string      `json:"created_at"`
}

Bill represents a FreeAgent bill.

type BillInput

type BillInput struct {
	Contact     string           `json:"contact,omitempty"`
	DatedOn     string           `json:"dated_on,omitempty"`
	DueOn       string           `json:"due_on,omitempty"`
	Reference   string           `json:"reference,omitempty"`
	Currency    string           `json:"currency,omitempty"`
	SaleTaxRate string           `json:"sales_tax_rate,omitempty"`
	TotalValue  string           `json:"total_value,omitempty"`
	BillItems   []BillItemInput  `json:"bill_items,omitempty"`
	Attachment  *AttachmentInput `json:"attachment,omitempty"`
}

type BillItem

type BillItem struct {
	URL            string `json:"url,omitempty"`
	Bill           string `json:"bill,omitempty"`
	Description    string `json:"description"`
	Quantity       string `json:"quantity"`
	TotalValue     string `json:"total_value"`
	Category       string `json:"category"`
	SalesTaxStatus string `json:"sales_tax_status"`
	SalesTaxRate   string `json:"sales_tax_rate"`
	SalesTaxValue  string `json:"sales_tax_value"`
}

BillItem represents a line item on a bill.

type BillItemInput

type BillItemInput struct {
	Description    string `json:"description,omitempty"`
	Quantity       string `json:"quantity,omitempty"`
	Price          string `json:"price,omitempty"`
	Category       string `json:"category,omitempty"`
	SalesTaxStatus string `json:"sales_tax_status,omitempty"`
	SalesTaxRate   string `json:"sales_tax_rate,omitempty"`
}

type BillResponse

type BillResponse struct {
	Bill Bill `json:"bill"`
}

type BillsResponse

type BillsResponse struct {
	Bills []Bill `json:"bills"`
}

type CISBand

type CISBand struct {
	URL  string `json:"url"`
	Name string `json:"name"`
	Rate string `json:"rate"`
}

type CISBandsResponse

type CISBandsResponse struct {
	CISBands []CISBand `json:"cis_bands"`
}

type CapitalAsset

type CapitalAsset struct {
	URL         string `json:"url"`
	Description string `json:"description"`
	PurchasedOn string `json:"purchased_on"`
	Value       string `json:"value"`
	Status      string `json:"status"`
}

type CapitalAssetResponse

type CapitalAssetResponse struct {
	CapitalAsset CapitalAsset `json:"capital_asset"`
}

type CapitalAssetType

type CapitalAssetType struct {
	URL  string `json:"url"`
	Name string `json:"name"`
}

type CapitalAssetTypeInput

type CapitalAssetTypeInput struct {
	Name string `json:"name,omitempty"`
}

type CapitalAssetTypeResponse

type CapitalAssetTypeResponse struct {
	CapitalAssetType CapitalAssetType `json:"capital_asset_type"`
}

type CapitalAssetTypesResponse

type CapitalAssetTypesResponse struct {
	CapitalAssetTypes []CapitalAssetType `json:"capital_asset_types"`
}

type CapitalAssetsResponse

type CapitalAssetsResponse struct {
	CapitalAssets []CapitalAsset `json:"capital_assets"`
}

type CategoriesResponse

type CategoriesResponse struct {
	Categories []Category `json:"categories"`
}

type Category

type Category struct {
	URL              string `json:"url"`
	Description      string `json:"description"`
	NominalCode      string `json:"nominal_code"`
	CategoryGroup    string `json:"category_group"`
	AllowableForTax  bool   `json:"allowable_for_tax"`
	AutoSalesTaxRate string `json:"auto_sales_tax_rate"`
	TaxReportingName string `json:"tax_reporting_name"`
}

type CategoryInput

type CategoryInput struct {
	Description      string `json:"description,omitempty"`
	NominalCode      string `json:"nominal_code,omitempty"`
	CategoryGroup    string `json:"category_group,omitempty"`
	AllowableForTax  *bool  `json:"allowable_for_tax,omitempty"`
	AutoSalesTaxRate string `json:"auto_sales_tax_rate,omitempty"`
	TaxReportingName string `json:"tax_reporting_name,omitempty"`
}

type CategoryResponse

type CategoryResponse struct {
	Category Category `json:"category"`
}

type Client

type Client struct {
	URL  string `json:"url"`
	Name string `json:"name"`
}

type ClientsResponse

type ClientsResponse struct {
	Clients []Client `json:"clients"`
}

type Company

type Company struct {
	URL          string `json:"url"`
	Name         string `json:"name"`
	Type         string `json:"type"`
	CurrencyCode string `json:"currency_code"`
	MileageUnits string `json:"mileage_units"`
	UpdatedAt    string `json:"updated_at"`
}

type CompanyResponse

type CompanyResponse struct {
	Company Company `json:"company"`
}

type Contact

type Contact struct {
	URL              string `json:"url"`
	OrganisationName string `json:"organisation_name"`
	FirstName        string `json:"first_name"`
	LastName         string `json:"last_name"`
	Email            string `json:"email"`
	BillingEmail     string `json:"billing_email"`
	PhoneNumber      string `json:"phone_number"`
	Mobile           string `json:"mobile"`
	Address1         string `json:"address1"`
	Address2         string `json:"address2"`
	Address3         string `json:"address3"`
	Town             string `json:"town"`
	Region           string `json:"region"`
	Postcode         string `json:"postcode"`
	Country          string `json:"country"`
	UpdatedAt        string `json:"updated_at"`
	CreatedAt        string `json:"created_at"`
	DisplayName      string `json:"display_name,omitempty"`
}

Contact represents a FreeAgent contact.

type ContactInput

type ContactInput struct {
	OrganisationName string `json:"organisation_name,omitempty"`
	FirstName        string `json:"first_name,omitempty"`
	LastName         string `json:"last_name,omitempty"`
	Email            string `json:"email,omitempty"`
	BillingEmail     string `json:"billing_email,omitempty"`
	PhoneNumber      string `json:"phone_number,omitempty"`
	Mobile           string `json:"mobile,omitempty"`
	Address1         string `json:"address1,omitempty"`
	Address2         string `json:"address2,omitempty"`
	Address3         string `json:"address3,omitempty"`
	Town             string `json:"town,omitempty"`
	Region           string `json:"region,omitempty"`
	Postcode         string `json:"postcode,omitempty"`
	Country          string `json:"country,omitempty"`
}

type ContactResponse

type ContactResponse struct {
	Contact Contact `json:"contact"`
}

type ContactsResponse

type ContactsResponse struct {
	Contacts []Contact `json:"contacts"`
}

type CreateBankAccountRequest

type CreateBankAccountRequest struct {
	BankAccount BankAccountInput `json:"bank_account"`
}

type CreateBankTransactionExplanationRequest

type CreateBankTransactionExplanationRequest struct {
	BankTransactionExplanation BankTransactionExplanationInput `json:"bank_transaction_explanation"`
}

type CreateBillRequest

type CreateBillRequest struct {
	Bill BillInput `json:"bill"`
}

type CreateCapitalAssetTypeRequest

type CreateCapitalAssetTypeRequest struct {
	CapitalAssetType CapitalAssetTypeInput `json:"capital_asset_type"`
}

type CreateCategoryRequest

type CreateCategoryRequest struct {
	Category CategoryInput `json:"category"`
}

type CreateContactRequest

type CreateContactRequest struct {
	Contact ContactInput `json:"contact"`
}

type CreateCreditNoteReconciliationRequest

type CreateCreditNoteReconciliationRequest struct {
	CreditNoteReconciliation CreditNoteReconciliationInput `json:"credit_note_reconciliation"`
}

type CreateCreditNoteRequest

type CreateCreditNoteRequest struct {
	CreditNote CreditNoteInput `json:"credit_note"`
}

type CreateEstimateRequest

type CreateEstimateRequest struct {
	Estimate EstimateInput `json:"estimate"`
}

type CreateExpenseRequest

type CreateExpenseRequest struct {
	Expense ExpenseInput `json:"expense"`
}

type CreateJournalSetRequest

type CreateJournalSetRequest struct {
	JournalSet JournalSetInput `json:"journal_set"`
}

type CreateNoteRequest

type CreateNoteRequest struct {
	Note NoteInput `json:"note"`
}

type CreateProjectRequest

type CreateProjectRequest struct {
	Project ProjectInput `json:"project"`
}

type CreatePropertyRequest

type CreatePropertyRequest struct {
	Property PropertyInput `json:"property"`
}

type CreateSalesTaxPeriodRequest

type CreateSalesTaxPeriodRequest struct {
	SalesTaxPeriod SalesTaxPeriodInput `json:"sales_tax_period"`
}

type CreateTaskRequest

type CreateTaskRequest struct {
	Task TaskInput `json:"task"`
}

type CreateTimeslipRequest

type CreateTimeslipRequest struct {
	Timeslip TimeslipInput `json:"timeslip"`
}

type CreateUserRequest

type CreateUserRequest struct {
	User UserInput `json:"user"`
}

type CreditNote

type CreditNote struct {
	URL             string           `json:"url"`
	Contact         string           `json:"contact"`
	Currency        string           `json:"currency"`
	DatedOn         string           `json:"dated_on"`
	Reference       string           `json:"reference"`
	Status          string           `json:"status"`
	TotalValue      string           `json:"total_value"`
	CreditNoteItems []CreditNoteItem `json:"credit_note_items"`
}

type CreditNoteInput

type CreditNoteInput struct {
	Contact            string                `json:"contact,omitempty"`
	Currency           string                `json:"currency,omitempty"`
	DatedOn            string                `json:"dated_on,omitempty"`
	DueOn              string                `json:"due_on,omitempty"`
	PaymentTermsInDays int                   `json:"payment_terms_in_days,omitempty"`
	CreditNoteItems    []CreditNoteItemInput `json:"credit_note_items,omitempty"`
}

type CreditNoteItem

type CreditNoteItem struct {
	URL         string `json:"url"`
	Description string `json:"description"`
	Price       string `json:"price"`
	Quantity    string `json:"quantity"`
}

type CreditNoteItemInput

type CreditNoteItemInput struct {
	Description string `json:"description,omitempty"`
	Price       string `json:"price,omitempty"`
	Quantity    string `json:"quantity,omitempty"`
}

type CreditNoteReconciliation

type CreditNoteReconciliation struct {
	URL        string `json:"url"`
	CreditNote string `json:"credit_note"`
	Invoice    string `json:"invoice"`
	Currency   string `json:"currency"`
	DatedOn    string `json:"dated_on"`
	GrossValue string `json:"gross_value"`
}

type CreditNoteReconciliationInput

type CreditNoteReconciliationInput struct {
	CreditNote   string `json:"credit_note,omitempty"`
	Invoice      string `json:"invoice,omitempty"`
	Currency     string `json:"currency,omitempty"`
	DatedOn      string `json:"dated_on,omitempty"`
	GrossValue   string `json:"gross_value,omitempty"`
	ExchangeRate string `json:"exchange_rate,omitempty"`
}

type CreditNoteReconciliationResponse

type CreditNoteReconciliationResponse struct {
	CreditNoteReconciliation CreditNoteReconciliation `json:"credit_note_reconciliation"`
}

type CreditNoteReconciliationsResponse

type CreditNoteReconciliationsResponse struct {
	CreditNoteReconciliations []CreditNoteReconciliation `json:"credit_note_reconciliations"`
}

type CreditNoteResponse

type CreditNoteResponse struct {
	CreditNote CreditNote `json:"credit_note"`
}

type CreditNotesResponse

type CreditNotesResponse struct {
	CreditNotes []CreditNote `json:"credit_notes"`
}

type EmailAddress

type EmailAddress struct {
	Address string `json:"address"`
}

type EmailAddressesResponse

type EmailAddressesResponse struct {
	EmailAddresses []EmailAddress `json:"email_addresses"`
}

type Estimate

type Estimate struct {
	URL           string         `json:"url"`
	Contact       string         `json:"contact"`
	Currency      string         `json:"currency"`
	DatedOn       string         `json:"dated_on"`
	DueOn         string         `json:"due_on"`
	Reference     string         `json:"reference"`
	Status        string         `json:"status"`
	EstimateType  string         `json:"estimate_type"`
	TotalValue    string         `json:"total_value"`
	EstimateItems []EstimateItem `json:"estimate_items"`
}

type EstimateInput

type EstimateInput struct {
	Contact      string `json:"contact,omitempty"`
	Currency     string `json:"currency,omitempty"`
	DatedOn      string `json:"dated_on,omitempty"`
	DueOn        string `json:"due_on,omitempty"`
	EstimateType string `json:"estimate_type,omitempty"`
	Status       string `json:"status,omitempty"`
}

type EstimateItem

type EstimateItem struct {
	URL         string `json:"url"`
	Description string `json:"description"`
	Price       string `json:"price"`
	Quantity    string `json:"quantity"`
	ItemType    string `json:"item_type"`
	Position    int    `json:"position"`
}

type EstimateItemInput

type EstimateItemInput struct {
	Description string `json:"description,omitempty"`
	Price       string `json:"price,omitempty"`
	Quantity    string `json:"quantity,omitempty"`
	ItemType    string `json:"item_type,omitempty"`
	Position    int    `json:"position,omitempty"`
	Category    string `json:"category,omitempty"`
}

type EstimateResponse

type EstimateResponse struct {
	Estimate Estimate `json:"estimate"`
}

type EstimatesResponse

type EstimatesResponse struct {
	Estimates []Estimate `json:"estimates"`
}

type Expense

type Expense struct {
	URL            string      `json:"url"`
	User           string      `json:"user"`
	Category       string      `json:"category"`
	DatedOn        string      `json:"dated_on"`
	Currency       string      `json:"currency"`
	GrossValue     string      `json:"gross_value"`
	SalesTaxStatus string      `json:"sales_tax_status"`
	SalesTaxRate   string      `json:"sales_tax_rate"`
	SalesTaxValue  string      `json:"sales_tax_value"`
	Description    string      `json:"description"`
	Attachment     *Attachment `json:"attachment,omitempty"`
	IsLocked       bool        `json:"is_locked"`
	UpdatedAt      string      `json:"updated_at"`
	CreatedAt      string      `json:"created_at"`
}

Expense represents a FreeAgent expense.

type ExpenseInput

type ExpenseInput struct {
	User           string           `json:"user,omitempty"`
	Category       string           `json:"category,omitempty"`
	DatedOn        string           `json:"dated_on,omitempty"`
	Currency       string           `json:"currency,omitempty"`
	GrossValue     string           `json:"gross_value,omitempty"`
	SalesTaxStatus string           `json:"sales_tax_status,omitempty"`
	SalesTaxRate   string           `json:"sales_tax_rate,omitempty"`
	Description    string           `json:"description,omitempty"`
	Project        string           `json:"project,omitempty"`
	Attachment     *AttachmentInput `json:"attachment,omitempty"`
}

type ExpenseResponse

type ExpenseResponse struct {
	Expense Expense `json:"expense"`
}

type ExpensesResponse

type ExpensesResponse struct {
	Expenses []Expense `json:"expenses"`
}

type Invoice

type Invoice struct {
	URL                string        `json:"url"`
	Contact            string        `json:"contact"`
	Reference          string        `json:"reference"`
	DatedOn            string        `json:"dated_on"`
	DueOn              string        `json:"due_on"`
	Currency           string        `json:"currency"`
	TotalValue         string        `json:"total_value"`
	NetValue           string        `json:"net_value"`
	SalesTaxValue      string        `json:"sales_tax_value"`
	Status             string        `json:"status"`
	PaymentTermsInDays int           `json:"payment_terms_in_days"`
	InvoiceItems       []InvoiceItem `json:"invoice_items,omitempty"`
	UpdatedAt          string        `json:"updated_at"`
	CreatedAt          string        `json:"created_at"`
}

Invoice represents a FreeAgent invoice.

type InvoiceItem

type InvoiceItem struct {
	URL            string `json:"url"`
	Description    string `json:"description"`
	Quantity       string `json:"quantity"`
	Price          string `json:"price"`
	Category       string `json:"category"`
	SalesTaxStatus string `json:"sales_tax_status"`
	SalesTaxRate   string `json:"sales_tax_rate"`
}

InvoiceItem represents a line item on an invoice returned by the API.

type InvoiceItemInput

type InvoiceItemInput struct {
	URL            string `json:"url,omitempty"`
	Description    string `json:"description,omitempty"`
	Quantity       string `json:"quantity,omitempty"`
	Price          string `json:"price,omitempty"`
	Category       string `json:"category,omitempty"`
	SalesTaxStatus string `json:"sales_tax_status,omitempty"`
	SalesTaxRate   string `json:"sales_tax_rate,omitempty"`
}

InvoiceItemInput is used when creating or updating invoice line items.

type InvoiceResponse

type InvoiceResponse struct {
	Invoice Invoice `json:"invoice"`
}

type InvoicesResponse

type InvoicesResponse struct {
	Invoices []Invoice `json:"invoices"`
}

type JournalEntry

type JournalEntry struct {
	URL         string `json:"url"`
	Category    string `json:"category"`
	DebitValue  string `json:"debit_value"`
	Description string `json:"description"`
	User        string `json:"user"`
}

type JournalEntryInput

type JournalEntryInput struct {
	Category    string `json:"category,omitempty"`
	DebitValue  string `json:"debit_value,omitempty"`
	Description string `json:"description,omitempty"`
	User        string `json:"user,omitempty"`
}

type JournalSet

type JournalSet struct {
	URL            string         `json:"url"`
	DatedOn        string         `json:"dated_on"`
	Description    string         `json:"description"`
	Tag            string         `json:"tag"`
	JournalEntries []JournalEntry `json:"journal_entries"`
}

type JournalSetInput

type JournalSetInput struct {
	DatedOn        string              `json:"dated_on,omitempty"`
	Description    string              `json:"description,omitempty"`
	Tag            string              `json:"tag,omitempty"`
	JournalEntries []JournalEntryInput `json:"journal_entries,omitempty"`
}

type JournalSetResponse

type JournalSetResponse struct {
	JournalSet JournalSet `json:"journal_set"`
}

type JournalSetsResponse

type JournalSetsResponse struct {
	JournalSets []JournalSet `json:"journal_sets"`
}

type Note

type Note struct {
	URL       string `json:"url"`
	Note      string `json:"note"`
	Author    string `json:"author"`
	ParentURL string `json:"parent_url"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type NoteInput

type NoteInput struct {
	Note      string `json:"note,omitempty"`
	ParentURL string `json:"parent_url,omitempty"`
}

type NoteResponse

type NoteResponse struct {
	Note Note `json:"note"`
}

type NotesResponse

type NotesResponse struct {
	Notes []Note `json:"notes"`
}

type PriceListItem

type PriceListItem struct {
	URL         string `json:"url"`
	Description string `json:"description"`
	Price       string `json:"price"`
}

type PriceListItemResponse

type PriceListItemResponse struct {
	PriceListItem PriceListItem `json:"price_list_item"`
}

type PriceListItemsResponse

type PriceListItemsResponse struct {
	PriceListItems []PriceListItem `json:"price_list_items"`
}

type Project

type Project struct {
	URL               string `json:"url"`
	Name              string `json:"name"`
	Contact           string `json:"contact"`
	ContactName       string `json:"contact_name"`
	Currency          string `json:"currency"`
	Status            string `json:"status"`
	StartsOn          string `json:"starts_on"`
	EndsOn            string `json:"ends_on"`
	NormalBillingRate string `json:"normal_billing_rate"`
	BillingPeriod     string `json:"billing_period"`
	IsIR35            bool   `json:"is_ir35"`
	UpdatedAt         string `json:"updated_at"`
	CreatedAt         string `json:"created_at"`
}

Project represents a FreeAgent project.

type ProjectInput

type ProjectInput struct {
	Name              string `json:"name,omitempty"`
	Contact           string `json:"contact,omitempty"`
	Currency          string `json:"currency,omitempty"`
	Status            string `json:"status,omitempty"`
	StartsOn          string `json:"starts_on,omitempty"`
	EndsOn            string `json:"ends_on,omitempty"`
	NormalBillingRate string `json:"normal_billing_rate,omitempty"`
	BillingPeriod     string `json:"billing_period,omitempty"`
	IsIR35            *bool  `json:"is_ir35,omitempty"`
}

type ProjectResponse

type ProjectResponse struct {
	Project Project `json:"project"`
}

type ProjectsResponse

type ProjectsResponse struct {
	Projects []Project `json:"projects"`
}

type PropertiesResponse

type PropertiesResponse struct {
	Properties []Property `json:"properties"`
}

type Property

type Property struct {
	URL      string `json:"url"`
	Address1 string `json:"address1"`
	Address2 string `json:"address2"`
	Town     string `json:"town"`
	Region   string `json:"region"`
	Country  string `json:"country"`
}

type PropertyInput

type PropertyInput struct {
	Address1 string `json:"address1,omitempty"`
	Address2 string `json:"address2,omitempty"`
	Town     string `json:"town,omitempty"`
	Region   string `json:"region,omitempty"`
	Country  string `json:"country,omitempty"`
}

type PropertyResponse

type PropertyResponse struct {
	Property Property `json:"property"`
}

type RecurringInvoice

type RecurringInvoice struct {
	URL        string `json:"url"`
	Contact    string `json:"contact"`
	Currency   string `json:"currency"`
	Status     string `json:"status"`
	TotalValue string `json:"total_value"`
}

type RecurringInvoiceResponse

type RecurringInvoiceResponse struct {
	RecurringInvoice RecurringInvoice `json:"recurring_invoice"`
}

type RecurringInvoicesResponse

type RecurringInvoicesResponse struct {
	RecurringInvoices []RecurringInvoice `json:"recurring_invoices"`
}

type SalesTaxPeriod

type SalesTaxPeriod struct {
	URL                        string `json:"url"`
	EffectiveDate              string `json:"effective_date"`
	SalesTaxName               string `json:"sales_tax_name"`
	SalesTaxRate1              string `json:"sales_tax_rate_1"`
	SalesTaxRegistrationNumber string `json:"sales_tax_registration_number"`
}

type SalesTaxPeriodInput

type SalesTaxPeriodInput struct {
	EffectiveDate              string `json:"effective_date,omitempty"`
	SalesTaxName               string `json:"sales_tax_name,omitempty"`
	SalesTaxRate1              string `json:"sales_tax_rate_1,omitempty"`
	SalesTaxRegistrationNumber string `json:"sales_tax_registration_number,omitempty"`
}

type SalesTaxPeriodResponse

type SalesTaxPeriodResponse struct {
	SalesTaxPeriod SalesTaxPeriod `json:"sales_tax_period"`
}

type SalesTaxPeriodsResponse

type SalesTaxPeriodsResponse struct {
	SalesTaxPeriods []SalesTaxPeriod `json:"sales_tax_periods"`
}

type StockItem

type StockItem struct {
	URL         string `json:"url"`
	Description string `json:"description"`
	ItemCode    string `json:"item_code"`
	SalesPrice  string `json:"sales_price"`
}

type StockItemResponse

type StockItemResponse struct {
	StockItem StockItem `json:"stock_item"`
}

type StockItemsResponse

type StockItemsResponse struct {
	StockItems []StockItem `json:"stock_items"`
}

type Task

type Task struct {
	URL           string `json:"url"`
	Project       string `json:"project"`
	Name          string `json:"name"`
	Currency      string `json:"currency"`
	IsBillable    bool   `json:"is_billable"`
	BillingRate   string `json:"billing_rate"`
	BillingPeriod string `json:"billing_period"`
	Status        string `json:"status"`
	IsDeletable   bool   `json:"is_deletable"`
	UpdatedAt     string `json:"updated_at"`
	CreatedAt     string `json:"created_at"`
}

Task represents a FreeAgent task.

type TaskInput

type TaskInput struct {
	Project       string `json:"project,omitempty"`
	Name          string `json:"name,omitempty"`
	IsBillable    *bool  `json:"is_billable,omitempty"`
	BillingRate   string `json:"billing_rate,omitempty"`
	BillingPeriod string `json:"billing_period,omitempty"`
	Status        string `json:"status,omitempty"`
}

type TaskResponse

type TaskResponse struct {
	Task Task `json:"task"`
}

type TasksResponse

type TasksResponse struct {
	Tasks []Task `json:"tasks"`
}

type Timeslip

type Timeslip struct {
	URL       string `json:"url"`
	User      string `json:"user"`
	Project   string `json:"project"`
	Task      string `json:"task"`
	DatedOn   string `json:"dated_on"`
	Hours     string `json:"hours"`
	Comment   string `json:"comment,omitempty"`
	UpdatedAt string `json:"updated_at"`
	CreatedAt string `json:"created_at"`
}

Timeslip represents a FreeAgent timeslip.

type TimeslipInput

type TimeslipInput struct {
	Project string `json:"project,omitempty"`
	Task    string `json:"task,omitempty"`
	User    string `json:"user,omitempty"`
	DatedOn string `json:"dated_on,omitempty"`
	Hours   string `json:"hours,omitempty"`
	Comment string `json:"comment,omitempty"`
}

type TimeslipResponse

type TimeslipResponse struct {
	Timeslip Timeslip `json:"timeslip"`
}

type TimeslipsResponse

type TimeslipsResponse struct {
	Timeslips []Timeslip `json:"timeslips"`
}

type UpdateBankAccountRequest

type UpdateBankAccountRequest struct {
	BankAccount BankAccountInput `json:"bank_account"`
}

type UpdateBankTransactionExplanationRequest

type UpdateBankTransactionExplanationRequest struct {
	BankTransactionExplanation BankTransactionExplanationInput `json:"bank_transaction_explanation"`
}

type UpdateBillRequest

type UpdateBillRequest struct {
	Bill BillInput `json:"bill"`
}

type UpdateCapitalAssetTypeRequest

type UpdateCapitalAssetTypeRequest struct {
	CapitalAssetType CapitalAssetTypeInput `json:"capital_asset_type"`
}

type UpdateCategoryRequest

type UpdateCategoryRequest struct {
	Category CategoryInput `json:"category"`
}

type UpdateContactRequest

type UpdateContactRequest struct {
	Contact ContactInput `json:"contact"`
}

type UpdateCreditNoteReconciliationRequest

type UpdateCreditNoteReconciliationRequest struct {
	CreditNoteReconciliation CreditNoteReconciliationInput `json:"credit_note_reconciliation"`
}

type UpdateCreditNoteRequest

type UpdateCreditNoteRequest struct {
	CreditNote CreditNoteInput `json:"credit_note"`
}

type UpdateEstimateRequest

type UpdateEstimateRequest struct {
	Estimate EstimateInput `json:"estimate"`
}

type UpdateExpenseRequest

type UpdateExpenseRequest struct {
	Expense ExpenseInput `json:"expense"`
}

type UpdateJournalSetRequest

type UpdateJournalSetRequest struct {
	JournalSet JournalSetInput `json:"journal_set"`
}

type UpdateNoteRequest

type UpdateNoteRequest struct {
	Note NoteInput `json:"note"`
}

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Project ProjectInput `json:"project"`
}

type UpdatePropertyRequest

type UpdatePropertyRequest struct {
	Property PropertyInput `json:"property"`
}

type UpdateSalesTaxPeriodRequest

type UpdateSalesTaxPeriodRequest struct {
	SalesTaxPeriod SalesTaxPeriodInput `json:"sales_tax_period"`
}

type UpdateTaskRequest

type UpdateTaskRequest struct {
	Task TaskInput `json:"task"`
}

type UpdateTimeslipRequest

type UpdateTimeslipRequest struct {
	Timeslip TimeslipInput `json:"timeslip"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	User UserInput `json:"user"`
}

type User

type User struct {
	URL       string `json:"url"`
	Email     string `json:"email"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Role      string `json:"role"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type UserInput

type UserInput struct {
	Email     string `json:"email,omitempty"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	Role      string `json:"role,omitempty"`
}

type UserResponse

type UserResponse struct {
	User User `json:"user"`
}

type UsersResponse

type UsersResponse struct {
	Users []User `json:"users"`
}

Jump to

Keyboard shortcuts

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