Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add billing period to Invoice

  • Loading branch information...
commit c8e40ec29e448398a0d73b2bb2d5257919a6cc96 1 parent 7bb7db1
@iampersistent iampersistent authored
View
40 lib/Vespolina/Entity/Invoice/Invoice.php
@@ -25,6 +25,8 @@ class Invoice implements InvoiceInterface
protected $orders;
protected $partner;
protected $payment;
+ protected $periodEnd;
+ protected $periodStart;
protected $previousInvoice;
public function getId()
@@ -124,7 +126,7 @@ public function removeOrder(OrderInterface $order)
/**
* @inheritdoc
*/
- public function setOrders($orders)
+ public function setOrders(array $orders)
{
$this->orders = $orders;
@@ -170,6 +172,42 @@ public function getPayment()
/**
* @inheritdoc
*/
+ public function setPeriodEnd(\DateTime $periodEnd)
+ {
+ $this->periodEnd = $periodEnd;
+
+ return $this;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getPeriodEnd()
+ {
+ return $this->periodEnd;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function setPeriodStart(\DateTime $periodStart)
+ {
+ $this->periodStart = $periodStart;
+
+ return $this;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getPeriodStart()
+ {
+ return $this->periodStart;
+ }
+
+ /**
+ * @inheritdoc
+ */
public function setPreviousInvoice(InvoiceInterface $previousInvoice)
{
$this->previousInvoice = $previousInvoice;
View
30 lib/Vespolina/Entity/Invoice/InvoiceInterface.php
@@ -125,6 +125,36 @@ function setPayment($payment);
function getPayment();
/**
+ * Set the end of the billing period for this invoice
+ *
+ * @param \DateTime $periodEnd
+ * @return $this
+ */
+ function setPeriodEnd(\DateTime $periodEnd);
+
+ /**
+ * Return the end of the billing period of this invoice
+ *
+ * @return \DateTime
+ */
+ function getPeriodEnd();
+
+ /**
+ * Set the start of the billing period for this invoice
+ *
+ * @param \DateTime $periodEnd
+ * @return $this
+ */
+ function setPeriodStart(\DateTime $periodStart);
+
+ /**
+ * Return the start of the billing period of this invoice
+ *
+ * @return \DateTime
+ */
+ function getPeriodStart();
+
+ /**
* Set previously created Invoice for the Partner, can be used for reporting
*
* @param \Vespolina\Entity\Partner\InvoiceInterface $previousInvoice
Please sign in to comment.
Something went wrong with that request. Please try again.