telerivet 1.7.0 → 1.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2276ff47e23f0670121a7295c0cf3d860740ebb0c1980de13e15ae2f25c2659d
4
- data.tar.gz: 55db2507c8bcfa9f8ed0c3102f830dea689fd57ef57d0a00f1b488eebf46f4b5
3
+ metadata.gz: 53eb2eb3eda20f383f980d2b94f38955f16ae139b588b14ad547dbbd371642f9
4
+ data.tar.gz: d65a986a9fa2e2ed62bb0245595ad7d3d76bc607774f13314efd64b4d2405762
5
5
  SHA512:
6
- metadata.gz: cdd68937b393e61a1ec76e536b0abfcf30e3bb16127b2ea6a37f221013c8ee9d43aa99f5bf758eeb70d04c0366ffcfe1a2e4af576d0620507412b92ac8ceeab7
7
- data.tar.gz: 50cf5362c2926a104d8e1d6cd15ee5473589cdf31e78e516f9e6ad1af335baec040de5b5cf8598dc8e95008e08fe9775a448da465fffc708030b8e217d86e52a
6
+ metadata.gz: 748e80a811e0791268fb144fec9eca46e8c0beaea561d616a21c01b461d3baf4ca1063ead62ed9c6b9ce9070036f3db46b133878bc2d021dad8b7d010cf24d89
7
+ data.tar.gz: 85630bd869da8d7a42c0ef137d2e95c583b47796e4efbe581c86ebf15542022a08f2d27d42a97b5efc7007008525ad5ba5756a4f714b86ab4b6ef734deac200d
data/lib/cacert.pem CHANGED
File without changes
@@ -38,7 +38,7 @@ module Telerivet
38
38
  #
39
39
  # - status
40
40
  # * Current status of airtime transaction (`successful`, `failed`, `cancelled`,
41
- # `queued`, `pending_approval`, or `pending_payment`)
41
+ # `queued`, `processing`, `submitted`, `pending_approval`, or `pending_payment`)
42
42
  # * Read-only
43
43
  #
44
44
  # - status_text
@@ -77,8 +77,17 @@ module Telerivet
77
77
  # * The ID of this transaction from an external airtime gateway provider, if available.
78
78
  # * Read-only
79
79
  #
80
+ # - user_id (string, max 34 characters)
81
+ # * ID of the Telerivet user who sent the airtime transaction (if applicable)
82
+ # * Read-only
83
+ #
80
84
  # - vars (Hash)
81
- # * Custom variables stored for this transaction
85
+ # * Custom variables stored for this transaction. Variable names may be up to 32
86
+ # characters in length and can contain the characters a-z, A-Z, 0-9, and _.
87
+ # Values may be strings, numbers, or boolean (true/false).
88
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
89
+ # Up to 100 variables are supported per object.
90
+ # Setting a variable to null will delete the variable.
82
91
  # * Updatable via API
83
92
  #
84
93
  class AirtimeTransaction < Entity
@@ -146,6 +155,10 @@ class AirtimeTransaction < Entity
146
155
  get('external_id')
147
156
  end
148
157
 
158
+ def user_id
159
+ get('user_id')
160
+ end
161
+
149
162
  def get_base_api_path()
150
163
  "/projects/#{get('project_id')}/airtime_transactions/#{get('id')}"
151
164
  end
File without changes
@@ -141,14 +141,22 @@ module Telerivet
141
141
  # * Read-only
142
142
  #
143
143
  # - vars (Hash)
144
- # * Custom variables stored for this broadcast
144
+ # * Custom variables stored for this broadcast. Variable names may be up to 32
145
+ # characters in length and can contain the characters a-z, A-Z, 0-9, and _.
146
+ # Values may be strings, numbers, or boolean (true/false).
147
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
148
+ # Up to 100 variables are supported per object.
149
+ # Setting a variable to null will delete the variable.
145
150
  # * Read-only
