More Webhook API Changes

- Updated API Models with Fixes
- Updated Samples
- Additional Functional Tests
This commit is contained in:
japatel
2014-12-12 17:00:33 -06:00
parent d6575b49ae
commit fb9584ba66
30 changed files with 1454 additions and 73 deletions

View File

@@ -0,0 +1,27 @@
<?php
// # Get All Webhooks Sample
//
// Use this call to list all the webhooks, as documented here at:
// https://developer.paypal.com/webapps/developer/docs/api/#list-all-webhooks
// API used: GET /v1/notifications/webhooks
// ## List Webhooks
// This step is not necessarily required. We are creating a webhook for sample purpose only, so that we would not
// get an empty list at any point.
// In real case, you dont need to create any webhook to make this API call.
/** @var \PayPal\Api\Webhook $webhook */
$webhook = require_once __DIR__ . '/../bootstrap.php';
// ### Get List of All Webhooks
try {
$output = \PayPal\Api\Webhook::getAll($apiContext);
} catch (Exception $ex) {
ResultPrinter::printError("List all webhooks", "WebhookList", null, $webhookId, $ex);
exit(1);
}
ResultPrinter::printResult("List all webhooks", "WebhookList",null, null, $output);
return $output;