telerivet 1.8.2 → 1.9.6

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.
@@ -0,0 +1,98 @@
1
+
2
+ module Telerivet
3
+
4
+ #
5
+ # Represents a webhook that is triggered when specific events occur within a project.
6
+ #
7
+ # Webhooks allow your server to receive HTTP POST requests when certain events
8
+ # happen, such as when a message's status changes or when a contact is updated.
9
+ #
10
+ # When an event occurs that matches a webhook's event types, Telerivet will
11
+ # send an HTTP POST request to the webhook URL with information about the event. For more
12
+ # information about the webhook request format, see the [Webhook API](/api/webhook)
13
+ # documentation.
14
+ #
15
+ # Note: The Webhook object is not used for notifying your server when incoming
16
+ # messages are received. To notify a URL when incoming messages are received, you can
17
+ # configure a webhook by [creating a Service](#Project.createService) with type
18
+ # incoming_message_webhook.
19
+ #
20
+ # Fields:
21
+ #
22
+ # - id (string, max 34 characters)
23
+ # * ID of the webhook
24
+ # * Read-only
25
+ #
26
+ # - url
27
+ # * URL that webhook requests are sent to
28
+ # * Updatable via API
29
+ #
30
+ # - secret
31
+ # * Secret included with webhook requests for authentication (sent as HTTP basic auth
32
+ # password with username 'telerivet')
33
+ # * Updatable via API
34
+ #
35
+ # - events (array of strings)
36
+ # * Array of event types that trigger this webhook. Possible values: `send_status`
37
+ # (message status updates), `send_broadcast` (broadcast sent), `contact_update` (contact
38
+ # added/updated/deleted), `message_metadata` (message metadata updated)
39
+ # * Updatable via API
40
+ #
41
+ # - project_id
42
+ # * ID of the project this webhook belongs to
43
+ # * Read-only
44
+ #
45
+ class Webhook < Entity
46
+ #
47
+ # Saves any fields that have changed for this webhook.
48
+ #
49
+ def save()
50
+ super
51
+ end
52
+
53
+ #
54
+ # Deletes the webhook.
55
+ #
56
+ def delete()
57
+ @api.do_request("DELETE", get_base_api_path())
58
+ end
59
+
60
+ def id
61
+ get('id')
62
+ end
63
+
64
+ def url
65
+ get('url')
66
+ end
67
+
68
+ def url=(value)
69
+ set('url', value)
70
+ end
71
+
72
+ def secret
73
+ get('secret')
74
+ end
75
+
76
+ def secret=(value)
77
+ set('secret', value)
78
+ end
79
+
80
+ def events
81
+ get('events')
82
+ end
83
+
84
+ def events=(value)
85
+ set('events', value)
86
+ end
87
+
88
+ def project_id
89
+ get('project_id')
90
+ end
91
+
92
+ def get_base_api_path()
93
+ "/projects/#{get('project_id')}/webhooks/#{get('id')}"
94
+ end
95
+
96
+ end
97
+
98
+ end
data/lib/telerivet.rb CHANGED
@@ -9,7 +9,7 @@ module Telerivet
9
9
  class API
10
10
  attr_reader :num_requests
11
11
 
12
- @@client_version = '1.8.2'
12
+ @@client_version = '1.9.6'
13
13
 
14
14
  #
15
15
  # Initializes a client handle to the Telerivet REST API.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telerivet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Young
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-09 00:00:00.000000000 Z
11
+ date: 2026-07-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby client library for Telerivet REST API
14
14
  email: support@telerivet.com
@@ -20,22 +20,28 @@ files:
20
20
  - lib/telerivet/airtimetransaction.rb
21
21
  - lib/telerivet/apicursor.rb
22
22
  - lib/telerivet/broadcast.rb
23
+ - lib/telerivet/campaign.rb
23
24
  - lib/telerivet/contact.rb
24
25
  - lib/telerivet/contactservicestate.rb
25
26
  - lib/telerivet/datarow.rb
26
27
  - lib/telerivet/datatable.rb
28
+ - lib/telerivet/dataview.rb
27
29
  - lib/telerivet/entity.rb
28
30
  - lib/telerivet/group.rb
29
31
  - lib/telerivet/label.rb
30
32
  - lib/telerivet/message.rb
33
+ - lib/telerivet/messagetemplate.rb
31
34
  - lib/telerivet/organization.rb
32
35
  - lib/telerivet/phone.rb
33
36
  - lib/telerivet/project.rb
34
37
  - lib/telerivet/relativescheduledmessage.rb
35
38
  - lib/telerivet/route.rb
36
39
  - lib/telerivet/scheduledmessage.rb
40
+ - lib/telerivet/scheduledservice.rb
37
41
  - lib/telerivet/service.rb
42
+ - lib/telerivet/storedfile.rb
38
43
  - lib/telerivet/task.rb
44
+ - lib/telerivet/webhook.rb
39
45
  homepage: http://telerivet.com
40
46
  licenses:
41
47
  - MIT