Permalink
Browse files

add addition methods to BillingAgreementInterface, implement

  • Loading branch information...
1 parent 97a3092 commit aa08c17a217d652c74a043821b0f1c1e8abcd34c @iampersistent iampersistent committed Jan 18, 2013
View
100 lib/Vespolina/Entity/Billing/BillingAgreement.php
@@ -0,0 +1,100 @@
+<?php
+namespace Vespolina\Entity\Billing;
+
+use Vespolina\Entity\Order\OrderInterface;
+use Vespolina\Entity\Partner\PartnerInterface;
+
+class BillingAgreement implements BillingAgreementInterface
+{
+ protected $billingAmount;
+ protected $billingCycles;
+ protected $billingInterval;
+ protected $initialBillingDate;
+ protected $order;
+ protected $partner;
+ protected $paymentGateway;
+
+ public function setBillingAmount($billingAmount)
+ {
+ $this->billingAmount = $billingAmount;
+
+ return $this;
+ }
+
+ public function getBillingAmount()
+ {
+ return $this->billingAmount;
+ }
+
+ public function setBillingCycles($billingCycles)
+ {
+ $this->billingCycles = $billingCycles;
+
+ return $this;
+ }
+
+ public function getBillingCycles()
+ {
+ return $this->billingCycles;
+ }
+
+ public function setBillingInterval($billingInterval)
+ {
+ $this->billingInterval = $billingInterval;
+
+ return $this;
+ }
+
+ public function getBillingInterval()
+ {
+ return $this->billingInterval;
+ }
+
+ public function setInitialBillingDate(\DateTime $initialBillingDate)
+ {
+ $this->initialBillingDate = $initialBillingDate;
+
+ return $this;
+ }
+
+ public function getInitialBillingDate()
+ {
+ return $this->initialBillingDate;
+ }
+
+ public function setOrder(OrderInterface $order)
+ {
+ $this->order = $order;
+
+ return $this;
+ }
+
+ public function getOrder()
+ {
+ return $this->order;
+ }
+
+ public function setPartner(PartnerInterface $partner)
+ {
+ $this->partner = $partner;
+
+ return $this;
+ }
+
+ public function getPartner()
+ {
+ return $this->partner;
+ }
+
+ public function setPaymentGateway($paymentGateway)
+ {
+ $this->paymentGateway = $paymentGateway;
+
+ return $this;
+ }
+
+ public function getPaymentGateway()
+ {
+ return $this->paymentGateway;
+ }
+}
View
40 lib/Vespolina/Entity/Billing/BillingAgreementInterface.php
@@ -18,30 +18,56 @@
interface BillingAgreementInterface
{
/**
- * Get the billing amount to be charged periodically
+ * Set the billing amount of the agreement
+ *
+ * @param $billingAmount
+ * @return $this
+ */
+ function setBillingAmount($billingAmount);
+
+ /**
+ * Return the billing amount to be charged
*
* @return integer
*/
function getBillingAmount();
+ function setBillingCycles($billingCycles);
+
/**
- * Get the number of billing cycles
- *
+ * Return the number of billing cycles
*
* @return integer
*/
function getBillingCycles();
+ function setBillingInterval($billingInterval);
+
/**
- * Get the interval (day, month, year)
+ * Return the billing interval (day, month, year)
*
- * @return integer
+ * @return string
*/
function getBillingInterval();
+ function setInitialBillingDate(\DateTime $initialBillingDate);
+
/*
- * Get the date when the first billing request should be created
+ * Return the date when the first billing request should be created
*
+ * @return /DateTime
*/
- function getPlannedDate();
+ function getInitialBillingDate();
+
+ function setOrder(OrderInterface $order);
+
+ function getOrder();
+
+ function setPartner(PartnerInterface $partner);
+
+ function getPartner();
+
+ function setPaymentGateway($paymentGateway);
+
+ function getPaymentGateway();
}

0 comments on commit aa08c17

Please sign in to comment.