Represents version data containing comprehensive version information. This interface provides access to version collection management, version status tracking, and aggregate quantity calculations across all versions of a job.

Version data is essential for complex pricing scenarios where multiple versions of a product are being processed together, allowing for bulk pricing and version-specific adjustments.

Hierarchy

  • VersionData

Properties

IsVersion: boolean

Indicates whether this is a version of a job. This boolean flag determines if the current job is part of a versioned workflow, affecting how pricing calculations and business logic should be applied.

Example

if (versionData.IsVersion) {
// Apply version-specific pricing logic
return calculateVersionPricing(versionData);
}
NumberOfVersions: number

The number of versions in the collection. This value provides a quick count of how many versions are associated with the current job, useful for bulk pricing calculations and version management.

Example

if (versionData.NumberOfVersions > 1) {
return Item.Price * 0.95; // 5% discount for multiple versions
}
Versions: ItemVersion[]

Collection of version items. This array contains all individual version items associated with the current job, providing access to detailed information about each version including quantities and custom names.

Example

var totalPrice = 0;
for (var i = 0; i < versionData.Versions.length; i++) {
var version = versionData.Versions[i];
totalPrice += Item.Price * version.Quantity;
}
return totalPrice;
VersionsSumQuantity: number

The sum of all quantities across all versions. This value represents the total quantity being ordered across all versions of the job, useful for bulk pricing and quantity-based discount calculations.

Example

var totalQuantity = versionData.VersionsSumQuantity;
var tier = HelperMethods.FindTier(totalQuantity, Item.PricingTiers);
if (tier) {
return tier.Price * totalQuantity;
}

Generated using TypeDoc