Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change parameter type for setAllowanceCharges on InvoiceLine to array #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Changelog for v1.18.2

#### Bug fixes

- Fix parameter type for `<cac:AllowanceCharge>` on `<cac:InvoiceLine>` to array

# Changelog for v1.18.1

#### Bug fixes
Expand Down
7 changes: 4 additions & 3 deletions src/InvoiceLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class InvoiceLine implements XmlSerializable
private $price;
private $accountingCostCode;
private $accountingCost;
/** @var AllowanceCharge[] $allowanceCharges */
private $allowanceCharges;

// See CreditNoteLine.php
Expand Down Expand Up @@ -269,12 +270,12 @@ public function getAllowanceCharges(): ?array
}

/**
* @param AllowanceCharge[] $allowanceCharge
* @param AllowanceCharge[] $allowanceCharges
* @return InvoiceLine
*/
public function setAllowanceCharges(?AllowanceCharge $allowanceCharge): InvoiceLine
public function setAllowanceCharges(array $allowanceCharges): InvoiceLine
{
$this->allowanceCharges = $allowanceCharge;
$this->allowanceCharges = $allowanceCharges;
return $this;
}

Expand Down