telerivet 1.8.5 → 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.
- checksums.yaml +4 -4
- data/lib/telerivet/airtimetransaction.rb +2 -1
- data/lib/telerivet/broadcast.rb +12 -6
- data/lib/telerivet/campaign.rb +481 -0
- data/lib/telerivet/contact.rb +20 -1
- data/lib/telerivet/contactservicestate.rb +4 -2
- data/lib/telerivet/datatable.rb +174 -0
- data/lib/telerivet/dataview.rb +132 -0
- data/lib/telerivet/group.rb +32 -0
- data/lib/telerivet/label.rb +1 -1
- data/lib/telerivet/message.rb +28 -6
- data/lib/telerivet/organization.rb +299 -22
- data/lib/telerivet/phone.rb +49 -1
- data/lib/telerivet/project.rb +734 -104
- data/lib/telerivet/relativescheduledmessage.rb +11 -10
- data/lib/telerivet/route.rb +8 -0
- data/lib/telerivet/scheduledmessage.rb +7 -6
- data/lib/telerivet/service.rb +21 -3
- data/lib/telerivet/storedfile.rb +167 -0
- data/lib/telerivet.rb +1 -1
- metadata +5 -2
|
@@ -36,10 +36,10 @@ module Telerivet
|
|
|
36
36
|
# * Updatable via API
|
|
37
37
|
#
|
|
38
38
|
# - offset_scale
|
|
39
|
-
# * The type of interval
|
|
40
|
-
# date
|
|
41
|
-
#
|
|
42
|
-
# * Allowed values: D, W, M, Y
|
|
39
|
+
# * The type of interval that will be used to adjust the scheduled date relative to the
|
|
40
|
+
# date stored in the contact's date_variable, when offset_count is non-zero (I=minutes,
|
|
41
|
+
# D=day, W=week, M=month, Y=year)
|
|
42
|
+
# * Allowed values: I, D, W, M, Y
|
|
43
43
|
# * Updatable via API
|
|
44
44
|
#
|
|
45
45
|
# - offset_count (int)
|
|
@@ -126,12 +126,9 @@ module Telerivet
|
|
|
126
126
|
# * Updatable via API
|
|
127
127
|
#
|
|
128
128
|
# - media (array)
|
|
129
|
-
# *
|
|
130
|
-
#
|
|
131
|
-
#
|
|
132
|
-
# contain media files. Note: For files uploaded via the Telerivet web app, the URL is
|
|
133
|
-
# temporary and may not be valid for more than 1 day.
|
|
134
|
-
# * Read-only
|
|
129
|
+
# * Array of media attachments for the text message. This property is undefined for
|
|
130
|
+
# messages that do not contain media files.
|
|
131
|
+
# * Updatable via API
|
|
135
132
|
#
|
|
136
133
|
# - route_params (Hash)
|
|
137
134
|
# * Route-specific parameters to use when sending the message.
|
|
@@ -340,6 +337,10 @@ class RelativeScheduledMessage < Entity
|
|
|
340
337
|
get('media')
|
|
341
338
|
end
|
|
342
339
|
|
|
340
|
+
def media=(value)
|
|
341
|
+
set('media', value)
|
|
342
|
+
end
|
|
343
|
+
|
|
343
344
|
def route_params
|
|
344
345
|
get('route_params')
|
|
345
346
|
end
|
data/lib/telerivet/route.rb
CHANGED
|
@@ -28,6 +28,10 @@ module Telerivet
|
|
|
28
28
|
# Setting a variable to null will delete the variable.
|
|
29
29
|
# * Updatable via API
|
|
30
30
|
#
|
|
31
|
+
# - url
|
|
32
|
+
# * URL to this route in the Telerivet web app
|
|
33
|
+
# * Read-only
|
|
34
|
+
#
|
|
31
35
|
# - project_id
|
|
32
36
|
# * ID of the project this route belongs to
|
|
33
37
|
# * Read-only
|
|
@@ -57,6 +61,10 @@ class Route < Entity
|
|
|
57
61
|
set('name', value)
|
|
58
62
|
end
|
|
59
63
|
|
|
64
|
+
def url
|
|
65
|
+
get('url')
|
|
66
|
+
end
|
|
67
|
+
|
|
60
68
|
def project_id
|
|
61
69
|
get('project_id')
|
|
62
70
|
end
|
|
@@ -130,12 +130,9 @@ module Telerivet
|
|
|
130
130
|
# * Updatable via API
|
|
131
131
|
#
|
|
132
132
|
# - media (array)
|
|
133
|
-
# *
|
|
134
|
-
#
|
|
135
|
-
#
|
|
136
|
-
# contain media files. Note: For files uploaded via the Telerivet web app, the URL is
|
|
137
|
-
# temporary and may not be valid for more than 1 day.
|
|
138
|
-
# * Read-only
|
|
133
|
+
# * Array of media attachments for the text message. This property is undefined for
|
|
134
|
+
# messages that do not contain media files.
|
|
135
|
+
# * Updatable via API
|
|
139
136
|
#
|
|
140
137
|
# - route_params (Hash)
|
|
141
138
|
# * Route-specific parameters to use when sending the message.
|
|
@@ -346,6 +343,10 @@ class ScheduledMessage < Entity
|
|
|
346
343
|
get('media')
|
|
347
344
|
end
|
|
348
345
|
|
|
346
|
+
def media=(value)
|
|
347
|
+
set('media', value)
|
|
348
|
+
end
|
|
349
|
+
|
|
349
350
|
def route_params
|
|
350
351
|
get('route_params')
|
|
351
352
|
end
|
data/lib/telerivet/service.rb
CHANGED
|
@@ -53,6 +53,14 @@ module Telerivet
|
|
|
53
53
|
# Setting a variable to null will delete the variable.
|
|
54
54
|
# * Updatable via API
|
|
55
55
|
#
|
|
56
|
+
# - url
|
|
57
|
+
# * URL to this service in the Telerivet web app
|
|
58
|
+
# * Read-only
|
|
59
|
+
#
|
|
60
|
+
# - url_edit
|
|
61
|
+
# * URL to edit the service in the Telerivet web app
|
|
62
|
+
# * Read-only
|
|
63
|
+
#
|
|
56
64
|
# - project_id
|
|
57
65
|
# * ID of the project this service belongs to
|
|
58
66
|
# * Read-only
|
|
@@ -344,8 +352,8 @@ class Service < Entity
|
|
|
344
352
|
# Gets configuration specific to the type of automated service.
|
|
345
353
|
#
|
|
346
354
|
# Only certain types of services provide their configuration via the
|
|
347
|
-
# API. See [Service Configuration Reference](#service_config)
|
|
348
|
-
# options.
|
|
355
|
+
# API. See [Service Configuration Reference](#service_config) or the machine-readable [OpenAPI
|
|
356
|
+
# specification](https://api.telerivet.com/openapi.json) for available configuration options.
|
|
349
357
|
#
|
|
350
358
|
# Returns:
|
|
351
359
|
# object
|
|
@@ -366,7 +374,9 @@ class Service < Entity
|
|
|
366
374
|
# Arguments:
|
|
367
375
|
# - options (Hash)
|
|
368
376
|
# * Configuration for this service type. See [Service Configuration
|
|
369
|
-
# Reference](#service_config)
|
|
377
|
+
# Reference](#service_config) or the machine-readable [OpenAPI
|
|
378
|
+
# specification](https://api.telerivet.com/openapi.json) for available configuration
|
|
379
|
+
# options.
|
|
370
380
|
# * Required
|
|
371
381
|
#
|
|
372
382
|
# Returns:
|
|
@@ -426,6 +436,14 @@ class Service < Entity
|
|
|
426
436
|
get('contexts')
|
|
427
437
|
end
|
|
428
438
|
|
|
439
|
+
def url
|
|
440
|
+
get('url')
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
def url_edit
|
|
444
|
+
get('url_edit')
|
|
445
|
+
end
|
|
446
|
+
|
|
429
447
|
def project_id
|
|
430
448
|
get('project_id')
|
|
431
449
|
end
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
|
|
2
|
+
module Telerivet
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# Represents a file stored in a Telerivet project, such as a media attachment for outgoing
|
|
6
|
+
# messages.
|
|
7
|
+
#
|
|
8
|
+
# Stored files are also automatically created for media attachments for
|
|
9
|
+
# incoming messages.
|
|
10
|
+
#
|
|
11
|
+
# Files can be uploaded via [project.uploadFile](#Project.uploadFile), then
|
|
12
|
+
# attached to outgoing messages by passing the file ID as a `file_id` item in the `media`
|
|
13
|
+
# parameter when sending a message or broadcast.
|
|
14
|
+
#
|
|
15
|
+
# Fields:
|
|
16
|
+
#
|
|
17
|
+
# - id (string, max 34 characters)
|
|
18
|
+
# * ID of the stored file
|
|
19
|
+
# * Read-only
|
|
20
|
+
#
|
|
21
|
+
# - filename (string, max 127 characters)
|
|
22
|
+
# * Filename of the stored file
|
|
23
|
+
# * Updatable via API
|
|
24
|
+
#
|
|
25
|
+
# - type
|
|
26
|
+
# * MIME type of the file
|
|
27
|
+
# * Read-only
|
|
28
|
+
#
|
|
29
|
+
# - size (int)
|
|
30
|
+
# * Size of the file in bytes
|
|
31
|
+
# * Read-only
|
|
32
|
+
#
|
|
33
|
+
# - description (string, max 1000 characters)
|
|
34
|
+
# * Description of the file
|
|
35
|
+
# * Updatable via API
|
|
36
|
+
#
|
|
37
|
+
# - category
|
|
38
|
+
# * Category of the stored file
|
|
39
|
+
# * Allowed values: outgoing_media, incoming_media, call_audio, test_recording,
|
|
40
|
+
# script_module, icon
|
|
41
|
+
# * Read-only
|
|
42
|
+
#
|
|
43
|
+
# - source
|
|
44
|
+
# * How the stored file was created
|
|
45
|
+
# * Allowed values: upload, recording, message, api
|
|
46
|
+
# * Read-only
|
|
47
|
+
#
|
|
48
|
+
# - message_id
|
|
49
|
+
# * ID of the message associated with this file, if any. Files associated with a message
|
|
50
|
+
# are deleted automatically when the message is deleted.
|
|
51
|
+
# * Read-only
|
|
52
|
+
#
|
|
53
|
+
# - sha256
|
|
54
|
+
# * SHA-256 hash of the file content (lowercase hex), if available
|
|
55
|
+
# * Read-only
|
|
56
|
+
#
|
|
57
|
+
# - time_created (UNIX timestamp)
|
|
58
|
+
# * Time the file was created in Telerivet
|
|
59
|
+
# * Read-only
|
|
60
|
+
#
|
|
61
|
+
# - user_id (string, max 34 characters)
|
|
62
|
+
# * ID of the Telerivet user who created the file (if applicable)
|
|
63
|
+
# * Read-only
|
|
64
|
+
#
|
|
65
|
+
# - url
|
|
66
|
+
# * URL where the file content can be downloaded. Note: this URL is temporary and may
|
|
67
|
+
# not be valid for more than 1 day; retrieve the stored file again to get a fresh URL.
|
|
68
|
+
# * Read-only
|
|
69
|
+
#
|
|
70
|
+
# - thumbnail_url
|
|
71
|
+
# * URL of a thumbnail image for video files, if available. Note: this URL is temporary
|
|
72
|
+
# and may not be valid for more than 1 day.
|
|
73
|
+
# * Read-only
|
|
74
|
+
#
|
|
75
|
+
# - project_id
|
|
76
|
+
# * ID of the project this file belongs to
|
|
77
|
+
# * Read-only
|
|
78
|
+
#
|
|
79
|
+
class StoredFile < Entity
|
|
80
|
+
#
|
|
81
|
+
# Saves any fields that have changed for this stored file.
|
|
82
|
+
#
|
|
83
|
+
def save()
|
|
84
|
+
super
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
#
|
|
88
|
+
# Deletes this stored file.
|
|
89
|
+
#
|
|
90
|
+
# A stored file may only be deleted by the user who created it or by a
|
|
91
|
+
# project administrator, and may not be deleted while it is attached to an existing message.
|
|
92
|
+
#
|
|
93
|
+
def delete()
|
|
94
|
+
@api.do_request("DELETE", get_base_api_path())
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def id
|
|
98
|
+
get('id')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def filename
|
|
102
|
+
get('filename')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def filename=(value)
|
|
106
|
+
set('filename', value)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def type
|
|
110
|
+
get('type')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def size
|
|
114
|
+
get('size')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def description
|
|
118
|
+
get('description')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def description=(value)
|
|
122
|
+
set('description', value)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def category
|
|
126
|
+
get('category')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def source
|
|
130
|
+
get('source')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def message_id
|
|
134
|
+
get('message_id')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def sha256
|
|
138
|
+
get('sha256')
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def time_created
|
|
142
|
+
get('time_created')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def user_id
|
|
146
|
+
get('user_id')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def url
|
|
150
|
+
get('url')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def thumbnail_url
|
|
154
|
+
get('thumbnail_url')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def project_id
|
|
158
|
+
get('project_id')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def get_base_api_path()
|
|
162
|
+
"/projects/#{get('project_id')}/files/#{get('id')}"
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
end
|
data/lib/telerivet.rb
CHANGED
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.
|
|
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-
|
|
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,10 +20,12 @@ 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
|
|
@@ -37,6 +39,7 @@ files:
|
|
|
37
39
|
- lib/telerivet/scheduledmessage.rb
|
|
38
40
|
- lib/telerivet/scheduledservice.rb
|
|
39
41
|
- lib/telerivet/service.rb
|
|
42
|
+
- lib/telerivet/storedfile.rb
|
|
40
43
|
- lib/telerivet/task.rb
|
|
41
44
|
- lib/telerivet/webhook.rb
|
|
42
45
|
homepage: http://telerivet.com
|