PriceBuilder
in package
implements
PriceBuilderInterface
Class PriceBuilder
Tags
Interfaces, Classes and Traits
- PriceBuilderInterface
- Interface PriceBuilderInterface
Table of Contents
- $data : array<string|int, mixed>
- $priceFormatted : PriceFormatted
- $pricePlain : PricePlain
- $productId : ProductId
- $quantity : float
- $status : PriceStatus
- $taxClassId : int
- build() : Price
- create() : self
- reset() : self
- withData() : mixed
- withPriceFormatted() : PriceBuilderInterface
- withPricePlain() : PriceBuilderInterface
- withProductId() : self
- withQuantity() : self
- withStatus() : self
- withTaxClassId() : self
- createCalculator() : mixed
Properties
$data
protected
array<string|int, mixed>
$data
= []
$priceFormatted
protected
PriceFormatted
$priceFormatted
= null
$pricePlain
protected
PricePlain
$pricePlain
$productId
protected
ProductId
$productId
$quantity
protected
float
$quantity
$status
protected
PriceStatus
$status
$taxClassId
protected
int
$taxClassId
Methods
build()
public
build() : Price
Tags
Return values
Price —create()
public
static create() : self
Tags
Return values
self —reset()
public
reset() : self
Tags
Return values
self —withData()
public
withData(string $string, mixed $value) : mixed
Parameters
- $string : string
- $value : mixed
Tags
Return values
mixed —withPriceFormatted()
public
withPriceFormatted(PriceFormatted $formatted) : PriceBuilderInterface
Parameters
- $formatted : PriceFormatted
Tags
Return values
PriceBuilderInterface —withPricePlain()
public
withPricePlain(PricePlain $plain) : PriceBuilderInterface
Parameters
- $plain : PricePlain
Tags
Return values
PriceBuilderInterface —withProductId()
public
withProductId(ProductId $productId) : self
Parameters
- $productId : ProductId
Tags
Return values
self —withQuantity()
public
withQuantity(float $value) : self
Parameters
- $value : float
Tags
Return values
self —withStatus()
public
withStatus(PriceStatus $status) : self
Parameters
- $status : PriceStatus
Tags
Return values
self —withTaxClassId()
public
withTaxClassId(int $taxClassId) : self
Parameters
- $taxClassId : int
Tags
Return values
self —createCalculator()
protected
createCalculator() : mixed