Get Invoice by ID
Get an invoice by its ID #
Example
Use the $API->findById(ChargeOverAPI_Object::TYPE_INVOICE, 2720);
method to find an invoice with the ID # of 2720.
<?php
header('Content-Type: text/plain');
require '../ChargeOverAPI.php';
require 'config.php';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
//Find an invoice by the invoice ID #
$resp = $API->findById(ChargeOverAPI_Object::TYPE_INVOICE, 2720);
if (!$API->isError($resp))
{
$Invoice = $resp->response;
print_r($Invoice);
//print_r($Invoice->getLineItems());
//print_r($Invoice->getLineItems(1));
//print($Invoice->getCustomerId());
}
else
{
print('There was an error looking up the invoice!' . "\n");
}