Zync Asset Manager
class ZyncAssetManager
Public API manager for asset operations in the Zync SDK.
This manager provides the public interface for asset-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.assets?.getAssetDetail("asset_uid_123")
when (result) {
is AssetResult.Success -> {
val asset = result.data
println("Asset: ${asset.assetName} (${asset.assetCode})")
println("Status: ${asset.assetStatus}")
println("Customer: ${asset.customerUid}")
}
is AssetResult.Failure -> {
println("Error: ${result.error.message}")
}
}Content copied to clipboard
Functions
Link copied to clipboard
suspend fun fetchAssets(sortAndFilter: ZyncAssetSortAndFilter, page: Int, pageSize: Int): GetAssetsResult
Fetch paginated list of assets with sorting and filtering.
Link copied to clipboard
suspend fun getAssetDetail(assetUid: String, fetchType: ZyncFetchType = ZyncFetchType.NONE): GetAssetResult
Get detailed information for a specific asset by its UID.
Link copied to clipboard
Observe changes to a specific asset in real-time.