146
151
  #
147
152
  # - route_params (Hash)
148
- # * Route-specific parameters for the messages in the broadcast. The parameters object
149
- # may have keys matching the `phone_type` field of a phone (basic route) that may be
150
- # used to send messages in this broadcast. The corresponding value is an object with
151
- # route-specific parameters to use when sending messages with that type of route.
153
+ # * Route-specific parameters for the messages in the broadcast.
154
+ #
155
+ # When sending messages via chat apps such as WhatsApp, the route_params
156
+ # parameter can be used to send messages with app-specific features such as quick
157
+ # replies and link buttons.
158
+ #
159
+ # For more details, see [Route-Specific Parameters](#route_params).
152
160
  # * Read-only
153
161
  #
154
162
  # - price (number)
@@ -72,7 +72,12 @@ module Telerivet
72
72
  # * Read-only
73
73
  #
74
74
  # - vars (Hash)
75
- # * Custom variables stored for this contact
75
+ # * Custom variables stored for this contact. Variable names may be up to 32 characters
76
+ # in length and can contain the characters a-z, A-Z, 0-9, and _.
77
+ # Values may be strings, numbers, or boolean (true/false).
78
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
79
+ # Up to 100 variables are supported per object.
80
+ # Setting a variable to null will delete the variable.
76
81
  # * Updatable via API
77
82
  #
78
83
  # - project_id
@@ -40,7 +40,12 @@ module Telerivet
40
40
  # * Read-only
41
41
  #
42
42
  # - vars (Hash)
43
- # * Custom variables stored for this contact/service state
43
+ # * Custom variables stored for this contact/service state. Variable names may be up to
44
+ # 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _.
45
+ # Values may be strings, numbers, or boolean (true/false).
46
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
47
+ # Up to 100 variables are supported per object.
48
+ # Setting a variable to null will delete the variable.
44
49
  # * Updatable via API
45
50
  #
46
51
  # - time_created (UNIX timestamp)
@@ -28,7 +28,12 @@ module Telerivet
28
28
  # * Updatable via API
29
29
  #
30
30
  # - vars (Hash)
31
- # * Custom variables stored for this data row
31
+ # * Custom variables stored for this data row. Variable names may be up to 32 characters
32
+ # in length and can contain the characters a-z, A-Z, 0-9, and _.
33
+ # Values may be strings, numbers, or boolean (true/false).
34
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
35
+ # Up to 100 variables are supported per object.
36
+ # Setting a variable to null will delete the variable.
32
37
  # * Updatable via API
33
38
  #
34
39
  # - time_created (UNIX timestamp)
@@ -31,7 +31,8 @@ module Telerivet
31
31
  # * Updatable via API
32
32
  #
33
33
  # - show_stats (bool)
34
- # * Whether to show row statistics in the web app
34
+ # * Whether to show summary charts (pie charts, bar charts, tables of top values) for
35
+ # this data table in the web app
35
36
  # * Updatable via API
36
37
  #
37
38
  # - show_contact_columns (bool)
@@ -39,7 +40,12 @@ module Telerivet
39
40
  # * Updatable via API
40
41
  #
41
42
  # - vars (Hash)
42
- # * Custom variables stored for this data table
43
+ # * Custom variables stored for this data table. Variable names may be up to 32
44
+ # characters in length and can contain the characters a-z, A-Z, 0-9, and _.
45
+ # Values may be strings, numbers, or boolean (true/false).
46
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
47
+ # Up to 100 variables are supported per object.
48
+ # Setting a variable to null will delete the variable.
43
49
  # * Updatable via API
44
50
  #
45
51
  # - project_id
@@ -105,7 +111,12 @@ class DataTable < Entity
105
111
  # * Phone number that this row is associated with (if applicable)
106
112
  #
107
113
  # - vars
