/**
  * 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');
 }
Exemplo n.º 2
0
 /**
  * Get the raw PDF content
  * @param Estimate $estimate
  * @return string
  */
 public function getPdf(Estimate $estimate)
 {
     return $this->connector->getPdf($estimate);
 }
Exemplo n.º 3
0
 /**
  * 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;
 }
Exemplo n.º 4
0
 public function getAll()
 {
     return $this->connector->getAll(__NAMESPACE__);
 }
Exemplo n.º 5
0
 /**
  * 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);
 }
Exemplo n.º 6
0
 /**
  * Deletes a template
  * @param RecurringTemplate $template
  * @return self
  */
 public function delete(RecurringTemplate $template)
 {
     $this->connector->delete($template);
     return $this;
 }
Exemplo n.º 7
0
 /**
  * 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);
 }