Skip to content

Commit

Permalink
[Billing] Add invoice number to invoice calass
Browse files Browse the repository at this point in the history
  • Loading branch information
that-guy-iain committed Jun 26, 2024
1 parent 8d7f93b commit 622f04a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ protected function buildDto(Model $invoiceData): Entity
$invoice->setCurrency($invoiceData->getCurrency());
$invoice->setAmount($invoiceData->getAmountDue());
$invoice->setPaid($invoiceData->getPaid());
$invoice->setNumber($invoice->getNumber());
$invoice->setCreatedAt(new \DateTime($invoiceData->getCreatedAt()));

return $invoice;
Expand Down
12 changes: 12 additions & 0 deletions src/Parthenon/Billing/Invoice/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class Invoice

private bool $paid;

private string $number;

#[SerializedName('created_at')]
private \DateTime $createdAt;

Expand Down Expand Up @@ -85,4 +87,14 @@ public function setCreatedAt(\DateTime $createdAt): void
{
$this->createdAt = $createdAt;
}

public function getNumber(): string
{
return $this->number;
}

public function setNumber(string $number): void
{
$this->number = $number;
}
}

0 comments on commit 622f04a

Please sign in to comment.