ZyncContractManager

Public API manager for contract operations in the Zync SDK.

This manager provides the public interface for contract-related functionality, following the offline-first approach where local data is returned immediately and background sync operations keep the data updated.

Usage:

val result = zync.contracts?.getContractDetail("contract_uid_123")
when (result) {
is ContractResult.Success -> {
val contract = result.data
println("Contract: ${contract.name} (${contract.contractNumber})")
println("Status: ${contract.status}")
println("Customer: ${contract.customer?.customerName}")
}
is ContractResult.Failure -> {
println("Error: ${result.error.message}")
}
}

Functions

Link copied to clipboard
suspend fun fetchContracts(sortAndFilter: ZyncContractSortAndFilter, page: Int, pageSize: Int): GetContractsResult

Fetch paginated list of contracts with sorting and filtering.

Link copied to clipboard
suspend fun getContractDetail(contractUid: String, fetchType: ZyncFetchType = ZyncFetchType.NONE): ContractResult

Get detailed information for a specific contract by its UID.

Link copied to clipboard

Observe changes to a specific contract in real-time.