Product
data class Product(val productUid: String, val productName: String, val productId: String? = null, val prefix: String? = null, val productDescription: String? = null, val productImage: String? = null, val productBarCode: String? = null, val productType: ZyncProductType = ZyncProductType.PRODUCT, val brand: String? = null, val specification: String? = null, val price: Double? = null, val purchasePrice: Double? = null, val currency: String? = null, val hasCustomTax: Boolean = false, val isBillable: Boolean = true, val quantity: Double = 0.0, val minQuantity: Double = 0.0, val uom: String? = null, val isAvailable: Boolean = true, val pricingLevel: ZyncBundlePricingLevel? = null, val productCategoryUid: String? = null, val productCategory: ProductCategory? = null, val locations: List<ProductLocation> = emptyList(), val bundleItems: List<ProductBundleItem> = emptyList(), val groups: List<ProductGroupAssociation> = emptyList(), val transactionHistory: List<ProductTransaction> = emptyList(), val tax: ProductTax? = null, val markup: ZyncProductMarkup? = null, val customFields: List<ProductCustomField> = emptyList(), val attachments: List<String> = emptyList(), val companyUid: String, val createdAt: String, val updatedAt: String? = null, val syncedAt: String? = null)
Domain model representing a Product in the Zuper system.
Products represent items, services, or bundles that can be used in jobs, quoted to customers, and managed in inventory systems.
Constructors
Link copied to clipboard
constructor(productUid: String, productName: String, productId: String? = null, prefix: String? = null, productDescription: String? = null, productImage: String? = null, productBarCode: String? = null, productType: ZyncProductType = ZyncProductType.PRODUCT, brand: String? = null, specification: String? = null, price: Double? = null, purchasePrice: Double? = null, currency: String? = null, hasCustomTax: Boolean = false, isBillable: Boolean = true, quantity: Double = 0.0, minQuantity: Double = 0.0, uom: String? = null, isAvailable: Boolean = true, pricingLevel: ZyncBundlePricingLevel? = null, productCategoryUid: String? = null, productCategory: ProductCategory? = null, locations: List<ProductLocation> = emptyList(), bundleItems: List<ProductBundleItem> = emptyList(), groups: List<ProductGroupAssociation> = emptyList(), transactionHistory: List<ProductTransaction> = emptyList(), tax: ProductTax? = null, markup: ZyncProductMarkup? = null, customFields: List<ProductCustomField> = emptyList(), attachments: List<String> = emptyList(), companyUid: String, createdAt: String, updatedAt: String? = null, syncedAt: String? = null)
Properties
Link copied to clipboard
Get bundle items for bundle products.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Get total bundle value (sum of component prices).
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Get display name with fallback.
Link copied to clipboard
Get formatted price string.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Get inventory status.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Check if product is low stock.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Get profit margin.
Link copied to clipboard
Link copied to clipboard
Check if product requires reorder.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Get total quantity across all locations.
Link copied to clipboard
Functions
Link copied to clipboard
Get custom field value by label.
Link copied to clipboard
Get location by name.
Link copied to clipboard
Get quantity at specific location.
Link copied to clipboard
Get recent transactions.
Link copied to clipboard
Check if product has custom field.
Link copied to clipboard
Check if available at location.