Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #29 from jonasdekeukelaere/payment-days
Browse files Browse the repository at this point in the history
Add payment days to invoice
  • Loading branch information
tijsverkoyen authored Jun 16, 2022
2 parents 1c0d47d + 0534860 commit a5c3d62
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Invoice/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ class Invoice
*/
protected $prepareForSending = false;

/**
* @var int|null
*/
protected $paymentDays;

/**
* @param \SumoCoders\Factr\Client\Client $client
*/
Expand Down Expand Up @@ -441,6 +446,26 @@ public function setVatDescription($vatDescription)
return $this;
}

/**
* @return int|null
*/
public function getPaymentDays()
{
return $this->paymentDays;
}

/**
* @param int $paymentDays
*
* @return self
*/
public function setPaymentDays($paymentDays)
{
$this->paymentDays = $paymentDays;

return $this;
}

/**
* Initialize the object with raw data
*
Expand Down Expand Up @@ -537,6 +562,7 @@ public function toArray($forApi = false)
}
} elseif ($this->prepareForSending) {
$data['prepare_for_sending'] = $this->prepareForSending;
$data['payment_days'] = $this->paymentDays;
}

return $data;
Expand Down

0 comments on commit a5c3d62

Please sign in to comment.