108
- # * Custom variables and values to set for this data row
114
+ # * Custom variables and values to set for this data row. Variable names may be up to
115
+ # 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _.
116
+ # Values may be strings, numbers, or boolean (true/false).
117
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
118
+ # Up to 100 variables are supported per object.
119
+ # Setting a variable to null will delete the variable.
109
120
  #
110
121
  # Returns:
111
122
  # Telerivet::DataRow
@@ -163,6 +174,9 @@ class DataTable < Entity
163
174
  #
164
175
  # Allows customizing how a field (column) is displayed in the Telerivet web app.
165
176
  #
177
+ # The variable path parameter can contain the characters a-z, A-Z,
178
+ # 0-9, and _, and may be up to 32 characters in length.
179
+ #
166
180
  # Arguments:
167
181
  # - variable
168
182
  # * The variable name of the field to create or update.
@@ -177,7 +191,7 @@ class DataTable < Entity
177
191
  # - type (string)
178
192
  # * Field type
179
193
  # * Allowed values: text, long_text, secret, phone_number, email, url, audio, date,
180
- # date_time, number, boolean, checkbox, select, radio
194
+ # date_time, number, boolean, checkbox, select, radio, route
181
195
  #
182
196
  # - order (int)
183
197
  # * Order in which to display the field
File without changes
@@ -26,8 +26,23 @@ module Telerivet
26
26
  # * Time the group was created in Telerivet
27
27
  # * Read-only
28
28
  #
29
+ # - allow_sending (bool)
30
+ # * True if messages can be sent to this group, false otherwise.
31
+ # * Updatable via API
32
+ #
33
+ # - add_time_variable (string)
34
+ # * Variable name of a custom contact field that will automatically be set to the
35
+ # current date/time on any contact that is added to the group. This variable will only
36
+ # be set if the contact does not already have a value for this variable.
37
+ # * Updatable via API
38
+ #
29
39
  # - vars (Hash)
30
- # * Custom variables stored for this group
40
+ # * Custom variables stored for this group. Variable names may be up to 32 characters in
41
+ # length and can contain the characters a-z, A-Z, 0-9, and _.
42
+ # Values may be strings, numbers, or boolean (true/false).
43
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
44
+ # Up to 100 variables are supported per object.
45
+ # Setting a variable to null will delete the variable.
31
46
  # * Updatable via API
32
47
  #
33
48
  # - project_id
@@ -201,6 +216,22 @@ class Group < Entity
201
216
  get('time_created')
202
217
  end
203
218
 
219
+ def allow_sending
220
+ get('allow_sending')
221
+ end
222
+
223
+ def allow_sending=(value)
224
+ set('allow_sending', value)
225
+ end
226
+
227
+ def add_time_variable
228
+ get('add_time_variable')
229
+ end
230
+
231
+ def add_time_variable=(value)
232
+ set('add_time_variable', value)
233
+ end
234
+
204
235
  def project_id
205
236
  get('project_id')
206
237
  end
@@ -19,7 +19,12 @@ module Telerivet
19
19
  # * Read-only
20
20
  #
21
21
  # - vars (Hash)
22
- # * Custom variables stored for this label
22
+ # * Custom variables stored for this label. Variable names may be up to 32 characters in
23
+ # length and can contain the characters a-z, A-Z, 0-9, and _.
24
+ # Values may be strings, numbers, or boolean (true/false).
25
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
26
+ # Up to 100 variables are supported per object.
27
+ # Setting a variable to null will delete the variable.
23
28
  # * Updatable via API
24
29
  #
25
30
  # - project_id
@@ -72,14 +72,22 @@ module Telerivet
72
72
  # * Read-only
73
73
  #
74
74
  # - route_params (Hash)
