Skip to content

Commit

Permalink
rename billEntity() add executebillingRequest() to BillingManager
Browse files Browse the repository at this point in the history
  • Loading branch information
iampersistent committed Mar 23, 2013
1 parent 6aa5eb3 commit 95c54a0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 7 additions & 1 deletion lib/Vespolina/Billing/Manager/BillingManager.php
Expand Up @@ -77,6 +77,11 @@ public function createBillingRequest(BillingAgreementInterface $billingAgreement
return $billingRequest;
}

public function executeBillingRequest(BillingRequestInterface $billingRequest)
{

}

/**
* @param integer $id
* @return BillingAgreementInterface
Expand All @@ -95,8 +100,9 @@ public function findBillingAgreementById($id)
/**
* @inheritdoc
*/
public function billEntity($entity)
public function initializeBilling($entity)
{
// todo use PaymentProfile handler
$billingProcess = new DefaultBillingProcess($this, $this->eventDispatcher);
list($billingAgreements, $billingRequests) = $billingProcess->prepareBilling($entity);

Expand Down
12 changes: 10 additions & 2 deletions lib/Vespolina/Billing/Manager/BillingManagerInterface.php
Expand Up @@ -9,6 +9,7 @@
namespace Vespolina\Billing\Manager;

use Vespolina\Entity\Billing\BillingAgreementInterface;
use Vespolina\Entity\Billing\BillingRequestInterface;
use Vespolina\Entity\Order\OrderInterface;

/**
Expand All @@ -18,7 +19,6 @@
*/
interface BillingManagerInterface
{

/**
* Invokes the billing process for an entity (eg. recurring order, contract, ...)
*
Expand All @@ -28,7 +28,7 @@ interface BillingManagerInterface
*
* @return mixed
*/
function billEntity($entity);
function initializeBilling($entity);

/**
* @return \Vespolina\Entity\Billing\BillingAgreementInterface
Expand All @@ -43,6 +43,14 @@ function createBillingAgreement();
*/
function createBillingRequest(BillingAgreementInterface $partner);

/**
* Execute a BillingRequest to collect payment
*
* @param BillingRequestInterface $billingRequest
* @return mixed
*/
function executeBillingRequest(BillingRequestInterface $billingRequest);

/**
* Find billing agreements by specified fields and values
*
Expand Down

0 comments on commit 95c54a0

Please sign in to comment.