hooksniff 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +42 -13
  3. data/lib/hooksniff/api/alert.rb +34 -0
  4. data/lib/hooksniff/api/analytics.rb +21 -0
  5. data/lib/hooksniff/api/api_key.rb +26 -0
  6. data/lib/hooksniff/api/application.rb +30 -0
  7. data/lib/hooksniff/api/audit_log.rb +17 -0
  8. data/lib/hooksniff/api/background_task.rb +21 -0
  9. data/lib/hooksniff/api/billing.rb +34 -0
  10. data/lib/hooksniff/api/connector.rb +33 -0
  11. data/lib/hooksniff/api/custom_domain.rb +26 -0
  12. data/lib/hooksniff/api/environment.rb +47 -0
  13. data/lib/hooksniff/api/inbound.rb +30 -0
  14. data/lib/hooksniff/api/message_poller.rb +21 -0
  15. data/lib/hooksniff/api/notification.rb +30 -0
  16. data/lib/hooksniff/api/operational_webhook.rb +34 -0
  17. data/lib/hooksniff/api/playground.rb +17 -0
  18. data/lib/hooksniff/api/portal.rb +33 -0
  19. data/lib/hooksniff/api/rate_limit.rb +26 -0
  20. data/lib/hooksniff/api/routing.rb +21 -0
  21. data/lib/hooksniff/api/schema.rb +25 -0
  22. data/lib/hooksniff/api/search.rb +13 -0
  23. data/lib/hooksniff/api/service_token.rb +22 -0
  24. data/lib/hooksniff/api/sso.rb +26 -0
  25. data/lib/hooksniff/api/team.rb +42 -0
  26. data/lib/hooksniff/api/template.rb +21 -0
  27. data/lib/hooksniff/models/aggregate_event_types_out.rb +59 -0
  28. data/lib/hooksniff/models/message_attempt_recovered_event.rb +53 -0
  29. data/lib/hooksniff/models/message_attempt_recovered_event_data.rb +70 -0
  30. data/lib/hooksniff/models/message_in.rb +1 -0
  31. data/lib/hooksniff/version.rb +1 -1
  32. data/lib/hooksniff.rb +132 -66
  33. metadata +30 -9
  34. data/lib/hooksniff/background_task.rb +0 -21
  35. data/lib/hooksniff/connector.rb +0 -33
  36. data/lib/hooksniff/environment.rb +0 -53
  37. data/lib/hooksniff/inbound.rb +0 -25
  38. data/lib/hooksniff/message_poller.rb +0 -32
  39. data/lib/hooksniff/operational_webhook.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9eed443c71c5bfe95ea6f2aa6173480e01b1b2528d064e52071e07dff360144
4
- data.tar.gz: c3c58215fdbe0d8e3110dd1359b5662963999ea887ed3aa6d2b2bfabb4bc79a5
3
+ metadata.gz: 441fb04faed964e0da0b8827caa0f3f13bd50ff3eec641a928524cecda99d56f
4
+ data.tar.gz: 937d0f461fb8f52c3dec0a69b0849b8d603719ff883c7ec11ed72ca0bb0dac63
5
5
  SHA512:
6
- metadata.gz: 2491e4a7ce09b46eedd9e40696c3f35d1a587d2be02a79c8dbfdc0879135d1ef0e5936ce58a1e64a7c5e82044358a63a61926d5dd5a6d3e91087cac9705cabdd
7
- data.tar.gz: d6e137768bbf254de889673110bfb8826029b5b323daef6453d1b01921e2bfe81a02869b008d4c86aad63c56eae07c71a205d0a9f471e96604f8c001d6abfe21
6
+ metadata.gz: 6fb0d72135f9c5e271ef0f9cfc2aec85818fdc164f945b80fb64415196f9b6142408559ea9c3c19a3d1ec6d152f2eaaf691d99446dbb8b7b9b9f38961931b63a
7
+ data.tar.gz: 3aa6ffb82540a1352671673422fc7751bf47037d262b3e515cbcd5579bc4d027628ef0143834d8c01ad12f8052175391ba5e7591ff8ae38f5577884c7dd96540
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  <p align="center">
4
4
  <a href="https://github.com/servetarslan02/HookSniff"><img src="https://img.shields.io/github/license/servetarslan02/HookSniff" alt="License"></a>
