/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { if (file_exists('../config.php')) { include '../config.php'; } else { include 'config.php'; } $transport = getTransport($config); $mapper = new XmlMapper(); $connector = new ApiConnector($config['clientname'], $transport, $mapper); $this->object = $connector->getService('InvoiceProfile'); }
/** * Get the raw PDF content * @param Estimate $estimate * @return string */ public function getPdf(Estimate $estimate) { return $this->connector->getPdf($estimate); }
/** * Delete contact note * @param Note $note * @param Contact $contact * @return self */ public function deleteNote(Note $note, Contact $contact) { $this->connector->delete($note, $contact); return $this; }
public function getAll() { return $this->connector->getAll(__NAMESPACE__); }
/** * Settle the payments * * @param IncomingInvoice $invoiceA * @param IncomingInvoice $invoiceB * @throws InvalidStateException * @throws UnableToSettleException */ public function settle(IncomingInvoice $invoiceA, IncomingInvoice $invoiceB) { return $this->connector->settle($invoiceA, $invoiceB); }
/** * Deletes a template * @param RecurringTemplate $template * @return self */ public function delete(RecurringTemplate $template) { $this->connector->delete($template); return $this; }
/** * Settle the payments * * @param Invoice $invoiceA * @param Invoice $invoiceB * @param bool $sendEmail * @throws InvalidStateException * @throws UnableToSettleException */ public function settle(Invoice $invoiceA, Invoice $invoiceB, $sendEmail = false) { return $this->connector->settle($invoiceA, $invoiceB, $sendEmail); }