75
- # * Route-specific parameters for the message. The parameters object may have keys
76
- # matching the `phone_type` field of a phone (basic route) that may be used to send the
77
- # message. The corresponding value is an object with route-specific parameters to use
78
- # when the message is sent by that type of route.
75
+ # * Route-specific parameters for the message.
76
+ #
77
+ # When sending messages via chat apps such as WhatsApp, the route_params
78
+ # parameter can be used to send messages with app-specific features such as quick
79
+ # replies and link buttons.
80
+ #
81
+ # For more details, see [Route-Specific Parameters](#route_params).
79
82
  # * Read-only
80
83
  #
81
84
  # - vars (Hash)
82
- # * Custom variables stored for this message
85
+ # * Custom variables stored for this message. Variable names may be up to 32 characters
86
+ # in length and can contain the characters a-z, A-Z, 0-9, and _.
87
+ # Values may be strings, numbers, or boolean (true/false).
88
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
89
+ # Up to 100 variables are supported per object.
90
+ # Setting a variable to null will delete the variable.
83
91
  # * Updatable via API
84
92
  #
85
93
  # - priority (int)
@@ -92,6 +100,13 @@ module Telerivet
92
100
  # omitted from the API response if there is no error message.)
93
101
  # * Updatable via API
94
102
  #
103
+ # - error_code
104
+ # * A route-specific error code encountered while sending a message. The error code
105
+ # values depend on the provider and may be described in the provider's API
106
+ # documentation. Error codes may be strings or numbers, depending on the provider. (This
107
+ # field is omitted from the API response if there is no error code.)
108
+ # * Read-only
109
+ #
95
110
  # - external_id
96
111
  # * The ID of this message from an external SMS gateway provider (e.g. Twilio or
97
112
  # Vonage), if available.
@@ -410,6 +425,10 @@ class Message < Entity
410
425
  set('error_message', value)
411
426
  end
412
427
 
428
+ def error_code
429
+ get('error_code')
430
+ end
431
+
413
432
  def external_id
414
433
  get('external_id')
415
434
  end
File without changes
@@ -45,7 +45,12 @@ module Telerivet
45
45
  # * Read-only
46
46
  #
47
47
  # - vars (Hash)
48
- # * Custom variables stored for this phone
48
+ # * Custom variables stored for this phone. Variable names may be up to 32 characters in
49
+ # 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
@@ -42,7 +42,12 @@ module Telerivet
42
42
  # * Updatable via API
43
43
  #
44
44
  # - vars (Hash)
45
- # * Custom variables stored for this project
45
+ # * Custom variables stored for this project. Variable names may be up to 32 characters
46
+ # in length and can contain the characters a-z, A-Z, 0-9, and _.
47
+ # Values may be strings, numbers, or boolean (true/false).
48
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
49
+ # Up to 100 variables are supported per object.
50
+ # Setting a variable to null will delete the variable.
46
51
  # * Updatable via API
47
52
  #
48
53
  # - organization_id (string, max 34 characters)
@@ -112,14 +117,25 @@ class Project < Entity
112
117
  #
113
118
  # - media_urls (array)
114
119
  # * URLs of media files to attach to the text message. If `message_type` is `sms`,
115
- # short links to each media URL will be appended to the end of the content (separated
116
- # by a new line).
120
+ # short links to each URL will be appended to the end of the content (separated by a
121
+ # new line).
122
+ #
123
+ #
124
+ # By default, each file must have a https:// or http:// URL, which requires the file
125
+ # to be uploaded somewhere that is accessible via the internet. For media files that
126
+ # are not already accessible via the internet, the media_urls parameter also supports
127
+ # data URIs with the file data encoded via Base64 (e.g. "data:image/png;base64,..."),
128
+ # with a maximum file size of 2 MB. To send media via data URIs, contact Telerivet to
129
+ # request enabling the data URIs feature for your project.
117
130
  #
118
131
  # - route_params (Hash)
