Files
mareike/app/Domains/Invoice/Actions/CreateInvoice/CreateInvoiceRequest.php

70 lines
2.0 KiB
PHP

<?php
namespace App\Domains\Invoice\Actions\CreateInvoice;
use App\Models\CostUnit;
use App\ValueObjects\InvoiceFile;
class CreateInvoiceRequest {
public CostUnit $costUnit;
public string $contactName;
public ?string $contactEmail;
public ?string $contactPhone;
public ?string $accountOwner;
public ?string $accountIban;
public string $invoiceType;
public ?string $invoiceTypeExtended;
public ?string $travelRoute;
public ?int $distance;
public ?int $passengers;
public ?int $transportations;
public ?InvoiceFile $receiptFile;
public float $totalAmount;
public bool $isDonation;
public ?int $userId;
public function __construct(
CostUnit $costUnit,
string $contactName,
string $invoiceType,
float $totalAmount,
?InvoiceFile $receiptFile,
bool $isDonation,
?int $userId = null,
?string $contactEmail = null,
?string $contactPhone = null,
?string $accountOwner = null,
?string $accountIban = null,
?string $invoiceTypeExtended = null,
?string $travelRoute = null,
?int $distance = null,
?int $passengers = null,
?int $transportations,
) {
$this->costUnit = $costUnit;
$this->contactName = $contactName;
$this->invoiceType = $invoiceType;
$this->invoiceTypeExtended = $invoiceTypeExtended;
$this->travelRoute = $travelRoute;
$this->distance = $distance;
$this->passengers = $passengers;
$this->transportations = $transportations;
$this->receiptFile = $receiptFile;
$this->contactEmail = $contactEmail;
$this->contactPhone = $contactPhone;
$this->accountOwner = $accountOwner;
$this->accountIban = $accountIban;
$this->totalAmount = $totalAmount;
$this->isDonation = $isDonation;
$this->userId = $userId;
if ($accountIban === 'undefined') {
$this->accountIban = null;
$this->accountOwner = null;
}
}
}