/** * Deletes a recurring bill item * @param parameters The parameters to be sent to the server * @param string $lang language of request see SupportedLanguages class * @return The response to the request sent * @throws PayUException * @throws InvalidArgumentException */ public static function delete($parameters, $lang = null) { $required = array(PayUParameters::RECURRING_BILL_ITEM_ID); CommonRequestUtil::validateParameters($parameters, $required); $recurrinbBillItem = PayUSubscriptionsRequestUtil::buildRecurringBillItem($parameters); $urlSegment = PayUSubscriptionsUrlResolver::getInstance()->getUrlSegment(PayUSubscriptionsUrlResolver::RECURRING_BILL_ITEM_ENTITY, PayUSubscriptionsUrlResolver::DELETE_OPERATION, array($recurrinbBillItem->id)); $payUHttpRequestInfo = PayUSubscriptionsRequestUtil::buildHttpRequestInfo($urlSegment, $lang, RequestMethod::DELETE); return PayUApiServiceUtil::sendRequest(NULL, $payUHttpRequestInfo); }