119
- # * Route-specific parameters for the message. The parameters object should have one
120
- # or more keys matching the `phone_type` field of a phone (basic route) that may be
121
- # used to send the message. The corresponding value should be an object with
122
- # route-specific parameters to use if the message is sent by that type of route.
132
+ # * Route-specific parameters for the message.
133
+ #
134
+ # When sending messages via chat apps such as WhatsApp, the route_params
135
+ # parameter can be used to send messages with app-specific features such as quick
136
+ # replies and link buttons.
137
+ #
138
+ # For more details, see [Route-Specific Parameters](#route_params).
123
139
  #
124
140
  # - label_ids (array)
125
141
  # * List of IDs of labels to add to this message
@@ -254,15 +270,26 @@ class Project < Entity
254
270
  # * URLs of media files to attach to the text message. If `message_type` is `sms`,
255
271
  # short links to each URL will be appended to the end of the content (separated by a
256
272
  # new line).
273
+ #
274
+ #
275
+ # By default, each file must have a https:// or http:// URL, which requires the file
276
+ # to be uploaded somewhere that is accessible via the internet. For media files that
277
+ # are not already accessible via the internet, the media_urls parameter also supports
278
+ # data URIs with the file data encoded via Base64 (e.g. "data:image/png;base64,..."),
279
+ # with a maximum file size of 2 MB. To send media via data URIs, contact Telerivet to
280
+ # request enabling the data URIs feature for your project.
257
281
  #
258
282
  # - vars (Hash)
259
283
  # * Custom variables to set for each message
260
284
  #
261
285
  # - route_params (Hash)
262
- # * Route-specific parameters for the messages in the broadcast. The parameters object
263
- # may have keys matching the `phone_type` field of a phone (basic route) that may be
264
- # used to send messages in this broadcast. The corresponding value is an object with
265
- # route-specific parameters to use when sending messages with that type of route.
286
+ # * Route-specific parameters for the messages in the broadcast.
287
+ #
288
+ # When sending messages via chat apps such as WhatsApp, the route_params
289
+ # parameter can be used to send messages with app-specific features such as quick
290
+ # replies and link buttons.
291
+ #
292
+ # For more details, see [Route-Specific Parameters](#route_params).
266
293
  #
267
294
  # - service_id
268
295
  # * Service to invoke for each recipient (when `message_type` is `call` or `service`)
@@ -370,14 +397,25 @@ class Project < Entity
370
397
  #
371
398
  # - media_urls (array)
372
399
  # * URLs of media files to attach to the text message. If `message_type` is `sms`,
373
- # short links to each media URL will be appended to the end of the content (separated
374
- # by a new line).
400
+ # short links to each URL will be appended to the end of the content (separated by a
401
+ # new line).
402
+ #
403
+ #
404
+ # By default, each file must have a https:// or http:// URL, which requires the file
405
+ # to be uploaded somewhere that is accessible via the internet. For media files that
406
+ # are not already accessible via the internet, the media_urls parameter also supports
407
+ # data URIs with the file data encoded via Base64 (e.g. "data:image/png;base64,..."),
408
+ # with a maximum file size of 2 MB. To send media via data URIs, contact Telerivet to
409
+ # request enabling the data URIs feature for your project.
375
410
  #
376
411
  # - route_params (Hash)
377
- # * Route-specific parameters to apply to all messages. The parameters object may have
378
- # keys matching the `phone_type` field of a phone (basic route) that may be used to
379
- # send messages. The corresponding value is an object with route-specific parameters
380
- # to use when sending messages with that type of route.
412
+ # * Route-specific parameters to apply to all messages.
413
+ #
414
+ # When sending messages via chat apps such as WhatsApp, the route_params
415
+ # parameter can be used to send messages with app-specific features such as quick
416
+ # replies and link buttons.
417
+ #
418
+ # For more details, see [Route-Specific Parameters](#route_params).
381
419
  #
382
420
  # - vars (Hash)
383
421
  # * Custom variables to store with the message
@@ -555,14 +593,25 @@ class Project < Entity
555
593
  #
556
594
  # - media_urls (array)
557
595
  # * URLs of media files to attach to the text message. If `message_type` is `sms`,
