telerivet 1.7.0 → 1.8.1
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 +15 -2
- data/lib/telerivet/apicursor.rb +0 -0
- data/lib/telerivet/broadcast.rb +13 -5
- data/lib/telerivet/contact.rb +6 -1
- data/lib/telerivet/contactservicestate.rb +6 -1
- data/lib/telerivet/datarow.rb +6 -1
- data/lib/telerivet/datatable.rb +18 -4
- data/lib/telerivet/entity.rb +0 -0
- data/lib/telerivet/group.rb +32 -1
- data/lib/telerivet/label.rb +6 -1
- data/lib/telerivet/message.rb +24 -5
- data/lib/telerivet/organization.rb +0 -0
- data/lib/telerivet/phone.rb +6 -1
- data/lib/telerivet/project.rb +112 -36
- data/lib/telerivet/relativescheduledmessage.rb +13 -5
- data/lib/telerivet/route.rb +6 -1
- data/lib/telerivet/scheduledmessage.rb +14 -5
- data/lib/telerivet/service.rb +12 -2
- data/lib/telerivet/task.rb +6 -1
- data/lib/telerivet.rb +16 -5
- metadata +6 -7
- data/lib/cacert.pem +0 -3895
|
@@ -138,14 +138,23 @@ module Telerivet
|
|
|
138
138
|
# * Read-only
|
|
139
139
|
#
|
|
140
140
|
# - route_params (Hash)
|
|
141
|
-
# * Route-specific parameters to use when sending the message.
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
#
|
|
141
|
+
# * Route-specific parameters to use when sending the message.
|
|
142
|
+
#
|
|
143
|
+
# When sending messages via chat apps such as WhatsApp, the route_params
|
|
144
|
+
# parameter can be used to send messages with app-specific features such as quick
|
|
145
|
+
# replies and link buttons.
|
|
146
|
+
#
|
|
147
|
+
# For more details, see [Route-Specific Parameters](#route_params).
|
|
145
148
|
# * Updatable via API
|
|
146
149
|
#
|
|
147
150
|
# - vars (Hash)
|
|
148
|
-
# * Custom variables stored for this scheduled message (copied to Message when sent)
|
|
151
|
+
# * Custom variables stored for this scheduled message (copied to Message when sent).
|
|
152
|
+
# Variable names may be up to 32 characters in length and can contain the characters
|
|
153
|
+
# a-z, A-Z, 0-9, and _.
|
|
154
|
+
# Values may be strings, numbers, or boolean (true/false).
|
|
155
|
+
# String values may be up to 4096 bytes in length when encoded as UTF-8.
|
|
156
|
+
# Up to 100 variables are supported per object.
|
|
157
|
+
# Setting a variable to null will delete the variable.
|
|
149
158
|
# * Updatable via API
|
|
150
159
|
#
|
|
151
160
|
# - label_ids (array)
|
data/lib/telerivet/service.rb
CHANGED
|
@@ -45,7 +45,12 @@ module Telerivet
|
|
|
45
45
|
# * Read-only
|
|
46
46
|
#
|
|
47
47
|
# - vars (Hash)
|
|
48
|
-
# * Custom variables stored for this service
|
|
48
|
+
# * Custom variables stored for this service. Variable names may be up to 32 characters
|
|
49
|
+
# in length and can contain the characters a-z, A-Z, 0-9, and _.
|
|
50
|
+
# Values may be strings, numbers, or boolean (true/false).
|
|
51
|
+
# String values may be up to 4096 bytes in length when encoded as UTF-8.
|
|
52
|
+
# Up to 100 variables are supported per object.
|
|
53
|
+
# Setting a variable to null will delete the variable.
|
|
49
54
|
# * Updatable via API
|
|
50
55
|
#
|
|
51
56
|
# - project_id
|
|
@@ -230,7 +235,12 @@ class Service < Entity
|
|
|
230
235
|
# * Required
|
|
231
236
|
#
|
|
232
237
|
# - vars (Hash)
|
|
233
|
-
# * Custom variables stored for this contact's state
|
|
238
|
+
# * Custom variables stored for this contact's state. Variable names may be up to 32
|
|
239
|
+
# characters in length and can contain the characters a-z, A-Z, 0-9, and _.
|
|
240
|
+
# Values may be strings, numbers, or boolean (true/false).
|
|
241
|
+
# String values may be up to 4096 bytes in length when encoded as UTF-8.
|
|
242
|
+
# Up to 100 variables are supported per object.
|
|
243
|
+
# Setting a variable to null will delete the variable.
|
|
234
244
|
#
|
|
235
245
|
# Returns:
|
|
236
246
|
# Telerivet::ContactServiceState
|
data/lib/telerivet/task.rb
CHANGED
|
@@ -59,7 +59,12 @@ module Telerivet
|
|
|
59
59
|
# * Read-only
|
|
60
60
|
#
|
|
61
61
|
# - vars (Hash)
|
|
62
|
-
# * Custom variables stored for this task
|
|
62
|
+
# * Custom variables stored for this task. Variable names may be up to 32 characters in
|
|
63
|
+
# length and can contain the characters a-z, A-Z, 0-9, and _.
|
|
64
|
+
# Values may be strings, numbers, or boolean (true/false).
|
|
65
|
+
# String values may be up to 4096 bytes in length when encoded as UTF-8.
|
|
66
|
+
# Up to 100 variables are supported per object.
|
|
67
|
+
# Setting a variable to null will delete the variable.
|
|
63
68
|
# * Read-only
|
|
64
69
|
#
|
|
65
70
|
# - table_id (string, max 34 characters)
|
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.
|
|
12
|
+
@@client_version = '1.8.1'
|
|
13
13
|
|
|
14
14
|
#
|
|
15
15
|
# Initializes a client handle to the Telerivet REST API.
|
|
@@ -47,7 +47,6 @@ class API
|
|
|
47
47
|
if @session == nil
|
|
48
48
|
@session = Net::HTTP.start(uri.host, uri.port,
|
|
49
49
|
:use_ssl => @api_url.start_with?("https://"),
|
|
50
|
-
:ca_file => File.dirname(__FILE__) + '/cacert.pem',
|
|
51
50
|
:read_timeout => 35,
|
|
52
51
|
:open_timeout => 20,
|
|
53
52
|
)
|
|
@@ -88,11 +87,11 @@ class API
|
|
|
88
87
|
error_code = error['code']
|
|
89
88
|
|
|
90
89
|
if error_code == 'invalid_param'
|
|
91
|
-
raise InvalidParameterException
|
|
90
|
+
raise InvalidParameterException.new error['message'], error['code'], error['param']
|
|
92
91
|
elsif error_code == 'not_found'
|
|
93
|
-
raise NotFoundException
|
|
92
|
+
raise NotFoundException.new error['message'], error['code']
|
|
94
93
|
else
|
|
95
|
-
raise APIException
|
|
94
|
+
raise APIException.new error['message'], error['code']
|
|
96
95
|
end
|
|
97
96
|
else
|
|
98
97
|
return res
|
|
@@ -282,12 +281,24 @@ class API
|
|
|
282
281
|
end
|
|
283
282
|
|
|
284
283
|
class APIException < Exception
|
|
284
|
+
attr_reader :code
|
|
285
|
+
|
|
286
|
+
def initialize(msg, code)
|
|
287
|
+
@code = code
|
|
288
|
+
super(msg)
|
|
289
|
+
end
|
|
285
290
|
end
|
|
286
291
|
|
|
287
292
|
class NotFoundException < APIException
|
|
288
293
|
end
|
|
289
294
|
|
|
290
295
|
class InvalidParameterException < APIException
|
|
296
|
+
attr_reader :param
|
|
297
|
+
|
|
298
|
+
def initialize(msg, code, param)
|
|
299
|
+
@param = param
|
|
300
|
+
super(msg, code)
|
|
301
|
+
end
|
|
291
302
|
end
|
|
292
303
|
|
|
293
304
|
end
|
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.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jesse Young
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-12-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Ruby client library for Telerivet REST API
|
|
14
14
|
email: support@telerivet.com
|
|
@@ -16,7 +16,6 @@ executables: []
|
|
|
16
16
|
extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
|
18
18
|
files:
|
|
19
|
-
- lib/cacert.pem
|
|
20
19
|
- lib/telerivet.rb
|
|
21
20
|
- lib/telerivet/airtimetransaction.rb
|
|
22
21
|
- lib/telerivet/apicursor.rb
|
|
@@ -41,7 +40,7 @@ homepage: http://telerivet.com
|
|
|
41
40
|
licenses:
|
|
42
41
|
- MIT
|
|
43
42
|
metadata: {}
|
|
44
|
-
post_install_message:
|
|
43
|
+
post_install_message:
|
|
45
44
|
rdoc_options: []
|
|
46
45
|
require_paths:
|
|
47
46
|
- lib
|
|
@@ -56,8 +55,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
56
55
|
- !ruby/object:Gem::Version
|
|
57
56
|
version: '0'
|
|
58
57
|
requirements: []
|
|
59
|
-
rubygems_version: 3.
|
|
60
|
-
signing_key:
|
|
58
|
+
rubygems_version: 3.3.15
|
|
59
|
+
signing_key:
|
|
61
60
|
specification_version: 4
|
|
62
61
|
summary: Telerivet REST API Client
|
|
63
62
|
test_files: []
|