paypal-rest-api 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,55 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module PaypalAPI
4
- #
5
- # https://developer.paypal.com/docs/api/webhooks/v1/
6
- #
7
- class Webhooks < Collection
8
- module APIs
9
- #
10
- # https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_post
11
- #
12
- def create(query: nil, body: nil, headers: nil)
13
- client.post("/v1/notifications/webhooks", query: query, body: body, headers: headers)
14
- end
15
-
16
- #
17
- # https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_delete
18
- #
19
- def delete(webhook_id, query: nil, body: nil, headers: nil)
20
- client.delete("/v1/notifications/webhooks/#{webhook_id}", query: query, body: body, headers: headers)
21
- end
22
-
23
- #
24
- # https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_list
25
- #
26
- def list(query: nil, body: nil, headers: nil)
27
- client.get("/v1/notifications/webhooks", query: query, body: body, headers: headers)
28
- end
29
-
30
- #
31
- # https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_get
32
- #
33
- def show(webhook_id, query: nil, body: nil, headers: nil)
34
- client.get("/v1/notifications/webhooks/#{webhook_id}", query: query, body: body, headers: headers)
35
- end
36
-
37
- #
38
- # https://developer.paypal.com/docs/api/webhooks/v1/#webhooks_update
39
- #
40
- def update(webhook_id, query: nil, body: nil, headers: nil)
41
- client.patch("/v1/notifications/webhooks/#{webhook_id}", query: query, body: body, headers: headers)
42
- end
43
-
44
- #
45
- # https://developer.paypal.com/docs/api/webhooks/v1/#verify-webhook-signature_post
46
- #
47
- def verify(query: nil, body: nil, headers: nil)
48
- client.post("/v1/notifications/verify-webhook-signature", query: query, body: body, headers: headers)
49
- end
50
- end
51
-
52
- include APIs
53
- extend APIs
54
- end
55
- end