Permalink
Browse files

add setting and getting a name for the cart

  • Loading branch information...
1 parent 5c1342d commit e781558a020ca4c604d6a384ab0de8eb62c61c0e @iampersistent iampersistent committed Jul 16, 2012
Showing with 38 additions and 4 deletions.
  1. +24 −4 lib/Vespolina/Entity/Order/Cart.php
  2. +14 −0 lib/Vespolina/Entity/Order/CartInterface.php
@@ -25,6 +25,7 @@ class Cart extends BaseOrder implements CartInterface
protected $expiresAt;
protected $followUp;
+ protected $name;
protected $paymentInstruction;
protected $pricingSet;
protected $createdAt;
@@ -67,19 +68,30 @@ public function getPaymentInstruction()
/**
* @inheritdoc
*/
- public function getPricingSet()
+ public function setFollowUp($followUp)
{
- return $this->pricingSet;
+ $this->followUp = $followUp;
}
/**
* @inheritdoc
*/
- public function setFollowUp($followUp)
+ public function getName()
{
- $this->followUp = $followUp;
+ return $this->name;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
}
+ /**
+ * @inheritdoc
+ */
public function setPrice($name, $price)
{
$this->prices[$name] = $price;
@@ -88,6 +100,14 @@ public function setPrice($name, $price)
/**
* @inheritdoc
*/
+ public function getPricingSet()
+ {
+ return $this->pricingSet;
+ }
+
+ /**
+ * @inheritdoc
+ */
public function setPricingSet($pricingSet)
{
$this->pricingSet = $pricingSet;
@@ -64,6 +64,20 @@ function getFollowUp();
function setFollowUp($followUp);
/**
+ * Return the name assigned to the cart
+ *
+ * @return string
+ */
+ function getName();
+
+ /**
+ * Set a name for this cart
+ *
+ * @param $name
+ */
+ function setName($name);
+
+ /**
* Return the payment instruction the cart
*
* @return payment instruction

0 comments on commit e781558

Please sign in to comment.