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 ¶
- type AccountManager
- type AccountManagerResponse
- type AccountManagersResponse
- type Attachment
- type AttachmentInput
- type BankAccount
- type BankAccountInput
- type BankAccountResponse
- type BankAccountsResponse
- type BankTransaction
- type BankTransactionExplanation
- type BankTransactionExplanationInput
- type BankTransactionExplanationResponse
- type BankTransactionExplanationsResponse
- type BankTransactionResponse
- type BankTransactionsResponse
- type Bill
- type BillInput
- type BillItem
- type BillItemInput
- type BillResponse
- type BillsResponse
- type CISBand
- type CISBandsResponse
- type CapitalAsset
- type CapitalAssetResponse
- type CapitalAssetType
- type CapitalAssetTypeInput
- type CapitalAssetTypeResponse
- type CapitalAssetTypesResponse
- type CapitalAssetsResponse
- type CategoriesResponse
- type Category
- type CategoryInput
- type CategoryResponse
- type Client
- type ClientsResponse
- type Company
- type CompanyResponse
- type Contact
- type ContactInput
- type ContactResponse
- type ContactsResponse
- type CreateBankAccountRequest
- type CreateBankTransactionExplanationRequest
- type CreateBillRequest
- type CreateCapitalAssetTypeRequest
- type CreateCategoryRequest
- type CreateContactRequest
- type CreateCreditNoteReconciliationRequest
- type CreateCreditNoteRequest
- type CreateEstimateRequest
- type CreateExpenseRequest
- type CreateJournalSetRequest
- type CreateNoteRequest
- type CreateProjectRequest
- type CreatePropertyRequest
- type CreateSalesTaxPeriodRequest
- type CreateTaskRequest
- type CreateTimeslipRequest
- type CreateUserRequest
- type CreditNote
- type CreditNoteInput
- type CreditNoteItem
- type CreditNoteItemInput
- type CreditNoteReconciliation
- type CreditNoteReconciliationInput
- type CreditNoteReconciliationResponse
- type CreditNoteReconciliationsResponse
- type CreditNoteResponse
- type CreditNotesResponse
- type EmailAddress
- type EmailAddressesResponse
- type Estimate
- type EstimateInput
- type EstimateItem
- type EstimateItemInput
- type EstimateResponse
- type EstimatesResponse
- type Expense
- type ExpenseInput
- type ExpenseResponse
- type ExpensesResponse
- type Invoice
- type InvoiceItem
- type InvoiceItemInput
- type InvoiceResponse
- type InvoicesResponse
- type JournalEntry
- type JournalEntryInput
- type JournalSet
- type JournalSetInput
- type JournalSetResponse
- type JournalSetsResponse
- type Note
- type NoteInput
- type NoteResponse
- type NotesResponse
- type PriceListItem
- type PriceListItemResponse
- type PriceListItemsResponse
- type Project
- type ProjectInput
- type ProjectResponse
- type ProjectsResponse
- type PropertiesResponse
- type Property
- type PropertyInput
- type PropertyResponse
- type RecurringInvoice
- type RecurringInvoiceResponse
- type RecurringInvoicesResponse
- type SalesTaxPeriod
- type SalesTaxPeriodInput
- type SalesTaxPeriodResponse
- type SalesTaxPeriodsResponse
- type StockItem
- type StockItemResponse
- type StockItemsResponse
- type Task
- type TaskInput
- type TaskResponse
- type TasksResponse
- type Timeslip
- type TimeslipInput
- type TimeslipResponse
- type TimeslipsResponse
- type UpdateBankAccountRequest
- type UpdateBankTransactionExplanationRequest
- type UpdateBillRequest
- type UpdateCapitalAssetTypeRequest
- type UpdateCategoryRequest
- type UpdateContactRequest
- type UpdateCreditNoteReconciliationRequest
- type UpdateCreditNoteRequest
- type UpdateEstimateRequest
- type UpdateExpenseRequest
- type UpdateJournalSetRequest
- type UpdateNoteRequest
- type UpdateProjectRequest
- type UpdatePropertyRequest
- type UpdateSalesTaxPeriodRequest
- type UpdateTaskRequest
- type UpdateTimeslipRequest
- type UpdateUserRequest
- type User
- type UserInput
- type UserResponse
- type UsersResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountManager ¶
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 BankAccountInput ¶
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 CISBandsResponse ¶
type CISBandsResponse struct {
CISBands []CISBand `json:"cis_bands"`
}
type CapitalAsset ¶
type CapitalAssetResponse ¶
type CapitalAssetResponse struct {
CapitalAsset CapitalAsset `json:"capital_asset"`
}
type CapitalAssetType ¶
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 ClientsResponse ¶
type ClientsResponse struct {
Clients []Client `json:"clients"`
}
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 CreditNoteItemInput ¶
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 EstimateItem ¶
type EstimateItemInput ¶
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 JournalEntryInput ¶
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 NoteResponse ¶
type NoteResponse struct {
Note Note `json:"note"`
}
type NotesResponse ¶
type NotesResponse struct {
Notes []Note `json:"notes"`
}
type PriceListItem ¶
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 PropertyInput ¶
type PropertyResponse ¶
type PropertyResponse struct {
Property Property `json:"property"`
}
type RecurringInvoice ¶
type RecurringInvoiceResponse ¶
type RecurringInvoiceResponse struct {
RecurringInvoice RecurringInvoice `json:"recurring_invoice"`
}
type RecurringInvoicesResponse ¶
type RecurringInvoicesResponse struct {
RecurringInvoices []RecurringInvoice `json:"recurring_invoices"`
}
type SalesTaxPeriod ¶
type SalesTaxPeriodInput ¶
type SalesTaxPeriodResponse ¶
type SalesTaxPeriodResponse struct {
SalesTaxPeriod SalesTaxPeriod `json:"sales_tax_period"`
}
type SalesTaxPeriodsResponse ¶
type SalesTaxPeriodsResponse struct {
SalesTaxPeriods []SalesTaxPeriod `json:"sales_tax_periods"`
}
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 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 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 UserResponse ¶
type UserResponse struct {
User User `json:"user"`
}
type UsersResponse ¶
type UsersResponse struct {
Users []User `json:"users"`
}