twilio-ruby 6.0.1 → 6.1.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 +4 -4
- data/CHANGES.md +22 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +4 -4
- data/lib/twilio-ruby/rest/client.rb +5 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +28 -21
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +511 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +226 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +383 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +250 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +540 -0
- data/lib/twilio-ruby/rest/intelligence/v2.rb +64 -0
- data/lib/twilio-ruby/rest/intelligence.rb +6 -0
- data/lib/twilio-ruby/rest/intelligence_base.rb +38 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +7 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c6b1c3502cddca5945482d45e5a8363b72e858f
|
4
|
+
data.tar.gz: 83a05654e46726cc1f5c8a34b43664894b6f88e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ff45689c5dc58765000a2d10fbc8af9a6a8283e3448114e39033db16e5a0a14130e78ebdbcd06b095ce965e121fa477c0bcb87e16bbe796b53c6844db121eb9
|
7
|
+
data.tar.gz: c83c6a846d766369d3d897d7d6ae4574c3b75fb3f6eae9f296cb920401911deb443062d34c218e680960548218c2b08c7058237a61967dc75dc02d81c321c163
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2023-06-15] Version 6.1.0
|
5
|
+
--------------------------
|
6
|
+
**Api**
|
7
|
+
- Added `content_sid` as conditional parameter
|
8
|
+
- Removed `content_sid` as optional field **(breaking change)**
|
9
|
+
|
10
|
+
**Insights**
|
11
|
+
- Added `annotation` to list summary output
|
12
|
+
|
13
|
+
|
14
|
+
[2023-06-01] Version 6.0.2
|
15
|
+
--------------------------
|
16
|
+
**Api**
|
17
|
+
- Add `Trim` to create Conference Participant API
|
18
|
+
|
19
|
+
**Intelligence**
|
20
|
+
- First public beta release for Voice Intelligence APIs with client libraries
|
21
|
+
|
22
|
+
**Messaging**
|
23
|
+
- Add new `errors` attribute to us_app_to_person resource. This attribute will provide additional information about campaign registration errors.
|
24
|
+
|
25
|
+
|
4
26
|
[2023-05-18] Version 6.0.1
|
5
27
|
--------------------------
|
6
28
|
**Library - Fix**
|
data/README.md
CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
|
|
39
39
|
To install using [Bundler][bundler] grab the latest stable version:
|
40
40
|
|
41
41
|
```ruby
|
42
|
-
gem 'twilio-ruby', '~> 6.0
|
42
|
+
gem 'twilio-ruby', '~> 6.1.0'
|
43
43
|
```
|
44
44
|
|
45
45
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
46
46
|
|
47
47
|
```bash
|
48
|
-
gem install twilio-ruby -v 6.0
|
48
|
+
gem install twilio-ruby -v 6.1.0
|
49
49
|
```
|
50
50
|
|
51
51
|
To build and install the development branch yourself from the latest source:
|
@@ -51,7 +51,7 @@ module Twilio
|
|
51
51
|
# @param [Boolean] early_media Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
|
52
52
|
# @param [String] max_participants The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
|
53
53
|
# @param [String] conference_record Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
|
54
|
-
# @param [String] conference_trim Whether to trim leading and trailing silence from
|
54
|
+
# @param [String] conference_trim Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
|
55
55
|
# @param [String] conference_status_callback The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
|
56
56
|
# @param [String] conference_status_callback_method The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
|
57
57
|
# @param [Array[String]] conference_status_callback_event The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`.
|
@@ -80,6 +80,7 @@ module Twilio
|
|
80
80
|
# @param [String] machine_detection_silence_timeout The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
|
81
81
|
# @param [String] amd_status_callback The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
|
82
82
|
# @param [String] amd_status_callback_method The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
|
83
|
+
# @param [String] trim Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
|
83
84
|
# @return [ParticipantInstance] Created ParticipantInstance
|
84
85
|
def create(
|
85
86
|
from: nil,
|
@@ -127,7 +128,8 @@ module Twilio
|
|
127
128
|
machine_detection_speech_end_threshold: :unset,
|
128
129
|
machine_detection_silence_timeout: :unset,
|
129
130
|
amd_status_callback: :unset,
|
130
|
-
amd_status_callback_method: :unset
|
131
|
+
amd_status_callback_method: :unset,
|
132
|
+
trim: :unset
|
131
133
|
)
|
132
134
|
|
133
135
|
data = Twilio::Values.of({
|
@@ -177,6 +179,7 @@ module Twilio
|
|
177
179
|
'MachineDetectionSilenceTimeout' => machine_detection_silence_timeout,
|
178
180
|
'AmdStatusCallback' => amd_status_callback,
|
179
181
|
'AmdStatusCallbackMethod' => amd_status_callback_method,
|
182
|
+
'Trim' => trim,
|
180
183
|
})
|
181
184
|
|
182
185
|
payload = @version.create('POST', @uri, data: data)
|
@@ -49,12 +49,12 @@ module Twilio
|
|
49
49
|
# @param [ScheduleType] schedule_type
|
50
50
|
# @param [Time] send_at The time that Twilio will send the message. Must be in ISO 8601 format.
|
51
51
|
# @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.
|
52
|
-
# @param [String] content_sid The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized.
|
53
52
|
# @param [String] content_variables Key-value pairs of variable names to substitution values, used alongside a content_sid. If not specified, Content API will default to the default variables defined at create time.
|
54
53
|
# @param [String] from A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty.
|
55
54
|
# @param [String] messaging_service_sid The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery.
|
56
55
|
# @param [String] body The text of the message you want to send. Can be up to 1,600 characters in length.
|
57
56
|
# @param [Array[String]] media_url The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada.
|
57
|
+
# @param [String] content_sid The SID of the Content object returned at Content API content create time (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template). If this parameter is not specified, then the Content API will not be utilized.
|
58
58
|
# @return [MessageInstance] Created MessageInstance
|
59
59
|
def create(
|
60
60
|
to: nil,
|
@@ -73,12 +73,12 @@ module Twilio
|
|
73
73
|
schedule_type: :unset,
|
74
74
|
send_at: :unset,
|
75
75
|
send_as_mms: :unset,
|
76
|
-
content_sid: :unset,
|
77
76
|
content_variables: :unset,
|
78
77
|
from: :unset,
|
79
78
|
messaging_service_sid: :unset,
|
80
79
|
body: :unset,
|
81
|
-
media_url: :unset
|
80
|
+
media_url: :unset,
|
81
|
+
content_sid: :unset
|
82
82
|
)
|
83
83
|
|
84
84
|
data = Twilio::Values.of({
|
@@ -98,12 +98,12 @@ module Twilio
|
|
98
98
|
'ScheduleType' => schedule_type,
|
99
99
|
'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
|
100
100
|
'SendAsMms' => send_as_mms,
|
101
|
-
'ContentSid' => content_sid,
|
102
101
|
'ContentVariables' => content_variables,
|
103
102
|
'From' => from,
|
104
103
|
'MessagingServiceSid' => messaging_service_sid,
|
105
104
|
'Body' => body,
|
106
105
|
'MediaUrl' => Twilio.serialize_list(media_url) { |e| e },
|
106
|
+
'ContentSid' => content_sid,
|
107
107
|
})
|
108
108
|
|
109
109
|
payload = @version.create('POST', @uri, data: data)
|
@@ -72,6 +72,11 @@ module Twilio
|
|
72
72
|
@insights ||= Insights.new self
|
73
73
|
end
|
74
74
|
##
|
75
|
+
# Access the Intelligence Twilio Domain
|
76
|
+
def intelligence
|
77
|
+
@intelligence ||= Intelligence.new self
|
78
|
+
end
|
79
|
+
##
|
75
80
|
# Access the IpMessaging Twilio Domain
|
76
81
|
def ip_messaging
|
77
82
|
@ip_messaging ||= IpMessaging.new self
|
@@ -53,10 +53,10 @@ module Twilio
|
|
53
53
|
# @param [String] subaccount
|
54
54
|
# @param [Boolean] abnormal_session
|
55
55
|
# @param [AnsweredBy] answered_by
|
56
|
-
# @param [String]
|
57
|
-
# @param [String]
|
56
|
+
# @param [String] connectivity_issue
|
57
|
+
# @param [String] quality_issue
|
58
58
|
# @param [Boolean] spam
|
59
|
-
# @param [String]
|
59
|
+
# @param [String] call_score
|
60
60
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
61
61
|
# guarantees to never return more than limit. Default is no limit
|
62
62
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -64,7 +64,7 @@ module Twilio
|
|
64
64
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
65
65
|
# efficient page size, i.e. min(limit, 1000)
|
66
66
|
# @return [Array] Array of up to limit results
|
67
|
-
def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset,
|
67
|
+
def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issue: :unset, quality_issue: :unset, spam: :unset, call_score: :unset, limit: nil, page_size: nil)
|
68
68
|
self.stream(
|
69
69
|
from: from,
|
70
70
|
to: to,
|
@@ -85,10 +85,10 @@ module Twilio
|
|
85
85
|
subaccount: subaccount,
|
86
86
|
abnormal_session: abnormal_session,
|
87
87
|
answered_by: answered_by,
|
88
|
-
|
89
|
-
|
88
|
+
connectivity_issue: connectivity_issue,
|
89
|
+
quality_issue: quality_issue,
|
90
90
|
spam: spam,
|
91
|
-
|
91
|
+
call_score: call_score,
|
92
92
|
limit: limit,
|
93
93
|
page_size: page_size
|
94
94
|
).entries
|
@@ -117,10 +117,10 @@ module Twilio
|
|
117
117
|
# @param [String] subaccount
|
118
118
|
# @param [Boolean] abnormal_session
|
119
119
|
# @param [AnsweredBy] answered_by
|
120
|
-
# @param [String]
|
121
|
-
# @param [String]
|
120
|
+
# @param [String] connectivity_issue
|
121
|
+
# @param [String] quality_issue
|
122
122
|
# @param [Boolean] spam
|
123
|
-
# @param [String]
|
123
|
+
# @param [String] call_score
|
124
124
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
125
125
|
# guarantees to never return more than limit. Default is no limit
|
126
126
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -128,7 +128,7 @@ module Twilio
|
|
128
128
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
129
129
|
# efficient page size, i.e. min(limit, 1000)
|
130
130
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
131
|
-
def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset,
|
131
|
+
def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issue: :unset, quality_issue: :unset, spam: :unset, call_score: :unset, limit: nil, page_size: nil)
|
132
132
|
limits = @version.read_limits(limit, page_size)
|
133
133
|
|
134
134
|
page = self.page(
|
@@ -151,10 +151,10 @@ module Twilio
|
|
151
151
|
subaccount: subaccount,
|
152
152
|
abnormal_session: abnormal_session,
|
153
153
|
answered_by: answered_by,
|
154
|
-
|
155
|
-
|
154
|
+
connectivity_issue: connectivity_issue,
|
155
|
+
quality_issue: quality_issue,
|
156
156
|
spam: spam,
|
157
|
-
|
157
|
+
call_score: call_score,
|
158
158
|
page_size: limits[:page_size], )
|
159
159
|
|
160
160
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
@@ -196,15 +196,15 @@ module Twilio
|
|
196
196
|
# @param [String] subaccount
|
197
197
|
# @param [Boolean] abnormal_session
|
198
198
|
# @param [AnsweredBy] answered_by
|
199
|
-
# @param [String]
|
200
|
-
# @param [String]
|
199
|
+
# @param [String] connectivity_issue
|
200
|
+
# @param [String] quality_issue
|
201
201
|
# @param [Boolean] spam
|
202
|
-
# @param [String]
|
202
|
+
# @param [String] call_score
|
203
203
|
# @param [String] page_token PageToken provided by the API
|
204
204
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
205
205
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
206
206
|
# @return [Page] Page of CallSummariesInstance
|
207
|
-
def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset,
|
207
|
+
def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issue: :unset, quality_issue: :unset, spam: :unset, call_score: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
208
208
|
params = Twilio::Values.of({
|
209
209
|
|
210
210
|
'From' => from,
|
@@ -245,13 +245,13 @@ module Twilio
|
|
245
245
|
|
246
246
|
'AnsweredBy' => answered_by,
|
247
247
|
|
248
|
-
'
|
248
|
+
'ConnectivityIssue' => connectivity_issue,
|
249
249
|
|
250
|
-
'
|
250
|
+
'QualityIssue' => quality_issue,
|
251
251
|
|
252
252
|
'Spam' => spam,
|
253
253
|
|
254
|
-
'
|
254
|
+
'CallScore' => call_score,
|
255
255
|
|
256
256
|
'PageToken' => page_token,
|
257
257
|
'Page' => page_number,
|
@@ -349,6 +349,7 @@ module Twilio
|
|
349
349
|
'attributes' => payload['attributes'],
|
350
350
|
'properties' => payload['properties'],
|
351
351
|
'trust' => payload['trust'],
|
352
|
+
'annotation' => payload['annotation'],
|
352
353
|
}
|
353
354
|
end
|
354
355
|
|
@@ -485,6 +486,12 @@ module Twilio
|
|
485
486
|
@properties['trust']
|
486
487
|
end
|
487
488
|
|
489
|
+
##
|
490
|
+
# @return [Hash]
|
491
|
+
def annotation
|
492
|
+
@properties['annotation']
|
493
|
+
end
|
494
|
+
|
488
495
|
##
|
489
496
|
# Provide a user friendly representation
|
490
497
|
def to_s
|