Permalink
Browse files

move interfaces from billing bundle to core

  • Loading branch information...
1 parent b44ab71 commit c6ff121c5d86f181f4aa7d59adf497c261a7301a @cordoval cordoval committed with iampersistent Jan 16, 2013
@@ -0,0 +1,47 @@
+<?php
+/**
+ * (c) 2012 Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Vespolina\Entity\Billing;
+
+use Vespolina\Entity\Order\OrderInterface;
+
+/**
+ * An interface for a request to bill a party
+ *
+ * @author Daniel Kucharski <daniel-xerias.be>
+ */
+interface BillingAgreementInterface
+{
+ /**
+ * Get the billing amount to be charged periodically
+ *
+ * @return integer
+ */
+ function getBillingAmount();
+
+ /**
+ * Get the number of billing cycles
+ *
+ *
+ * @return integer
+ */
+ function getBillingCycles();
+
+ /**
+ * Get the interval (day, month, year)
+ *
+ * @return integer
+ */
+ function getBillingInterval();
+
+ /*
+ * Get the date when the first billing request should be created
+ *
+ */
+ function getPlannedDate();
+}
@@ -0,0 +1,22 @@
+<?php
+/**
+ * (c) 2012 Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Vespolina\Entity\Billing;
+
+/**
+ * An interface for data handled on billing
+ *
+ * @author Luis Cordova <cordoval@gmail.com>
+ */
+interface BillingDataInterface
+{
+ /*
+ * Get data
+ */
+ function getData();
+}
@@ -0,0 +1,29 @@
+<?php
+/**
+ * (c) 2012 Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Vespolina\Entity\Billing;
+
+use Vespolina\Entity\Billing\BillingDataInterface;
+use Vespolina\Entity\Billing\BillingRequestInterface;
+
+/**
+ * An interface to generate new billing requests
+ *
+ * @author Daniel Kucharski <daniel-xerias.be>
+ */
+interface BillingRequestGeneratorInterface
+{
+ /*
+ * Generate new billing requests for a collection of subscriptions
+ *
+ *
+ * @return array \Vespolina\Entity\Billing\BillingRequestInterface
+ */
+
+ function generate(array BillingDataInterface);
+}
@@ -0,0 +1,48 @@
+<?php
+/**
+ * (c) 2012 Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Vespolina\Entity\Billing;
+
+use Vespolina\Entity\Order\OrderInterface;
+
+/**
+ * An interface for a request to bill a party
+ *
+ * @author Daniel Kucharski <daniel-xerias.be>
+ */
+interface BillingRequestInterface
+{
+ /**
+ * Get the last date when the billing run was performed for this item
+ *
+ *
+ * @return \DateTime
+ */
+ function getBillingDate();
+
+ /**
+ * Return the partner we would like to bill
+ *
+ * @return \Vespolina\Entity\Partner\PartnerInterface
+ */
+ function getBillingParty();
+
+ /**
+ * Get the earliest moment we can execute this billing request
+ *
+ * @return \DateTime
+ */
+ function getPlannedBillingDate();
+
+ /**
+ * Return if the billing request is blocked from being executed
+ *
+ * @return boolean
+ */
+ function isBlocked();
+}
@@ -0,0 +1,28 @@
+<?php
+/**
+ * (c) 2012 Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Vespolina\Entity\Billing;
+
+use Vespolina\Entity\Partner\PartnerInterface;
+
+/**
+ * An interface to manage the creation of billing requests
+ *
+ * @author Daniel Kucharski <daniel-xerias.be>
+ */
+interface BillingRequestManagerInterface
+{
+ /**
+ * Create a new billing request
+ *
+ * @param \Vespolina\Entity\Partner\PartnerInterface $partner
+ * @return \Vespolina\Entity\Billing\BillingRequestInterface
+ */
+ function createBillingRequest(PartnerInterface $partner);
+
+}

0 comments on commit c6ff121

Please sign in to comment.