5
+ <a href="https://rubygems.org/gems/hooksniff"><img src="https://img.shields.io/gems/v/hooksniff" alt="Gem"></a>
5
6
  </p>
6
7
 
7
8
  Ruby SDK for the [HookSniff](https://hooksniff.com) webhook delivery platform.
@@ -18,27 +19,55 @@ gem install hooksniff
18
19
  require "hooksniff"
19
20
 
20
21
  client = HookSniff::Client.new("hs_xxx")
22
+
23
+ # List endpoints
21
24
  endpoints = client.endpoint.list
22
- puts endpoints
23
- ```
24
25
 
25
- ## Webhook Verification
26
+ # Create a message
27
+ msg = client.message.create(event_type: "order.created", payload: { order_id: "123" })
26
28
 
27
- ```ruby
29
+ # Verify webhook signature
28
30
  wh = HookSniff::Webhook.new("whsec_xxx")
29
31
  payload = wh.verify(body, headers)
30
32
  ```
31
33
 
32
- ## Resources
34
+ ## Resources (30+)
33
35
 
34
- | Resource | Methods |
35
- |----------|---------|
36
- | Endpoint | list, create, get, update, delete |
37
- | Message | create, list, get |
38
- | MessageAttempt | list, listByMsg, get, resend |
39
- | Authentication | dashboardAccess |
40
- | EventType | list |
41
- | Statistics | aggregate |
36
+ | Resource | Description |
37
+ |----------|-------------|
38
+ | **Endpoint** | CRUD, secret rotation, headers |
39
+ | **Message** | Create, list, get |
40
+ | **MessageAttempt** | List by endpoint/msg, get, resend |
41
+ | **Authentication** | Logout |
42
+ | **EventType** | CRUD |
43
+ | **Statistics** | Aggregate stats |
44
+ | **Health** | API health check |
45
+ | **Environment** | Environment & variable management (Faz 8) |
46
+ | **BackgroundTask** | List, get, cancel (Faz 9) |
47
+ | **OperationalWebhook** | Endpoint & delivery management (Faz 10) |
48
+ | **MessagePoller** | Poll, seek, commit (Faz 11) |
49
+ | **Inbound** | Inbound webhook configs (Faz 12) |
50
+ | **Connector** | Connector & config management (Faz 13) |
51
+ | **Integration** | CRUD, test, events, stats (Faz 14) |
52
+ | **Stream** | Channels, subscriptions, publish (Faz 15) |
53
+ | **Application** | Application management |
54
+ | **ApiKey** | API key CRUD, rotate |
55
+ | **Search** | Full-text delivery search |
56
+ | **Alert** | Alert rule CRUD, test |
57
+ | **Analytics** | Delivery trends, success rate, latency |
58
+ | **Billing** | Subscription, usage, invoices, portal |
59
+ | **Portal** | Profile, plan, notifications |
60
+ | **Team** | Teams, invites, members, roles |
61
+ | **Notification** | List, read, unread count |
62
+ | **Sso** | SSO config management |
63
+ | **AuditLog** | Audit entry listing |
64
+ | **CustomDomain** | Domain management, verification |
65
+ | **RateLimit** | Per-endpoint rate limits |
66
+ | **Routing** | Routing rules, endpoint health |
67
+ | **Template** | Template listing, apply |
68
+ | **Schema** | Schema registry, validation |
69
+ | **Playground** | Test webhooks |
70
+ | **ServiceToken** | Service token management |
42
71
 
43
72
  ## Links
44
73
 
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Alert
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list
10
+ @client.execute_request("GET", "/v1/alerts")
11
+ end
12
+
13
+ def get(id)
14
+ @client.execute_request("GET", "/v1/alerts/#{id}")
15
+ end
16
+
17
+ def create(attrs)
18
+ @client.execute_request("POST", "/v1/alerts", body: attrs)
19
+ end
20
+
21
+ def update(id, attrs)
22
+ @client.execute_request("PUT", "/v1/alerts/#{id}", body: attrs)
23
+ end
24
+
25
+ def delete(id)
26
+ @client.execute_request("DELETE", "/v1/alerts/#{id}")
27
+ nil
28
+ end
29
+
30
+ def test(id)
31
+ @client.execute_request("POST", "/v1/alerts/#{id}/test")
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Analytics
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def delivery_trend(params = {})
10
+ @client.execute_request("GET", "/v1/analytics/deliveries", query_params: params)
11
+ end
12
+
13
+ def success_rate(params = {})
14
+ @client.execute_request("GET", "/v1/analytics/success-rate", query_params: params)
15
+ end
16
+
17
+ def latency(params = {})
18
+ @client.execute_request("GET", "/v1/analytics/latency", query_params: params)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class ApiKey
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list
10
+ @client.execute_request("GET", "/v1/api-keys")
11
+ end
12
+
13
+ def create(attrs)
14
+ @client.execute_request("POST", "/v1/api-keys", body: attrs)
15
+ end
16
+
17
+ def delete(id)
18
+ @client.execute_request("DELETE", "/v1/api-keys/#{id}")
19
+ nil
20
+ end
21
+
22
+ def rotate(id)
23
+ @client.execute_request("POST", "/v1/api-keys/#{id}/rotate")
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Application
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list(params = {})
10
+ @client.execute_request("GET", "/v1/applications", query_params: params)
11
+ end
12
+
13
+ def get(id)
14
+ @client.execute_request("GET", "/v1/applications/#{id}")
15
+ end
16
+
17
+ def create(attrs)
18
+ @client.execute_request("POST", "/v1/applications", body: attrs)
19
+ end
20
+
21
+ def update(id, attrs)
22
+ @client.execute_request("PUT", "/v1/applications/#{id}", body: attrs)
23
+ end
24
+
25
+ def delete(id)
26
+ @client.execute_request("DELETE", "/v1/applications/#{id}")
27
+ nil
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class AuditLog
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list(params = {})
10
+ @client.execute_request("GET", "/v1/audit-log", query_params: params)
11
+ end
12
+
13
+ def get(id)
14
+ @client.execute_request("GET", "/v1/audit-log/#{id}")
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class BackgroundTask
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list(params = {})
10
+ @client.execute_request("GET", "/v1/background-tasks", query_params: params)
11
+ end
12
+
13
+ def get(id)
14
+ @client.execute_request("GET", "/v1/background-tasks/#{id}")
15
+ end
16
+
17
+ def cancel(id)
18
+ @client.execute_request("PUT", "/v1/background-tasks/#{id}")
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Billing
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def get_subscription
10
+ @client.execute_request("GET", "/v1/billing/subscription")
11
+ end
12
+
13
+ def cancel_subscription
14
+ @client.execute_request("DELETE", "/v1/billing/subscription")
15
+ nil
16
+ end
17
+
18
+ def upgrade(attrs)
19
+ @client.execute_request("POST", "/v1/billing/upgrade", body: attrs)
20
+ end
21
+
22
+ def open_portal
23
+ @client.execute_request("POST", "/v1/billing/portal")
24
+ end
25
+
26
+ def get_usage
27
+ @client.execute_request("GET", "/v1/billing/usage")
28
+ end
29
+
30
+ def get_invoices
31
+ @client.execute_request("GET", "/v1/billing/invoices")
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Connector
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list(params = {})
10
+ @client.execute_request("GET", "/v1/connectors", query_params: params)
11
+ end
12
+
13
+ def get(id)
14
+ @client.execute_request("GET", "/v1/connectors/#{id}")
15
+ end
16
+
17
+ def list_configs
18
+ @client.execute_request("GET", "/v1/connectors/configs")
19
+ end
20
+
21
+ def get_config(id)
22
+ @client.execute_request("GET", "/v1/connectors/configs/#{id}")
23
+ end
24
+
25
+ def create_config(attrs)
26
+ @client.execute_request("POST", "/v1/connectors/configs", body: attrs)
27
+ end
28
+
29
+ def update_config(id, attrs)
30
+ @client.execute_request("PUT", "/v1/connectors/configs/#{id}", body: attrs)
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class CustomDomain
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list
10
+ @client.execute_request("GET", "/v1/custom-domains")
11
+ end
12
+
13
+ def add(attrs)
14
+ @client.execute_request("POST", "/v1/custom-domains", body: attrs)
15
+ end
16
+
17
+ def delete(id)
18
+ @client.execute_request("DELETE", "/v1/custom-domains/#{id}")
19
+ nil
20
+ end
21
+
22
+ def verify(id)
23
+ @client.execute_request("POST", "/v1/custom-domains/#{id}/verify")
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Environment
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list(params = {})
10
+ @client.execute_request("GET", "/v1/environments", query_params: params)
11
+ end
12
+
13
+ def get(id)
14
+ @client.execute_request("GET", "/v1/environments/#{id}")
15
+ end
16
+
17
+ def create(attrs)
18
+ @client.execute_request("POST", "/v1/environments", body: attrs)
19
+ end
20
+
21
+ def update(id, attrs)
22
+ @client.execute_request("PUT", "/v1/environments/#{id}", body: attrs)
23
+ end
24
+
25
+ def delete(id)
26
+ @client.execute_request("DELETE", "/v1/environments/#{id}")
27
+ nil
28
+ end
29
+
30
+ def list_variables(env_id)
31
+ @client.execute_request("GET", "/v1/environments/#{env_id}/variables")
32
+ end
33
+
34
+ def create_variable(env_id, attrs)
35
+ @client.execute_request("POST", "/v1/environments/#{env_id}/variables", body: attrs)
36
+ end
37
+
38
+ def update_variable(env_id, var_id, attrs)
39
+ @client.execute_request("PUT", "/v1/environments/#{env_id}/variables/#{var_id}", body: attrs)
40
+ end
41
+
42
+ def delete_variable(env_id, var_id)
43
+ @client.execute_request("DELETE", "/v1/environments/#{env_id}/variables/#{var_id}")
44
+ nil
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Inbound
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list_configs
10
+ @client.execute_request("GET", "/v1/inbound/configs")
11
+ end
12
+
13
+ def get_config(id)
14
+ @client.execute_request("GET", "/v1/inbound/configs/#{id}")
15
+ end
16
+
17
+ def create_config(attrs)
18
+ @client.execute_request("POST", "/v1/inbound/configs", body: attrs)
19
+ end
20
+
21
+ def update_config(id, attrs)
22
+ @client.execute_request("PUT", "/v1/inbound/configs/#{id}", body: attrs)
23
+ end
24
+
25
+ def delete_config(id)
26
+ @client.execute_request("DELETE", "/v1/inbound/configs/#{id}")
27
+ nil
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class MessagePoller
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def poll(params = {})
10
+ @client.execute_request("GET", "/v1/message-poller/poll", query_params: params)
11
+ end
12
+
13
+ def seek(attrs)
14
+ @client.execute_request("POST", "/v1/message-poller/seek", body: attrs)
15
+ end
16
+
17
+ def commit(attrs)
18
+ @client.execute_request("POST", "/v1/message-poller/commit", body: attrs)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Notification
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list
10
+ @client.execute_request("GET", "/v1/notifications")
11
+ end
12
+
13
+ def unread_count
14
+ @client.execute_request("GET", "/v1/notifications/unread-count")
15
+ end
16
+
17
+ def mark_all_read
18
+ @client.execute_request("PUT", "/v1/notifications/read-all")
19
+ end
20
+
21
+ def mark_read(id)
22
+ @client.execute_request("PUT", "/v1/notifications/#{id}/read")
23
+ end
24
+
25
+ def delete(id)
26
+ @client.execute_request("DELETE", "/v1/notifications/#{id}")
27
+ nil
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class OperationalWebhook
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list_endpoints(params = {})
10
+ @client.execute_request("GET", "/v1/operational-webhooks", query_params: params)
11
+ end
12
+
13
+ def get_endpoint(id)
14
+ @client.execute_request("GET", "/v1/operational-webhooks/#{id}")
15
+ end
16
+
17
+ def create_endpoint(attrs)
18
+ @client.execute_request("POST", "/v1/operational-webhooks", body: attrs)
19
+ end
20
+
21
+ def update_endpoint(id, attrs)
22
+ @client.execute_request("PUT", "/v1/operational-webhooks/#{id}", body: attrs)
23
+ end
24
+
25
+ def delete_endpoint(id)
26
+ @client.execute_request("DELETE", "/v1/operational-webhooks/#{id}")
27
+ nil
28
+ end
29
+
30
+ def list_deliveries(endpoint_id)
31
+ @client.execute_request("GET", "/v1/operational-webhooks/#{endpoint_id}/deliveries")
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Playground
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def get
10
+ @client.execute_request("GET", "/v1/playground")
11
+ end
12
+
13
+ def test(attrs)
14
+ @client.execute_request("POST", "/v1/playground/test", body: attrs)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Portal
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def get_profile
10
+ @client.execute_request("GET", "/v1/portal/me")
11
+ end
12
+
13
+ def update_profile(attrs)
14
+ @client.execute_request("PUT", "/v1/portal/me", body: attrs)
15
+ end
16
+
17
+ def get_usage
18
+ @client.execute_request("GET", "/v1/portal/usage")
19
+ end
20
+
21
+ def get_plan
22
+ @client.execute_request("GET", "/v1/portal/plan")
23
+ end
24
+
25
+ def get_notifications
26
+ @client.execute_request("GET", "/v1/portal/notifications")
27
+ end
28
+
29
+ def update_notifications(attrs)
30
+ @client.execute_request("PUT", "/v1/portal/notifications", body: attrs)
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class RateLimit
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list
10
+ @client.execute_request("GET", "/v1/rate-limits")
11
+ end
12
+
13
+ def get(endpoint_id)
14
+ @client.execute_request("GET", "/v1/rate-limits/#{endpoint_id}")
15
+ end
16
+
17
+ def set(endpoint_id, attrs)
18
+ @client.execute_request("POST", "/v1/rate-limits/#{endpoint_id}", body: attrs)
19
+ end
20
+
21
+ def delete(endpoint_id)
22
+ @client.execute_request("DELETE", "/v1/rate-limits/#{endpoint_id}")
23
+ nil
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Routing
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def get(endpoint_id)
10
+ @client.execute_request("GET", "/v1/routing/#{endpoint_id}/routing")
11
+ end
12
+
13
+ def update(endpoint_id, attrs)
14
+ @client.execute_request("PUT", "/v1/routing/#{endpoint_id}/routing", body: attrs)
15
+ end
16
+
17
+ def get_health(endpoint_id)
18
+ @client.execute_request("GET", "/v1/routing/#{endpoint_id}/health")
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Schema
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list
10
+ @client.execute_request("GET", "/v1/schemas")
11
+ end
12
+
13
+ def get(id)
14
+ @client.execute_request("GET", "/v1/schemas/#{id}")
15
+ end
16
+
17
+ def register(attrs)
18
+ @client.execute_request("POST", "/v1/schemas", body: attrs)
19
+ end
20
+
21
+ def validate(id, attrs)
22
+ @client.execute_request("POST", "/v1/schemas/#{id}/validate", body: attrs)
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class Search
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def search(params = {})
10
+ @client.execute_request("GET", "/v1/search", query_params: params)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HookSniff
4
+ class ServiceToken
5
+ def initialize(client)
6
+ @client = client
7
+ end
8
+
9
+ def list
10
+ @client.execute_request("GET", "/v1/service-tokens")
11
+ end
12
+
13
+ def create(attrs)
14
+ @client.execute_request("POST", "/v1/service-tokens", body: attrs)
15
+ end
16
+
17
+ def delete(id)
18
+ @client.execute_request("DELETE", "/v1/service-tokens/#{id}")
19
+ nil
20
+ end
21
+ end
22
+ end