558
- # short links to each media URL will be appended to the end of the content (separated
559
- # by a new line).
596
+ # short links to each URL will be appended to the end of the content (separated by a
597
+ # new line).
598
+ #
599
+ #
600
+ # By default, each file must have a https:// or http:// URL, which requires the file
601
+ # to be uploaded somewhere that is accessible via the internet. For media files that
602
+ # are not already accessible via the internet, the media_urls parameter also supports
603
+ # data URIs with the file data encoded via Base64 (e.g. "data:image/png;base64,..."),
604
+ # with a maximum file size of 2 MB. To send media via data URIs, contact Telerivet to
605
+ # request enabling the data URIs feature for your project.
560
606
  #
561
607
  # - route_params (Hash)
562
- # * Route-specific parameters to use when sending the message. The parameters object
563
- # may have keys matching the `phone_type` field of a phone (basic route) that may be
564
- # used to send the message. The corresponding value is an object with route-specific
565
- # parameters to use when sending a message with that type of route.
608
+ # * Route-specific parameters to use when sending the message.
609
+ #
610
+ # When sending messages via chat apps such as WhatsApp, the route_params
611
+ # parameter can be used to send messages with app-specific features such as quick
612
+ # replies and link buttons.
613
+ #
614
+ # For more details, see [Route-Specific Parameters](#route_params).
566
615
  #
567
616
  # - label_ids (array)
568
617
  # * Array of IDs of labels to add to the sent messages (maximum 5). Does not apply
@@ -720,14 +769,25 @@ class Project < Entity
720
769
  #
721
770
  # - media_urls (array)
722
771
  # * URLs of media files to attach to the text message. If `message_type` is `sms`,
723
- # short links to each media URL will be appended to the end of the content (separated
724
- # by a new line).
772
+ # short links to each URL will be appended to the end of the content (separated by a
773
+ # new line).
774
+ #
775
+ #
776
+ # By default, each file must have a https:// or http:// URL, which requires the file
777
+ # to be uploaded somewhere that is accessible via the internet. For media files that
778
+ # are not already accessible via the internet, the media_urls parameter also supports
779
+ # data URIs with the file data encoded via Base64 (e.g. "data:image/png;base64,..."),
780
+ # with a maximum file size of 2 MB. To send media via data URIs, contact Telerivet to
781
+ # request enabling the data URIs feature for your project.
725
782
  #
726
783
  # - route_params (Hash)
727
- # * Route-specific parameters to use when sending the message. The parameters object
728
- # may have keys matching the `phone_type` field of a phone (basic route) that may be
729
- # used to send the message. The corresponding value is an object with route-specific
730
- # parameters to use when sending a message with that type of route.
784
+ # * Route-specific parameters to use when sending the message.
785
+ #
786
+ # When sending messages via chat apps such as WhatsApp, the route_params
787
+ # parameter can be used to send messages with app-specific features such as quick
788
+ # replies and link buttons.
789
+ #
790
+ # For more details, see [Route-Specific Parameters](#route_params).
731
791
  #
732
792
  # - label_ids (array)
733
793
  # * Array of IDs of labels to add to the sent messages (maximum 5). Does not apply
@@ -767,7 +827,7 @@ class Project < Entity
767
827
  #
768
828
  # - message_type
769
829
  # * Type of message
770
- # * Allowed values: sms, call
830
+ # * Allowed values: sms, call, chat
771
831
  # * Default: sms
772
832
  #
773
833
  # - from_number
@@ -849,7 +909,12 @@ class Project < Entity
849
909
  # * ID of one or more groups to remove this contact as a member (max 20)
850
910
  #
851
911
  # - vars (Hash)
852
- # * Custom variables and values to update on the contact
912
+ # * Custom variables and values to update on the contact. Variable names may be up to
913
+ # 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _.
914
+ # Values may be strings, numbers, or boolean (true/false).
915
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
916
+ # Up to 100 variables are supported per object.
917
+ # Setting a variable to null will delete the variable.
853
918
  #
