public function getBillInformation() { if ($this->billInformation == null) { $b = new BillInformation($this->transactionManager); $b->setUrl($this->transactionManager->getUrl() . "recurring-bill/"); $b->getBillForRecurringBillInformationById($this->lastRecurringBillResponse->getRecurringBillId()); $this->billInformation = $b; } return $this->billInformation; }
public static function fromJson($data) { if (!is_null($data)) { $billInformation = new BillInformation(); $billInformation->convertData($data); $billInformation->convertDataToBill($data); return $billInformation; } }
/** * Perform a new query that retrieves you the list of bills for recurring bills Information. * * @return an BillInformation list object. * @see {@link com.payhub.ws.api.BillInformation}; */ public function getAllBillForRecurringBillInformation() { $url = $this->getUrl() . "bill-for-recurring-bill/"; $request = $this->setHeadersGet($url, $this->_oauthToken); $result = $this->doGet($request); if (array_key_exists('_embedded', $result)) { foreach ($result['_embedded']['billsforrecurringbill'] as $billForSale) { $response_tmp = BillInformation::fromJson(json_encode($billForSale)); $response_tmp->setTransactionManager($this); $response[] = $response_tmp; } return $response; } else { $errors_tmp = new Errors(); foreach ($result as $errorData) { $errors_tmp = Errors::fromArray($errorData); } $errors[] = $errors_tmp; return $errors; } }
/** * @return mixed */ public function getBillInformation() { if ($this->billInformation == null) { $b = new BillInformation($this->transactionManager); $b->setUrl($this->transactionManager->getUrl() . "sale/"); $b->getBillForSaleInformationByTransactionId($this->saleResponse->getSaleId()); $this->billInformation = $b; } return $this->billInformation; }
/** * Perform a new query that retrieves you the list of bills for recurring bills Information. * * @return an BillInformation list object. * @see {@link com.payhub.ws.api.BillInformation}; */ public function getAllBillForRecurringBillInformation() { $url = $this->getUrl() . "bill-for-recurring-bill/"; $request = $this->setHeadersGet($url, $this->_oauthToken); $result = $this->doGet($request); foreach ($result['_embedded']['billsforrecurringbill'] as $billForSale) { $response_tmp = BillInformation::fromJson(json_encode($billForSale)); $response_tmp->setTransactionManager($this); $response[] = $response_tmp; } return $response; }
public function getBillInformation() { if ($this->billInformation == null) { $b = new BillInformation($this->transactionManager); $b->setUrl($this->transactionManager->getUrl() . "authonly/"); $b->getBillForRecurringBillInformationById($this->authOnlyResponse->getTransactionId()); $this->billInformation = $b; } return $this->billInformation; }