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
val brand: String? = null
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
val currency: String? = null
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
val hasCustomTax: Boolean = false
Link copied to clipboard

Get inventory status.

Link copied to clipboard
val isAvailable: Boolean = true
Link copied to clipboard
val isBillable: Boolean = true
Link copied to clipboard

Check if product is a bundle.

Link copied to clipboard

Check if product is low stock.

Link copied to clipboard

Check if product is a service.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val minQuantity: Double = 0.0
Link copied to clipboard
val prefix: String? = null
Link copied to clipboard
val price: Double? = null
Link copied to clipboard
Link copied to clipboard
val productBarCode: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val productId: String? = null
Link copied to clipboard
val productImage: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get profit margin.

Link copied to clipboard
val purchasePrice: Double? = null
Link copied to clipboard
val quantity: Double = 0.0
Link copied to clipboard

Check if product requires reorder.

Link copied to clipboard
val specification: String? = null
Link copied to clipboard
val syncedAt: String? = null
Link copied to clipboard
val tax: ProductTax? = null
Link copied to clipboard

Get total quantity across all locations.

Link copied to clipboard
val uom: String? = null
Link copied to clipboard
val updatedAt: String? = null

Functions

Link copied to clipboard
fun getCustomFieldValue(fieldLabel: String): String?

Get custom field value by label.

Link copied to clipboard

Get location by name.

Link copied to clipboard
fun getQuantityAtLocation(locationName: String): Double

Get quantity at specific location.

Link copied to clipboard

Get recent transactions.

Link copied to clipboard
fun hasCustomField(fieldLabel: String): Boolean

Check if product has custom field.

Link copied to clipboard

Check if available at location.