Module: PaypalAPI::Webhooks::APIs
- Included in:
- PaypalAPI::Webhooks, PaypalAPI::Webhooks
- Defined in:
- lib/paypal-api/api_collections/webhooks.rb
Overview
Common methods for PaypalAPI::Webhooks class and client.webhooks instance
Instance Method Summary collapse
-
#create(query: nil, body: nil, headers: nil) ⇒ Response
Create webhook.
-
#delete(webhook_id, query: nil, body: nil, headers: nil) ⇒ Response
Delete webhook.
-
#event_types(webhook_id, query: nil, body: nil, headers: nil) ⇒ Response
List event subscriptions for webhook.
-
#list(query: nil, body: nil, headers: nil) ⇒ Response
List webhooks.
-
#show(webhook_id, query: nil, body: nil, headers: nil) ⇒ Response
Show webhook details.
-
#update(webhook_id, query: nil, body: nil, headers: nil) ⇒ Response
Update webhook.
-
#verify(query: nil, body: nil, headers: nil) ⇒ Response
Verify webhook signature.
Instance Method Details
#create(query: nil, body: nil, headers: nil) ⇒ Response
Create webhook
25 26 27 |
# File 'lib/paypal-api/api_collections/webhooks.rb', line 25 def create(query: nil, body: nil, headers: nil) client.post("/v1/notifications/webhooks", query: query, body: body, headers: headers) end |
#delete(webhook_id, query: nil, body: nil, headers: nil) ⇒ Response
Delete webhook
72 73 74 |
# File 'lib/paypal-api/api_collections/webhooks.rb', line 72 def delete(webhook_id, query: nil, body: nil, headers: nil) client.delete("/v1/notifications/webhooks/#{encode(webhook_id)}", query: query, body: body, headers: headers) end |
#event_types(webhook_id, query: nil, body: nil, headers: nil) ⇒ Response
List event subscriptions for webhook
84 85 86 |
# File 'lib/paypal-api/api_collections/webhooks.rb', line 84 def event_types(webhook_id, query: nil, body: nil, headers: nil) client.get("/v1/notifications/webhooks/#{encode(webhook_id)}/event-types", query: query, body: body, headers: headers) end |
#list(query: nil, body: nil, headers: nil) ⇒ Response
List webhooks
36 37 38 |
# File 'lib/paypal-api/api_collections/webhooks.rb', line 36 def list(query: nil, body: nil, headers: nil) client.get("/v1/notifications/webhooks", query: query, body: body, headers: headers) end |
#show(webhook_id, query: nil, body: nil, headers: nil) ⇒ Response
Show webhook details
48 49 50 |
# File 'lib/paypal-api/api_collections/webhooks.rb', line 48 def show(webhook_id, query: nil, body: nil, headers: nil) client.get("/v1/notifications/webhooks/#{encode(webhook_id)}", query: query, body: body, headers: headers) end |
#update(webhook_id, query: nil, body: nil, headers: nil) ⇒ Response
Update webhook
60 61 62 |
# File 'lib/paypal-api/api_collections/webhooks.rb', line 60 def update(webhook_id, query: nil, body: nil, headers: nil) client.patch("/v1/notifications/webhooks/#{encode(webhook_id)}", query: query, body: body, headers: headers) end |
#verify(query: nil, body: nil, headers: nil) ⇒ Response
Verify webhook signature
95 96 97 |
# File 'lib/paypal-api/api_collections/webhooks.rb', line 95 def verify(query: nil, body: nil, headers: nil) client.post("/v1/notifications/verify-webhook-signature", query: query, body: body, headers: headers) end |