Documentation ¶
Index ¶
- Constants
- type Currency
- type FinanceAccount
- type FinanceAccountType
- type FinancialEntityID
- type FinancialEntityIDID
- type FinancialEntityIDType
- type FinancialEntityIdentifier
- type FinancialIdentifierExportStatus
- type FinancialsClient
- type Invoice
- type InvoiceDetails
- type InvoiceNumber
- type ItemCode
- type ItemID
- type LineItem
- type ListInvoicesResponse
Constants ¶
View Source
const EUR = Currency("EUR")
View Source
const FinancialEntityIDTypeCREDIT_NOTE = FinancialEntityIDType("CREDIT_NOTE")
View Source
const FinancialEntityIDTypeFINANCE_ACCOUNT = FinancialEntityIDType("FINANCE_ACCOUNT")
View Source
const FinancialEntityIDTypeINVOICE = FinancialEntityIDType("INVOICE")
View Source
const FinancialEntityIDTypePAYMENT = FinancialEntityIDType("PAYMENT")
View Source
const FinancialEntityIDTypePURCHASE_CREDIT_NOTE = FinancialEntityIDType("PURCHASE_CREDIT_NOTE")
View Source
const FinancialEntityIDTypePURCHASE_INVOICE = FinancialEntityIDType("PURCHASE_INVOICE")
View Source
const FinancialEntityIDTypeREFUND = FinancialEntityIDType("REFUND")
View Source
const FinancialEntityIdExportStatusCREATED = FinancialIdentifierExportStatus("CREATED")
View Source
const FinancialEntityIdExportStatusEXPORTED = FinancialIdentifierExportStatus("EXPORTED")
View Source
const FinancialEntityIdExportStatusFAILED = FinancialIdentifierExportStatus("FAILED")
View Source
const FinancialEntityIdExportStatusIMPORTED = FinancialIdentifierExportStatus("IMPORTED")
View Source
const FinancialEntityIdExportStatusPENDING = FinancialIdentifierExportStatus("PENDING")
View Source
const FinancialEntityIdExportStatusSENT = FinancialIdentifierExportStatus("SENT")
View Source
const FinancialEntityIdExportStatusSKIPPED = FinancialIdentifierExportStatus("SKIPPED")
View Source
const FinancyAccountTypeCompany = FinanceAccountType("COMPANY")
View Source
const FinancyAccountTypeContact = FinanceAccountType("CONTACT")
View Source
const GBP = Currency("GBP")
View Source
const HKD = Currency("HKD")
View Source
const SEK = Currency("SEK")
View Source
const USD = Currency("USD")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FinanceAccount ¶
type FinanceAccount struct { Type FinanceAccountType `json:"type"` AccountNumber string `json:"accountNumber"` ID *FinancialEntityIdentifier `json:"id"` Email string `json:"emailAddress"` AccountName string `json:"accountName"` }
type FinanceAccountType ¶
type FinanceAccountType string
type FinancialEntityID ¶
type FinancialEntityID struct { Type FinancialEntityIDType `json:"type"` ID FinancialEntityIDID `json:"id"` ExternalID string `json:"externalId"` ExportStatus FinancialIdentifierExportStatus `json:"exportStatus"` // ExportDate $date-time ExportDate string `json:"exportDate"` }
type FinancialEntityIDID ¶
type FinancialEntityIDID int
type FinancialEntityIDType ¶
type FinancialEntityIDType string
type FinancialEntityIdentifier ¶
type FinancialEntityIdentifier struct { }
type FinancialIdentifierExportStatus ¶
type FinancialIdentifierExportStatus string
type FinancialsClient ¶
type FinancialsClient interface { ListInvoices(period utils.BookingPeriod, org resharmonics.OrganizationID, pagination *utils.Pagination) ([]*Invoice, error) GetInvoice(invoiceID FinancialEntityIDID) (*Invoice, error) }
func Init ¶
func Init(creds resharmonics.Credentials, preAuthorize bool) (FinancialsClient, error)
type Invoice ¶
type Invoice struct { FinanceAccount *FinanceAccount `json:"financeAccount"` // Number is unique Number InvoiceNumber `json:"invoiceNumber"` ID *FinancialEntityID `json:"id"` TotalNet float64 `json:"totalNet"` TotalVat float64 `json:"totalTax"` Currency Currency `json:"currencyCode"` // InvoiceDate $date, no time InvoiceDate string `json:"invoiceDate"` InvoiceDueDate string `json:"invoiceDueDate"` InvoiceReference string `json:"invoiceReference,omitempty"` Items []LineItem `json:"lineItems"` }
func (*Invoice) ExtractID ¶
func (inv *Invoice) ExtractID() FinancialEntityIDID
type InvoiceDetails ¶
type InvoiceNumber ¶
type InvoiceNumber string
type LineItem ¶
type LineItem struct { ID ItemID `json:"itemId"` Description string `json:"description"` // Code a code that references the product that this line item corresponds to Code ItemCode `json:"itemCode"` // TaxType a mapping element used to specify the tax code used for this line item TaxType string `json:"taxType"` ProductID product.ID `json:"productId"` ProductCode product.Code `json:"productCode"` Quantity float64 `json:"quantity"` UnitPriceNet float64 `json:"unitPriceNet"` TotalNet float64 `json:"totalNet"` TotalTax float64 `json:"totalTax"` CostCenter string `json:"costCenter"` UnitReference string `json:"unitReference"` BookingReference resharmonics.BookingReference `json:"bookingReference"` // ChargeFrom $date ChargeFrom string `json:"chargeFrom"` // ChargeTo $date ChargeTo string `json:"chargeTo"` }
type ListInvoicesResponse ¶
type ListInvoicesResponse struct {
Invoices []*Invoice `json:"invoices"`
}
Click to show internal directories.
Click to hide internal directories.