Updated Invoice Object to retrieve payments and refunds

- getPaymentDetails is now getPayments
- getRefundDetails is now getRefunds
- Updated Sample to Get Invoice at the end of each operation
- Updated Tests
This commit is contained in:
japatel
2015-01-09 16:56:00 -06:00
parent ebcfd28aef
commit 095ab24b62
14 changed files with 412 additions and 767 deletions

View File

@@ -36,3 +36,19 @@ try {
ResultPrinter::printResult("Remind Invoice", "Invoice", null, $notify, null);
// ### Retrieve Invoice
// Retrieve the invoice object by calling the
// static `get` method
// on the Invoice class by passing a valid
// Invoice ID
// (See bootstrap.php for more on `ApiContext`)
try {
$invoice = Invoice::get($invoice->getId(), $apiContext);
} catch (Exception $ex) {
ResultPrinter::printError("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $ex);
exit(1);
}
ResultPrinter::printResult("Get Invoice (Not Required - For Sample Only)", "Invoice", $invoice->getId(), $invoice->getId(), $invoice);
return $invoice;