854
919
  # Returns:
855
920
  # Telerivet::Contact
@@ -2077,7 +2142,12 @@ class Project < Entity
2077
2142
  # * Required
2078
2143
  #
2079
2144
  # - vars
2080
- # * Custom variables and values to set for this service
2145
+ # * Custom variables and values to set for this service. Variable names may be up to
2146
+ # 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _.
2147
+ # Values may be strings, numbers, or boolean (true/false).
2148
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
2149
+ # Up to 100 variables are supported per object.
2150
+ # Setting a variable to null will delete the variable.
2081
2151
  #
2082
2152
  # - active (bool)
2083
2153
  # * Whether the service is initially active or inactive. Inactive services are not
@@ -2429,8 +2499,8 @@ class Project < Entity
2429
2499
  #
2430
2500
  # - status
2431
2501
  # * Filter transactions by status
2432
- # * Allowed values: pending, queued, processing, successful, failed, cancelled,
2433
- # pending_payment, pending_approval
2502
+ # * Allowed values: pending, queued, processing, submitted, successful, failed,
2503
+ # cancelled, pending_payment, pending_approval
2434
2504
  #
2435
2505
  # - sort_dir
2436
2506
  # * Sort the results in ascending or descending order
@@ -2501,6 +2571,9 @@ class Project < Entity
2501
2571
  #
2502
2572
  # Allows customizing how a custom contact field is displayed in the Telerivet web app.
2503
2573
  #
2574
+ # The variable path parameter can contain the characters a-z, A-Z,
2575
+ # 0-9, and _, and may be up to 32 characters in length.
2576
+ #
2504
2577
  # Arguments:
2505
2578
  # - variable
2506
2579
  # * The variable name of the field to create or update.
@@ -2515,7 +2588,7 @@ class Project < Entity
2515
2588
  # - type (int)
2516
2589
  # * Field type
2517
2590
  # * Allowed values: text, long_text, secret, phone_number, email, url, audio, date,
2518
- # date_time, number, boolean, checkbox, select, radio
2591
+ # date_time, number, boolean, checkbox, select, radio, route
2519
2592
  #
2520
2593
  # - order (int)
2521
2594
  # * Order in which to display the field
@@ -2559,6 +2632,9 @@ class Project < Entity
2559
2632
  #
2560
2633
  # Allows customizing how a custom message field is displayed in the Telerivet web app.
2561
2634
  #
2635
+ # The variable path parameter can contain the characters a-z, A-Z,
2636
+ # 0-9, and _, and may be up to 32 characters in length.
2637
+ #
2562
2638
  # Arguments:
2563
2639
  # - variable
2564
2640
  # * The variable name of the field to create or update.
@@ -2573,7 +2649,7 @@ class Project < Entity
2573
2649
  # - type (string)
2574
2650
  # * Field type
2575
2651
  # * Allowed values: text, long_text, secret, phone_number, email, url, audio, date,
2576
- # date_time, number, boolean, checkbox, select, radio
2652
+ # date_time, number, boolean, checkbox, select, radio, route
2577
2653
  #
2578
2654
  # - order (int)
2579
2655
  # * Order in which to display the field
@@ -134,15 +134,23 @@ module Telerivet
134
134
  # * Read-only
135
135
  #
136
136
  # - route_params (Hash)
137
- # * Route-specific parameters to use when sending the message. The parameters object may
138
- # have keys matching the `phone_type` field of a phone (basic route) that may be used to
139
- # send the message. The corresponding value is an object with route-specific parameters
140
- # to use when sending a message with that type of route.
137
+ # * Route-specific parameters to use when sending the message.
138
+ #
139
+ # When sending messages via chat apps such as WhatsApp, the route_params
140
+ # parameter can be used to send messages with app-specific features such as quick
141
+ # replies and link buttons.
142
+ #
143
+ # For more details, see [Route-Specific Parameters](#route_params).
141
144
  # * Updatable via API
