Documentation
¶
Overview ¶
Updating the master-data of a client-company can be done in bulk using the REST API with JSON data. In general those API endpoints follow an `upsert` logic, meaning that if data records can be identified by an ID or name, they will be updated with the provided data, else new records will be inserted.
For those endpoints we also provide a Go SDK with this package.
Using this Go package to make API requests has the benefit of basic client side validation of the data before sending the request and the client package will always be kept up to date with the API server implementation.
The server is also implemented with Go and uses the standard library JSON parser which is documented here: https://pkg.go.dev/encoding/json
The struct types in in this package define the JSON API where every struct is mapped to a JSON object with the names of the struct fields used as JSON object value names. The Go JSON parser detects object values names case insensitive and object values that are left out in the JSON will have their types' Go zero value after parsing.
Index ¶
- Constants
- func DownloadDocumentPDF(ctx context.Context, apiKey string, docID uu.ID, opts ...DownloadOption) (fs.MemFile, error)
- func PostObjectGroups(ctx context.Context, apiKey string, groups []*ObjectGroup, source string) error
- func PostObjectInstancesWithIDProp(ctx context.Context, apiKey string, className, idPropName string, ...) (err error)
- func PostObjectRoles(ctx context.Context, apiKey string, roles []*ObjectRole, source string) error
- func PostObjectTenantOwners(ctx context.Context, apiKey string, tenantOwners []*ObjectTenantOwner, ...) error
- func PostRealEstateObjects(ctx context.Context, apiKey string, objects []*RealEstateObject, source string) error
- func UploadDocument(ctx context.Context, apiKey string, documentCategory uu.ID, ...) (documentID uu.ID, err error)
- func WithBaseURL(ctx context.Context, baseURL string) context.Context
- func WithHTTPClient(ctx context.Context, client *http.Client) context.Context
- type AccountingItem
- type BankAccount
- type Company
- type CompanyResponse
- type DownloadOption
- type GLAccount
- type ImportBankAccountResult
- type ImportGLAccountResult
- type ImportPartnerResult
- type ImportState
- type Invoice
- type MainLocation
- type ObjectGroup
- type ObjectRole
- type ObjectTenantOwner
- type Partner
- func (p *Partner) ClientAccountNumberUint() uint64
- func (p *Partner) EqualAlternativeNames(names []string) bool
- func (p *Partner) HasLocation() bool
- func (p *Partner) NeedUpsertTaxExemption() bool
- func (p *Partner) Normalize(resetInvalid bool) []error
- func (p *Partner) NormalizedAlternativeNames() []string
- func (p *Partner) String() string
- func (p *Partner) Validate() error
- func (p *Partner) VendorAccountNumberUint() uint64
- type RealEstateObject
- type RealEstateObjectType
Constants ¶
const ( // BaseURL is the base URL for all API endpoints BaseURL = "https://idwell.ai/api/public" GraphqlEndpoint = "/graphql" // SourceTestEndpointNOP can be passed as magical value for // the source argument of the post functions // to test the endpoints without side effects. SourceTestEndpointNOP = "TestEndpointNOP" )
Variables ¶
This section is empty.
Functions ¶
func DownloadDocumentPDF ¶
func DownloadDocumentPDF(ctx context.Context, apiKey string, docID uu.ID, opts ...DownloadOption) (fs.MemFile, error)
DownloadDocumentPDF downloads the PDF file for a document identified by docID. The returned fs.MemFile is named "<docID>.pdf" and contains the PDF bytes.
Use DownloadOption functions to modify the request:
- WithAuditTrail("append"|"prepend"|"configured"|"only")
- WithAuditTrailLang("en"|"de"|...)
- WithEmbedXML()
API endpoint: https://idwell.ai/api/public/document/{docID}.pdf
func PostObjectGroups ¶
func PostObjectGroups(ctx context.Context, apiKey string, groups []*ObjectGroup, source string) error
PostObjectGroups upserts real estate object groups via the iDWELL Finance API.
Arguments:
- ctx: Context for the HTTP request (for cancellation and timeouts)
- apiKey: API key (bearer token) for the iDWELL Finance API
- groups: Object groups to insert or update
- source: String describing the source of the data; use your company or service name
API endpoint: https://idwell.ai/api/public/masterdata/real-estate-object-groups
func PostObjectInstancesWithIDProp ¶
func PostObjectInstancesWithIDProp(ctx context.Context, apiKey string, className, idPropName string, objectsProps []map[string]any, source string) (err error)
PostObjectInstancesWithIDProp updates or inserts instances of the class "className" using the prop idPropName as the identifier for the objects. The objectsProps is a slice of maps, where each map represents the properties of an object. The ID prop with idPropName must be present in each object. The source argument is used to identify the source of the request.
func PostObjectRoles ¶
PostObjectRoles upserts role assignments for real estate objects via the iDWELL Finance API.
Arguments:
- ctx: Context for the HTTP request (for cancellation and timeouts)
- apiKey: API key (bearer token) for the iDWELL Finance API
- roles: Role assignments to insert or update
- source: String describing the source of the data; use your company or service name
API endpoint: https://idwell.ai/api/public/masterdata/real-estate-object-roles
func PostObjectTenantOwners ¶
func PostRealEstateObjects ¶
func PostRealEstateObjects(ctx context.Context, apiKey string, objects []*RealEstateObject, source string) error
PostRealEstateObjects upserts (inserts or updates) real estate objects via the iDWELL Finance API. Objects are identified by their Number field - if an object with the same number exists, it will be updated; otherwise, a new object is created.
Arguments:
- ctx: Context for the HTTP request (for cancellation and timeouts)
- apiKey: API key (bearer token) for authentication
- objects: Slice of real estate objects to import
- source: Optional identifier for the data source (e.g., your company name)
Returns an error if validation fails or the API request fails. The function validates all objects before sending the request.
API endpoint: https://idwell.ai/api/public/masterdata/real-estate-objects
func UploadDocument ¶
func UploadDocument(ctx context.Context, apiKey string, documentCategory uu.ID, documentFile, invoiceFile fs.FileReader, tags ...string) (documentID uu.ID, err error)
UploadDocument uploads a document file (PDF, PNG, JPEG, or TIFF) to create a new document in iDWELL. The document will be processed synchronously (creating/fixing PDF, rendering page images). Invoice data extraction happens asynchronously by default.
Arguments:
- ctx: Context for the HTTP request (for cancellation and timeouts)
- apiKey: API key (bearer token) for authentication
- documentCategory: UUID of the document category (query via GraphQL allDocumentCategories)
- documentFile: Document file to upload (PDF, PNG, JPEG, or TIFF format)
- invoiceFile: Optional JSON file with structured invoice data (can be nil)
- tags: Optional tags to attach to the document
Returns:
- documentID: UUID of the created document
- err: Error if upload fails, including HTTP status errors (409 for duplicates)
The function uses a multipart form POST request to https://idwell.ai/api/public/upload
Note: Basic document processing may take up to 5 seconds per page. For synchronous invoice extraction, use the REST API directly with waitForExtraction=true.
func WithBaseURL ¶
WithBaseURL creates context.Context with baseURL param for making requests
func WithHTTPClient ¶
WithHTTPClient creates context.Context with *http.Client for making requests
Types ¶
type AccountingItem ¶
type AccountingItem struct {
// Title describing this accounting item
Title notnull.TrimmedString `json:"title"`
// GeneralLedgerAccountNumber where this item should be posted
GeneralLedgerAccountNumber account.Number `json:"generalLedgerAccountNumber"`
// BookingType indicates the side of the booking: "DEBIT" or "CREDIT"
BookingType string `json:"bookingType" jsonschema:"enum=DEBIT,enum=CREDIT"`
// AmountType indicates whether Amount is "NET" (without VAT) or "TOTAL" (with VAT)
AmountType string `json:"amountType" jsonschema:"enum=NET,enum=TOTAL"`
// Amount to be booked for this item
Amount money.Amount `json:"amount"`
// ValueAddedTaxID is the optional UUID of the VAT code to apply
ValueAddedTaxID uu.NullableID `json:"valueAddedTax,omitempty"`
// ValueAddedTaxPercentageAmount is the optional VAT percentage as amount (e.g., 20 for 20%)
ValueAddedTaxPercentageAmount *money.Amount `json:"valueAddedTaxPercentageAmount,omitempty"`
}
AccountingItem represents a single booking line in an invoice's accounting. Each item describes how the invoice amount should be posted to the general ledger.
type BankAccount ¶
type BankAccount struct {
IBAN bank.IBAN
BIC bank.BIC
Currency money.Currency
Holder notnull.TrimmedString
// Optional
AccountNumber nullable.TrimmedString `json:",omitempty"`
Name nullable.TrimmedString `json:",omitempty"`
Description nullable.TrimmedString `json:",omitempty"`
}
BankAccount represents a checking account
func (*BankAccount) Normalize ¶
func (a *BankAccount) Normalize() (err error)
func (*BankAccount) Validate ¶
func (a *BankAccount) Validate() (err error)
type Company ¶
type Company struct {
ID uu.ID `json:"rowId"`
Name notnull.TrimmedString `json:"name"`
AlternativeNames nullable.StringArray `json:"alternativeNames"`
BrandName nullable.TrimmedString `json:"brandName"`
LegalForm nullable.TrimmedString `json:"legalForm"`
MainLocation MainLocation `json:"mainLocation"`
}
type CompanyResponse ¶
type CompanyResponse struct {
Data struct {
CurrentClientCompany struct {
CompanyByCompanyRowID Company `json:"companyByCompanyRowId"`
} `json:"currentClientCompany"`
}
}
type DownloadOption ¶
DownloadOption modifies the PDF download request URL.
func WithAuditTrail ¶
func WithAuditTrail(trailType string) DownloadOption
WithAuditTrail appends an audit trail to the downloaded PDF. Valid values: "append", "prepend", "configured", "only".
func WithAuditTrailLang ¶
func WithAuditTrailLang(lang string) DownloadOption
WithAuditTrailLang sets the language for the audit trail (e.g. "en", "de").
func WithEmbedXML ¶
func WithEmbedXML() DownloadOption
WithEmbedXML embeds the UN/CEFACT format XML into the downloaded PDF.
type GLAccount ¶
type GLAccount struct {
Number account.Number // Alphanumeric account number
Name nullable.TrimmedString // Name of the account
Category nullable.TrimmedString // Higher level description of the account
ObjectNo account.NullableNumber // Optional real estate object number connected to the account
Active bool // Active indicates if the account is currently in use; inactive accounts are excluded from suggestions
DefaultVATCode nullable.Type[int64] // Default VAT code for the account
}
GLAccount represents a general ledger account
type ImportBankAccountResult ¶
type ImportBankAccountResult struct {
// ID of the bank account that was created or updated
ID uu.NullableID `json:",omitzero"`
BankAccount
// State of the account after import
State ImportState
// Error message from the import in case of State "ERROR"
Error string `json:",omitempty"`
}
func PostBankAccounts ¶
func PostBankAccounts(ctx context.Context, apiKey string, accounts []*BankAccount, failOnInvalid, allOrNone bool, source string) (results []*ImportBankAccountResult, err error)
PostBankAccounts posts the given bankAccounts to the iDWELL Finance API.
Arguments:
- apiKey: API key (bearer token) for the iDWELL Finance API
- accounts: Bank accounts to insert or update
- failOnInvalid: Fail if any account data is invalid
- allOrNone: Import either all accounts or none in case of any error
- source: Optional name or ID of who did the import
Usage example:
curl -X POST \
-H "Authorization: Bearer ${IDWELL_API_KEY}" \
-H "Content-Type: application/json" \
--data "[]"" \
--include \
https://idwell.ai/api/public/masterdata/bank-accounts?failOnInvalid=true&source=MY_SERVICE
type ImportGLAccountResult ¶
type ImportGLAccountResult struct {
// General ledger account number after normalization
// (e.g. with object number appended if configured)
NormalizedNumber account.Number
// ID of the general ledger account that was created or updated
ID uu.NullableID `json:",omitzero"`
// ID of the real estate object connected to the general ledger account
RealEstateObjectID uu.NullableID `json:",omitzero"`
// State of the partner after import
State ImportState
// Error message from the import in case of State "ERROR"
Error string `json:",omitempty"`
}
func PostGLAccounts ¶
func PostGLAccounts(ctx context.Context, apiKey string, accounts []*GLAccount, findByName, objectSpecificAccountNos, failOnInvalid, allOrNone bool, source string) (results []*ImportGLAccountResult, err error)
PostGLAccounts upserts general ledger accounts using the API endpoint https://idwell.ai/api/public/masterdata/gl-accounts.
Arguments:
- apiKey: API key (bearer token) for the iDWELL Finance API
- accounts: General ledger accounts to insert or update
- findByName: Find existing GL accounts by name if not found by number
- objectSpecificAccountNos: Append the object numbers to the account numbers to make them unique
- failOnInvalid: Fail if any account data is invalid
- allOrNone: Import either all accounts or none in case of any error
- source: Optional name or ID of who did the import
type ImportPartnerResult ¶
type ImportPartnerResult struct {
// NormalizedInput shows how the input was normalized and cleaned
NormalizedInput *Partner
// InputWarnings contains warnings from normalizing and validating the input
InputWarnings []string
// PartnerCompany contains the partner company data after import (JSON format)
// PartnerCompany: replace json.RawMessage with struct types once the API schema is stable
PartnerCompany json.RawMessage `json:",omitempty"`
// PartnerLocations contains the partner location data after import (JSON format)
// Main location is always first in the array
PartnerLocations json.RawMessage `json:",omitempty"`
// VendorAccount contains the vendor account data if VendorAccountNumber was provided
VendorAccount json.RawMessage `json:",omitempty"`
// ClientAccount contains the client account data if ClientAccountNumber was provided
ClientAccount json.RawMessage `json:",omitempty"`
// PaymentPresets contains the payment preset data for bank accounts
PaymentPresets json.RawMessage `json:",omitempty"`
// State indicates the result: UNCHANGED, UPDATED, CREATED, or ERROR
State ImportState
// Error contains the error message in case of State "ERROR"
Error string `json:",omitempty"`
}
ImportPartnerResult contains the result of importing a single partner company. It includes the normalized input data, any warnings or errors encountered, the created/updated partner data, and the final state of the import operation.
func PostPartners ¶
func PostPartners(ctx context.Context, apiKey string, partners []*Partner, failOnInvalid, useCleanedInvalid, allOrNone bool, source string) (results []ImportPartnerResult, err error)
PostPartners upserts (inserts or updates) partner companies via the iDWELL Finance API. Existing partners are identified by VATIDNo, VendorAccountNumber, ClientAccountNumber, or Name and then updated. If no match is found, a new partner is created.
Arguments:
- ctx: Context for the HTTP request (for cancellation and timeouts)
- apiKey: API key (bearer token) for authentication
- partners: Slice of partners to import
- failOnInvalid: If true, fail immediately if any partner data is invalid
- useCleanedInvalid: If true, clean invalid data and import what's valid (only when failOnInvalid=false)
- allOrNone: If true, use a database transaction - import all partners or none on any error
- source: Optional identifier for the data source (e.g., your company name)
Returns a slice of ImportPartnerResult with one result per input partner. Each result contains the normalized input, warnings, created/updated data, and import state.
API endpoint: https://idwell.ai/api/public/masterdata/partner-companies
type ImportState ¶
type ImportState string //#enum
ImportState represents the result state of importing a single data item (partner, GL account, bank account, etc.) via the iDWELL Finance API.
const ( // ImportStateUnchanged indicates the item already exists with identical data ImportStateUnchanged ImportState = "UNCHANGED" // ImportStateUpdated indicates an existing item was updated with new data ImportStateUpdated ImportState = "UPDATED" // ImportStateCreated indicates a new item was created ImportStateCreated ImportState = "CREATED" // ImportStateError indicates the import failed for this item // Check the Error field in the result for details ImportStateError ImportState = "ERROR" )
func (ImportState) EnumStrings ¶
func (ImportState) EnumStrings() []string
EnumStrings returns all valid values for ImportState as strings
func (ImportState) Enums ¶
func (ImportState) Enums() []ImportState
Enums returns all valid values for ImportState
func (ImportState) String ¶
func (i ImportState) String() string
String implements the fmt.Stringer interface for ImportState
func (ImportState) Valid ¶
func (i ImportState) Valid() bool
Valid indicates if i is any of the valid values for ImportState
func (ImportState) Validate ¶
func (i ImportState) Validate() error
Validate returns an error if i is none of the valid values for ImportState
type Invoice ¶
type Invoice struct {
// Identifier of the system that produced the invoice and confirmes its values
ConfirmedBy nullable.TrimmedString `json:"confirmedBy,omitempty"`
// Name of the partner company
PartnerName nullable.TrimmedString `json:"partnerName,omitempty"`
// VAT ID of the partner company
PartnerVatID vat.NullableID `json:"partnerVatId,omitempty"`
// Company registration number of the partner company
PartnerCompRegNo nullable.TrimmedString `json:"partnerCompRegNo,omitempty"`
// ISO 3166-1 alpha 2 country code of the partner company
PartnerCountry country.NullableCode `json:"partnerCountry,omitempty"`
// Number that identifies the partner company like a vendor or client number
PartnerNumber nullable.TrimmedString `json:"partnerNumber,omitempty"`
// Number of the invoice
InvoiceNumber nullable.TrimmedString `json:"invoiceNumber,omitempty"`
// Internal number of the invoice
InternalNumber nullable.TrimmedString `json:"internalNumber,omitempty"`
// Date of the invoice
InvoiceDate date.NullableDate `json:"invoiceDate,omitempty"`
// Due date of the invoice
DueDate date.NullableDate `json:"dueDate,omitempty"`
// Number of the order
OrderNumber nullable.TrimmedString `json:"orderNumber,omitempty"`
// Date of the order
OrderDate date.NullableDate `json:"orderDate,omitempty"`
// Whether the invoice is a credit memo
CreditMemo *bool `json:"creditMemo,omitempty"`
// Net amount of the invoice (without VAT)
Net *money.Amount `json:"net,omitempty"`
// Total or gross amount of the invoice (including VAT)
Total *money.Amount `json:"total,omitempty"`
// Single VAT percentage of the invoice
VATPercent *money.Rate `json:"vatPercent,omitempty"`
// Multiple VAT percentages of the invoice
VATPercentages nullable.FloatArray `json:"vatPercentages,omitempty"`
// Multiple VAT amounts of the invoice, one per VAT percentage
VATAmounts nullable.FloatArray `json:"vatAmounts,omitempty"`
// Discount percentage of the invoice
DiscountPercent *money.Rate `json:"discountPercent,omitempty"`
// Date until which the discount is valid
DiscountUntil date.NullableDate `json:"discountUntil,omitempty"`
// Cost centers of the invoice
CostCenters map[string]money.Amount `json:"costCenters,omitempty"`
// Currency of the invoice
Currency money.NullableCurrency `json:"currency,omitempty"`
// Conversion rate of the currency
ConversionRate *money.Rate `json:"conversionRate,omitempty"`
// Date of the currency conversion rate
ConversionRateDate date.NullableDate `json:"conversionRateDate,omitempty"`
// Invoiced goods and services
GoodsServices nullable.TrimmedString `json:"goodsServices,omitempty"`
// Date from which the goods and services are delivered.
// Use same date for from and until if the goods and services are delivered in a single day.
DeliveredFrom date.NullableDate `json:"deliveredFrom,omitempty"`
// Date until which the goods and services are delivered.
// Use same date for from and until if the goods and services are delivered in a single day.
DeliveredUntil date.NullableDate `json:"deliveredUntil,omitempty"`
// Delivery note numbers related to the invoice
DeliveryNoteNumbers []string `json:"deliveryNoteNumbers,omitempty"`
// Invoice payment IBAN
IBAN bank.NullableIBAN `json:"iban,omitempty"`
// Invoice payment BIC
BIC bank.NullableBIC `json:"bic,omitempty"`
// Accounting items of the invoice
AccountingItems []*AccountingItem `json:"accountingItems,omitempty"`
}
Invoice uploaded from a third party system to iDWELL.
func (*Invoice) Validate ¶
Validate checks if the invoice data is valid according to business rules. It validates dates, amounts, VAT percentages, currency codes, IBANs, BICs, and ensures consistency between related fields (e.g., total >= net, cost centers sum <= net).
Returns nil if the invoice is valid, or an error describing validation failures.
type MainLocation ¶
type MainLocation struct {
ID uu.ID `json:"rowId"`
Country country.Code `json:"country"`
Zip nullable.TrimmedString `json:"zip"`
City nullable.TrimmedString `json:"city"`
Street nullable.TrimmedString `json:"street"`
Phone nullable.TrimmedString `json:"phone"`
Email email.NullableAddress `json:"email"`
VatNo vat.NullableID `json:"vatNo"`
TaxNo nullable.TrimmedString `json:"taxNo"`
}
type ObjectGroup ¶
type ObjectGroup struct {
ExternalID string `json:"ExternalID"`
Name string `json:"Name"`
AreaCode *string `json:"AreaCode"`
ObjectIDs []string `json:"ObjectIDs"`
}
ObjectGroup represents a group of real estate objects identified by an external ID.
type ObjectRole ¶
type ObjectRole struct {
Name string `json:"Name"`
ObjectID string `json:"ObjectID"`
Email string `json:"Email"`
}
ObjectRole represents a role assignment linking a user to a real estate object.
type ObjectTenantOwner ¶
type ObjectTenantOwner struct {
ObjectNo account.Number
TenantOwnerID int64
TenantOwnerNo int64
UnitNo int64
Unit notnull.TrimmedString
OwnerLinkNo int64
Owner notnull.TrimmedString
}
func (*ObjectTenantOwner) Validate ¶
func (o *ObjectTenantOwner) Validate() error
type Partner ¶
type Partner struct {
// Name is the primary company name (required)
Name notnull.TrimmedString
// AlternativeNames are additional names used for matching when merging partners
AlternativeNames notnull.StringArray
// Main location address details
Street nullable.TrimmedString // Street address with house number
City nullable.TrimmedString // City name
ZIP nullable.TrimmedString // Postal/ZIP code
Country country.NullableCode // ISO 3166-1 alpha-2 country code (e.g., "DE", "AT")
Phone nullable.TrimmedString // Phone number
Email email.NullableAddress // Email address
Website nullable.TrimmedString // Website URL
// Tax and registration identifiers
CompRegNo nullable.TrimmedString // Company registration number
TaxIDNo nullable.TrimmedString // Tax identification number
VATIDNo vat.NullableID // VAT identification number (e.g., "DE123456789")
// Partner account numbers in the accounting system
VendorAccountNumber account.NullableNumber // Vendor/creditor account number (null = don't create)
ClientAccountNumber account.NullableNumber // Client/debtor account number (null = don't create)
// Single payment bank account for CSV import convenience
// Use IBAN and BIC for simple cases with one bank account
IBAN bank.NullableIBAN // International Bank Account Number
BIC bank.NullableBIC // Bank Identifier Code (SWIFT)
// Multiple payment bank accounts for JSON import
// Use BankAccounts array when partner has multiple bank accounts
BankAccounts []bank.Account
// Active indicates if this partner is currently active
// Inactive partners are kept for historical reasons but excluded from suggestions
Active bool
// TaxExemptionRequired indicates whether the vendor requires an exemption certificate.
// Maps to iX-Haus KREDITOR FreistellungNotwendig="notwendig".
TaxExemptionRequired nullable.Type[bool]
// TaxExemptionExpiresAt is the expiry date of the vendor's exemption certificate.
TaxExemptionExpiresAt date.NullableDate
}
Partner represents a business partner (customer or vendor) with contact information, location data, tax identifiers, account numbers, and bank account details. Partners are identified and updated based on VATIDNo, VendorAccountNumber, ClientAccountNumber, or Name.
func (*Partner) ClientAccountNumberUint ¶
func (*Partner) EqualAlternativeNames ¶
EqualAlternativeNames returns true if the partner has exactly all of the passed names in its AlternativeNames, but independent of order.
func (*Partner) HasLocation ¶
func (*Partner) NeedUpsertTaxExemption ¶
NeedUpsertTaxExemption reports whether any tax exemption field is set and the partner_company_tax_exemption row should be upserted.
func (*Partner) Normalize ¶
Normalize cleans and validates partner data, fixing common formatting issues and ensuring data consistency. It handles IBAN/BIC formatting, country codes, VAT IDs, email addresses, and bank accounts.
Arguments:
- resetInvalid: If true, invalid fields are set to null instead of returning errors
Returns a slice of errors encountered during normalization. If resetInvalid is true, these are warnings; if false, they indicate validation failures.
The method also consolidates IBAN/BIC into BankAccounts array and removes duplicates.
func (*Partner) NormalizedAlternativeNames ¶
NormalizedAlternativeNames returns the alternative names with all whitespace trimmed and empty strings removed. The names are sorted alphabetically.
func (*Partner) VendorAccountNumberUint ¶
type RealEstateObject ¶
type RealEstateObject struct {
// Type specifies the kind of real estate object (WEG, HI, SUB, KREIS, MANDANT, MRG, MHV, SEV)
Type RealEstateObjectType
// Number is the unique identifier for this object (alphanumeric)
Number account.Number
// AccountingArea is an optional accounting segregation identifier
AccountingArea account.NullableNumber
// UserAccount is an optional user account number associated with this object
UserAccount account.NullableNumber
// Description provides additional details about the property
Description nullable.TrimmedString
// StreetAddress is the primary street address (required)
StreetAddress notnull.TrimmedString
// AlternativeAddresses contains additional addresses for the same property
AlternativeAddresses nullable.StringArray
// ZipCode is the postal/ZIP code
ZipCode nullable.TrimmedString
// City is the city name
City nullable.TrimmedString
// Country is the ISO 3166-1 alpha-2 country code (e.g., "DE", "AT")
Country country.Code
// BankAccounts are payment bank accounts associated with this object
BankAccounts []bank.Account
// Active indicates if this object is currently active
Active bool
}
RealEstateObject represents a real estate property managed in the system. Objects are used for property management, accounting segregation, and organizing related transactions and documents. Each object is identified by its Number.
func (*RealEstateObject) Validate ¶
func (o *RealEstateObject) Validate() error
type RealEstateObjectType ¶
type RealEstateObjectType string //#enum
RealEstateObjectType categorizes real estate objects by their legal and management structure. Different types have different requirements and business rules in the system.
const ( // RealEstateObjectTypeWEG represents a condominium owners' association // (Wohnungseigentümergemeinschaft in German/Austrian law) RealEstateObjectTypeWEG RealEstateObjectType = "WEG" // RealEstateObjectTypeHI represents a house/building (Hausverwaltung) RealEstateObjectTypeHI RealEstateObjectType = "HI" // RealEstateObjectTypeSUB represents a sub-object or unit within a larger property RealEstateObjectTypeSUB RealEstateObjectType = "SUB" // RealEstateObjectTypeKREIS represents a virtual grouping object (accounting circle) RealEstateObjectTypeKREIS RealEstateObjectType = "KREIS" // RealEstateObjectTypeMANDANT represents a virtual client-level object RealEstateObjectTypeMANDANT RealEstateObjectType = "MANDANT" // RealEstateObjectTypeMRG represents a property subject to Austrian rent control law // (Mietrechtsgesetz - MRG) RealEstateObjectTypeMRG RealEstateObjectType = "MRG" // RealEstateObjectTypeMHV represents a rental property management object // (Miethausverwaltung) RealEstateObjectTypeMHV RealEstateObjectType = "MHV" // RealEstateObjectTypeSEV represents a separate property management object // (Sondereigentumsverwaltung) RealEstateObjectTypeSEV RealEstateObjectType = "SEV" // RealEstateObjectTypeHBH represents a general ledger / main bookkeeping object // (Hauptbuchhaltung) RealEstateObjectTypeHBH RealEstateObjectType = "HBH" )
func (RealEstateObjectType) EnumStrings ¶
func (RealEstateObjectType) EnumStrings() []string
EnumStrings returns all valid values for RealEstateObjectType as strings
func (RealEstateObjectType) Enums ¶
func (RealEstateObjectType) Enums() []RealEstateObjectType
Enums returns all valid values for RealEstateObjectType
func (RealEstateObjectType) IsVirtual ¶
func (r RealEstateObjectType) IsVirtual() bool
IsVirtual returns true if this object type represents a virtual grouping rather than a physical property. Virtual objects (KREIS, MANDANT) are used for organizing and aggregating data but don't represent actual real estate.
func (RealEstateObjectType) String ¶
func (r RealEstateObjectType) String() string
String implements the fmt.Stringer interface for RealEstateObjectType
func (RealEstateObjectType) Valid ¶
func (r RealEstateObjectType) Valid() bool
Valid indicates if r is any of the valid values for RealEstateObjectType
func (RealEstateObjectType) Validate ¶
func (r RealEstateObjectType) Validate() error
Validate returns an error if r is none of the valid values for RealEstateObjectType