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,75 @@
{
"description":"Create a webhook",
"title":"Create a webhook",
"runnable":true,
"operationId":"webhooks.create",
"user":{
"scopes":[
"https://uri.paypal.com/services/applications/webhooks"
]
},
"credentials":{
"oauth":{
"path":"/v1/oauth/token",
"clientId":"",
"clientSecret":""
}
},
"request":{
"path":"v1/notifications/webhooks",
"method":"POST",
"headers":{
"Content-Type":"application/json",
"Authorization":"Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn"
},
"body":{
"url":"https://requestb.in/10ujt3c1",
"event_types":[
{
"name":"PAYMENT.AUTHORIZATION.CREATED"
},
{
"name":"PAYMENT.AUTHORIZATION.VOIDED"
}
]
}
},
"response":{
"status":"201",
"headers":{
"Content-Type":"application/json",
"Paypal-Debug-id":"0c444abc1d12d"
},
"body":{
"id":"0EH40505U7160970P",
"url":"https://requestb.in/10ujt3c1",
"event_types":[
{
"name":"PAYMENT.AUTHORIZATION.CREATED",
"description":"A payment authorization was created"
},
{
"name":"PAYMENT.AUTHORIZATION.VOIDED",
"description":"A payment authorization was voided"
}
],
"links":[
{
"href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P",
"rel":"self",
"method":"GET"
},
{
"href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P",
"rel":"update",
"method":"PATCH"
},
{
"href":"https://api.paypal.com/v1/notifications/webhooks/0EH40505U7160970P",
"rel":"delete",
"method":"DELETE"
}
]
}
}
}