142
145
  #
143
146
  # - vars (Hash)
144
147
  # * Custom variables stored for this scheduled message (copied to each ScheduledMessage
145
- # and Message when sent)
148
+ # and Message when sent). Variable names may be up to 32 characters in length and can
149
+ # contain the characters a-z, A-Z, 0-9, and _.
150
+ # Values may be strings, numbers, or boolean (true/false).
151
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
152
+ # Up to 100 variables are supported per object.
153
+ # Setting a variable to null will delete the variable.
146
154
  # * Updatable via API
147
155
  #
148
156
  # - label_ids (array)
@@ -23,7 +23,12 @@ module Telerivet
23
23
  # * Updatable via API
24
24
  #
25
25
  # - vars (Hash)
26
- # * Custom variables stored for this route
26
+ # * Custom variables stored for this route. Variable names may be up to 32 characters in
27
+ # length and can contain the characters a-z, A-Z, 0-9, and _.
28
+ # Values may be strings, numbers, or boolean (true/false).
29
+ # String values may be up to 4096 bytes in length when encoded as UTF-8.
30
+ # Up to 100 variables are supported per object.
31
+ # Setting a variable to null will delete the variable.
27
32
  # * Updatable via API
28
33
  #
29
34
  # - project_id
@@ -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. The parameters object may
142
- # have keys matching the `phone_type` field of a phone (basic route) that may be used to
143
- # send the message. The corresponding value is an object with route-specific parameters
144
- # to use when sending a message with that type of route.
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)
@@ -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
@@ -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.7.0'
12
+ @@client_version = '1.8.0'
13
13
 
14
14
  #
15
15
  # Initializes a client handle to the Telerivet REST API.
@@ -88,11 +88,11 @@ class API
88
88
  error_code = error['code']
89
89
 
90
90
  if error_code == 'invalid_param'
91
- raise InvalidParameterException, error['message'] #, error['code'], error['param'])
91
+ raise InvalidParameterException.new error['message'], error['code'], error['param']
92
92
  elsif error_code == 'not_found'
93
- raise NotFoundException, error['message'] #, error['code']);
93
+ raise NotFoundException.new error['message'], error['code']
94
94
  else
95
- raise APIException, error['message'] #, error['code'])
95
+ raise APIException.new error['message'], error['code']
96
96
  end
97
97
  else
98
98
  return res
@@ -282,12 +282,24 @@ class API
282
282
  end
283
283
 
284
284
  class APIException < Exception
285
+ attr_reader :code
286
+
287
+ def initialize(msg, code)
288
+ @code = code
289
+ super(msg)
290
+ end
285
291
  end
286
292
 
287
293
  class NotFoundException < APIException
288
294
  end
289
295
 
290
296
  class InvalidParameterException < APIException
297
+ attr_reader :param
298
+
299
+ def initialize(msg, code, param)
300
+ @param = param
301
+ super(msg, code)
302
+ end
291
303
  end
292
304
 
293
305
  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.7.0
4
+ version: 1.8.0
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: 2023-06-28 00:00:00.000000000 Z
11
+ date: 2025-07-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby client library for Telerivet REST API
14
14
  email: support@telerivet.com
@@ -41,7 +41,7 @@ homepage: http://telerivet.com
41
41
  licenses:
42
42
  - MIT
43
43
  metadata: {}
44
- post_install_message:
44
+ post_install_message:
45
45
  rdoc_options: []
46
46
  require_paths:
47
47
  - lib
@@ -56,8 +56,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  requirements: []
59
- rubygems_version: 3.0.3
60
- signing_key:
59
+ rubygems_version: 3.3.15
60
+ signing_key:
61
61
  specification_version: 4
62
62
  summary: Telerivet REST API Client
63
63
  test_files: []