phpDocumentor

CustomerOrder

Class CustomerOrder

Table of Contents

$customerId  : CustomerId
$orderDate  : DateTimeImmutable
$orderId  : OrderId
$orderStatus  : OrderStatus
$paymentMethod  : string
$productIds  : ProductIds
$shippingCountry  : string
$totalAmount  : float
create()  : CustomerOrder
customerId()  : int
orderDate()  : string
orderId()  : int
paymentMethod()  : string
productIds()  : ProductIds
shippingCountry()  : string
toArray()  : array<string|int, mixed>
totalAmount()  : float
__construct()  : mixed

Properties

Methods

create()

public static create(OrderId $orderId, CustomerId $customerId, ProductIds $productIds, DateTimeImmutable $orderDate, OrderStatus $orderStatus, float $totalAmount, string $shippingCountry, string $paymentMethod) : CustomerOrder
Parameters
$orderId : OrderId
$customerId : CustomerId
$productIds : ProductIds
$orderDate : DateTimeImmutable
$orderStatus : OrderStatus
$totalAmount : float
$shippingCountry : string
$paymentMethod : string
Return values
CustomerOrder

customerId()

public customerId() : int
Return values
int

orderDate()

public orderDate([string $datetimeFormat = 'Y-m-d H:i:s' ]) : string
Parameters
$datetimeFormat : string = 'Y-m-d H:i:s'
Return values
string

paymentMethod()

public paymentMethod() : string
Return values
string

shippingCountry()

public shippingCountry() : string
Return values
string

toArray()

public toArray([string $datetimeFormat = 'Y-m-d H:i:s' ]) : array<string|int, mixed>
Parameters
$datetimeFormat : string = 'Y-m-d H:i:s'
Return values
array<string|int, mixed>

totalAmount()

public totalAmount() : float
Return values
float

__construct()

private __construct(OrderId $orderId, CustomerId $customerId, ProductIds $productIds, DateTimeImmutable $orderDate, OrderStatus $orderStatus, float $totalAmount, string $shippingCountry, string $paymentMethod) : mixed
Parameters
$orderId : OrderId
$customerId : CustomerId
$productIds : ProductIds
$orderDate : DateTimeImmutable
$orderStatus : OrderStatus
$totalAmount : float
$shippingCountry : string
$paymentMethod : string
Return values
mixed

Search results