Skip to content

Commit

Permalink
Merge pull request #81 from ndeet/v2-more-breaking
Browse files Browse the repository at this point in the history
Remove isPaid() and fix isSettled() to include late payment.
  • Loading branch information
ndeet authored Oct 27, 2022
2 parents f474251 + b27d1f7 commit 406a775
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Result/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ public function isArchived(): bool
return $this->getData()['archived'];
}

public function isPaid(): bool
{
$data = $this->getData();
return $data['status'] === self::STATUS_SETTLED || $data['additionalStatus'] === self::ADDITIONAL_STATUS_PAID_PARTIAL;
}

public function isNew(): bool
{
$data = $this->getData();
Expand All @@ -86,7 +80,7 @@ public function isNew(): bool
public function isSettled(): bool
{
$data = $this->getData();
return $data['status'] === self::STATUS_SETTLED;
return $data['status'] === self::STATUS_SETTLED || $data['additionalStatus'] === self::ADDITIONAL_STATUS_PAID_LATE;
}

public function getStatus(): string
Expand Down

0 comments on commit 406a775

Please sign in to comment.