Updates to Sample Docs

This commit is contained in:
Travis
2016-06-06 18:43:20 +00:00
parent 3d92965b49
commit ece09926fd
66 changed files with 3285 additions and 245 deletions

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><title>notifications/DeleteAllWebhooks</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content="../"><meta name="groc-document-path" content="notifications/DeleteAllWebhooks"><meta name="groc-project-path" content="notifications/DeleteAllWebhooks.php"><link rel="stylesheet" type="text/css" media="all" href="../assets/style.css"><script type="text/javascript" src="../assets/behavior.js"></script><body><div id="meta"><div class="file-path">notifications/DeleteAllWebhooks.php</div></div><div id="document"><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-preprocessor">&lt;?php</span></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h1 id="delete-all-webhook-sample">Delete All Webhook Sample</h1>
<p>This is a sample helper method, to delete all existing webhooks, because of limited number of webhooks that are allowed per app.
To properly use the sample, change the clientId and Secret from bootstrap.php file with your own app ClientId and Secret.</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-instance">Get Webhook Instance</h2></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-comment">/**<span class="hljs-phpdoc"> @var</span> \PayPal\Api\WebhookList $webhookList */</span>
To properly use the sample, change the clientId and Secret from bootstrap.php file with your own app ClientId and Secret.</p></div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h2 id="get-webhook-instance">Get Webhook Instance</h2></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-comment">/** <span class="hljs-doctag">@var</span> \PayPal\Api\WebhookList $webhookList */</span>
<span class="hljs-variable">$webhookList</span> = <span class="hljs-keyword">require</span> <span class="hljs-string">'ListWebhooks.php'</span>;</div></div></div><div class="segment"><div class="comments "><div class="wrapper"><h3 id="delete-webhook">Delete Webhook</h3></div></div></div><div class="segment"><div class="code"><div class="wrapper"><span class="hljs-keyword">try</span> {
<span class="hljs-keyword">foreach</span> (<span class="hljs-variable">$webhookList</span>-&gt;getWebhooks() <span class="hljs-keyword">as</span> <span class="hljs-variable">$webhook</span>) {
<span class="hljs-variable">$webhook</span>-&gt;delete(<span class="hljs-variable">$apiContext</span>);