24 lines
584 B
PHP
24 lines
584 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Sales\Application\DTOs;
|
|
|
|
/**
|
|
* Input for a quick sale: quantities by product id (zero or empty ones are
|
|
* left out by the caller), the payment method key, an optional customer
|
|
* and an optional address the receipt is emailed to.
|
|
*/
|
|
final readonly class SaleData
|
|
{
|
|
/**
|
|
* @param array<int, int> $quantities
|
|
*/
|
|
public function __construct(
|
|
public array $quantities,
|
|
public string $paymentMethod,
|
|
public ?int $customerId = null,
|
|
public ?string $receiptEmail = null,
|
|
) {}
|
|
}
|