DaffMockCartItem

Properties

Name Type Description
id faker.datatype.uuid()
item_id this.id
type DaffCartItemInputType.Simple
product_id faker.datatype.uuid()
parent_item_id faker.datatype.uuid()
image <DaffProductImage>new DaffProductImageFactory().create()
sku 'sku'
name 'Product Name'
url `/${faker.internet.domainWord()}.html`
qty faker.datatype.number({ min: 1, max: 100 })
price faker.datatype.number({ min: 10, max: 1500 })
row_total this.qty * this.price
in_stock true
_numberOfDiscounts faker.datatype.number({ min: 1, max: 2 })
discounts this._discounts(this._numberOfDiscounts, Math.floor(this.price / this._numberOfDiscounts))
Graycore, LLC © 2018 - 2024. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.