twilio-ruby 5.67.2 → 5.69.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +1 -1
- data/CHANGES.md +53 -0
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +6 -6
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
- data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
- data/lib/twilio-ruby/rest/insights.rb +0 -8
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +261 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
- data/lib/twilio-ruby/rest/lookups.rb +7 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +4 -11
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +3 -3
- data/lib/twilio-ruby/twiml/voice_response.rb +71 -7
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -3
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dfd0266c044e0696ec36adbe6b650a715bb222c
|
4
|
+
data.tar.gz: 72cdf92cb46568d1b314f2ae67c1d96f9129d0ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e18aee13b94d15e4a19b152d0c730caf8c7ea176e3ab422584a938e7934f415a868e8b592334fab20ccd8d927e6db0dd476d759c95ea0aa035c64658fe33bf9e
|
7
|
+
data.tar.gz: e482fefb1d0b50b0f7c3b79f829b5c3f899efede7dd85b0b0c10b7ba375efa7a7b4545367d1635e54356c0de6219a6080458dee1cb1fea358b0da8a3b00a204b
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,59 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-07-13] Version 5.69.0
|
5
|
+
---------------------------
|
6
|
+
**Library - Fix**
|
7
|
+
- [PR #612](https://github.com/twilio/twilio-ruby/pull/612): useragent regrex unit test for RC branch. Thanks to [@claudiachua](https://github.com/claudiachua)!
|
8
|
+
|
9
|
+
**Library - Test**
|
10
|
+
- [PR #610](https://github.com/twilio/twilio-ruby/pull/610): Adding misc as PR type. Thanks to [@rakatyal](https://github.com/rakatyal)!
|
11
|
+
|
12
|
+
**Conversations**
|
13
|
+
- Allowed to use `identity` as part of Participant's resource **(breaking change)**
|
14
|
+
|
15
|
+
**Lookups**
|
16
|
+
- Remove `enhanced_line_type` from the lookup response **(breaking change)**
|
17
|
+
|
18
|
+
**Supersim**
|
19
|
+
- Add support for `sim_ip_addresses` resource to helper libraries
|
20
|
+
|
21
|
+
**Verify**
|
22
|
+
- Changed summary param `service_sid` to `verify_service_sid` to be consistent with list attempts API **(breaking change)**
|
23
|
+
- Make `code` optional on Verification check to support `sna` attempts.
|
24
|
+
|
25
|
+
|
26
|
+
[2022-06-29] Version 5.68.0
|
27
|
+
---------------------------
|
28
|
+
**Api**
|
29
|
+
- Added `amazon-polly` to `usage_record` API.
|
30
|
+
|
31
|
+
**Insights**
|
32
|
+
- Added `annotation` field in call summary
|
33
|
+
- Added new endpoint to fetch/create/update Call Annotations
|
34
|
+
|
35
|
+
**Verify**
|
36
|
+
- Remove `api.verify.totp` beta flag and set maturity to `beta` for Verify TOTP properties and parameters. **(breaking change)**
|
37
|
+
- Changed summary param `verify_service_sid` to `service_sid` to be consistent with list attempts API **(breaking change)**
|
38
|
+
|
39
|
+
**Twiml**
|
40
|
+
- Add `maxQueueSize` to `Enqueue`
|
41
|
+
|
42
|
+
|
43
|
+
[2022-06-15] Version 5.67.3
|
44
|
+
---------------------------
|
45
|
+
**Lookups**
|
46
|
+
- Adding support for Lookup V2 API
|
47
|
+
|
48
|
+
**Studio**
|
49
|
+
- Corrected PII labels to be 30 days and added context to be PII
|
50
|
+
|
51
|
+
**Twiml**
|
52
|
+
- Add `statusCallbackMethod` attribute, nested `<Config` and `<Parameter>` elements to `<VirtualAgent>` noun.
|
53
|
+
- Add support for new Amazon Polly voices (Q2 2022) for `Say` verb
|
54
|
+
- Add support for `<Conversation>` noun
|
55
|
+
|
56
|
+
|
4
57
|
[2022-06-01] Version 5.67.2
|
5
58
|
---------------------------
|
6
59
|
**Library - Chore**
|
data/PULL_REQUEST_TEMPLATE.md
CHANGED
@@ -3,7 +3,7 @@ We appreciate the effort for this pull request but before that please make sure
|
|
3
3
|
|
4
4
|
Please format the PR title appropriately based on the type of change:
|
5
5
|
<type>[!]: <description>
|
6
|
-
Where <type> is one of: docs, chore, feat, fix, test.
|
6
|
+
Where <type> is one of: docs, chore, feat, fix, test, misc.
|
7
7
|
Add a '!' after the type for breaking changes (e.g. feat!: new breaking feature).
|
8
8
|
|
9
9
|
**All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.**
|
data/README.md
CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
|
|
34
34
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 5.
|
37
|
+
gem 'twilio-ruby', '~> 5.69.0'
|
38
38
|
```
|
39
39
|
|
40
40
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
41
|
|
42
42
|
```bash
|
43
|
-
gem install twilio-ruby -v 5.
|
43
|
+
gem install twilio-ruby -v 5.69.0
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -52,7 +52,7 @@ module Twilio
|
|
52
52
|
# overwritten with `currency` field. Leave blank or set to 0 to tokenize.
|
53
53
|
# @param [String] currency The currency of the `charge_amount`, formatted as {ISO
|
54
54
|
# 4127}[http://www.iso.org/iso/home/standards/currency_codes.htm] format. The
|
55
|
-
# default value is `USD` and all values allowed from the
|
55
|
+
# default value is `USD` and all values allowed from the Pay Connector are
|
56
56
|
# accepted.
|
57
57
|
# @param [String] description The description can be used to provide more details
|
58
58
|
# regarding the transaction. This information is submitted along with the payment
|
@@ -68,9 +68,9 @@ module Twilio
|
|
68
68
|
# that has to be included here depends on the <Pay> Connector. {Read
|
69
69
|
# more}[https://www.twilio.com/console/voice/pay-connectors].
|
70
70
|
# @param [String] payment_connector This is the unique name corresponding to the
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
71
|
+
# Pay Connector installed in the Twilio Add-ons. Learn more about {<Pay>
|
72
|
+
# Connectors}[https://www.twilio.com/console/voice/pay-connectors]. The default
|
73
|
+
# value is `Default`.
|
74
74
|
# @param [payment.PaymentMethod] payment_method Type of payment being captured.
|
75
75
|
# One of `credit-card` or `ach-debit`. The default value is `credit-card`.
|
76
76
|
# @param [Boolean] postal_code Indicates whether the credit card postal code (zip
|
@@ -202,7 +202,7 @@ module Twilio
|
|
202
202
|
# @param [payment.Status] status Indicates whether the current payment session
|
203
203
|
# should be cancelled or completed. When `cancel` the payment session is
|
204
204
|
# cancelled. When `complete`, Twilio sends the payment information to the selected
|
205
|
-
#
|
205
|
+
# Pay Connector for processing.
|
206
206
|
# @return [PaymentInstance] Updated PaymentInstance
|
207
207
|
def update(idempotency_key: nil, status_callback: nil, capture: :unset, status: :unset)
|
208
208
|
data = Twilio::Values.of({
|
@@ -342,7 +342,7 @@ module Twilio
|
|
342
342
|
# @param [payment.Status] status Indicates whether the current payment session
|
343
343
|
# should be cancelled or completed. When `cancel` the payment session is
|
344
344
|
# cancelled. When `complete`, Twilio sends the payment information to the selected
|
345
|
-
#
|
345
|
+
# Pay Connector for processing.
|
346
346
|
# @return [PaymentInstance] Updated PaymentInstance
|
347
347
|
def update(idempotency_key: nil, status_callback: nil, capture: :unset, status: :unset)
|
348
348
|
context.update(
|
@@ -0,0 +1,322 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Insights < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class CallContext < InstanceContext
|
14
|
+
##
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
16
|
+
class AnnotationList < ListResource
|
17
|
+
##
|
18
|
+
# Initialize the AnnotationList
|
19
|
+
# @param [Version] version Version that contains the resource
|
20
|
+
# @param [String] call_sid The unique SID identifier of the Call.
|
21
|
+
# @return [AnnotationList] AnnotationList
|
22
|
+
def initialize(version, call_sid: nil)
|
23
|
+
super(version)
|
24
|
+
|
25
|
+
# Path Solution
|
26
|
+
@solution = {call_sid: call_sid}
|
27
|
+
end
|
28
|
+
|
29
|
+
##
|
30
|
+
# Provide a user friendly representation
|
31
|
+
def to_s
|
32
|
+
'#<Twilio.Insights.V1.AnnotationList>'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
38
|
+
class AnnotationPage < Page
|
39
|
+
##
|
40
|
+
# Initialize the AnnotationPage
|
41
|
+
# @param [Version] version Version that contains the resource
|
42
|
+
# @param [Response] response Response from the API
|
43
|
+
# @param [Hash] solution Path solution for the resource
|
44
|
+
# @return [AnnotationPage] AnnotationPage
|
45
|
+
def initialize(version, response, solution)
|
46
|
+
super(version, response)
|
47
|
+
|
48
|
+
# Path Solution
|
49
|
+
@solution = solution
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Build an instance of AnnotationInstance
|
54
|
+
# @param [Hash] payload Payload response from the API
|
55
|
+
# @return [AnnotationInstance] AnnotationInstance
|
56
|
+
def get_instance(payload)
|
57
|
+
AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
|
58
|
+
end
|
59
|
+
|
60
|
+
##
|
61
|
+
# Provide a user friendly representation
|
62
|
+
def to_s
|
63
|
+
'<Twilio.Insights.V1.AnnotationPage>'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
69
|
+
class AnnotationContext < InstanceContext
|
70
|
+
##
|
71
|
+
# Initialize the AnnotationContext
|
72
|
+
# @param [Version] version Version that contains the resource
|
73
|
+
# @param [String] call_sid The unique SID identifier of the Call.
|
74
|
+
# @return [AnnotationContext] AnnotationContext
|
75
|
+
def initialize(version, call_sid)
|
76
|
+
super(version)
|
77
|
+
|
78
|
+
# Path Solution
|
79
|
+
@solution = {call_sid: call_sid, }
|
80
|
+
@uri = "/Voice/#{@solution[:call_sid]}/Annotation"
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Update the AnnotationInstance
|
85
|
+
# @param [annotation.AnsweredBy] answered_by Which entity answered the call as
|
86
|
+
# determined by Answering Machine Detection. Use this to provide feedback on
|
87
|
+
# Answering Machine Detection accuracy. Possible enumerated values, one of: human,
|
88
|
+
# machine. human indicates the call was answered by a person. machine indicates
|
89
|
+
# the call was answered by an answering machine.
|
90
|
+
# @param [annotation.ConnectivityIssue] connectivity_issue Specify if the call had
|
91
|
+
# any connectivity issues. Possible enumerated values, one :
|
92
|
+
# no_connectivity_issue, invalid_number, caller_id, dropped_call,
|
93
|
+
# number_reachability.
|
94
|
+
# @param [String] quality_issues Specify if the call had any subjective quality
|
95
|
+
# issues. Possible values, one or more of: no_quality_issue, low_volume,
|
96
|
+
# choppy_robotic, echo, dtmf, latency, owa, static_noise. Use comma separated
|
97
|
+
# values to indicate multiple quality issues for the same call
|
98
|
+
# @param [Boolean] spam Specify if the call was a spam call. Use this to provide
|
99
|
+
# feedback on whether calls placed from your account were marked as spam, or if
|
100
|
+
# inbound calls received by your account were unwanted spam. Is of type Boolean:
|
101
|
+
# true, false. Use true if the call was a spam call.
|
102
|
+
# @param [String] call_score Specify the call score. This is of type integer. Use
|
103
|
+
# a range of 1-5 to indicate the call experience score, with the following mapping
|
104
|
+
# as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor,
|
105
|
+
# 1: Bad].
|
106
|
+
# @param [String] comment Specify any comments pertaining to the call. This of
|
107
|
+
# type string with a max limit of 100 characters. Twilio does not treat this field
|
108
|
+
# as PII, so don’t put any PII in here.
|
109
|
+
# @param [String] incident Associate this call with an incident or support ticket.
|
110
|
+
# This is of type string with a max limit of 100 characters. Twilio does not treat
|
111
|
+
# this field as PII, so don’t put any PII in here.
|
112
|
+
# @return [AnnotationInstance] Updated AnnotationInstance
|
113
|
+
def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
|
114
|
+
data = Twilio::Values.of({
|
115
|
+
'AnsweredBy' => answered_by,
|
116
|
+
'ConnectivityIssue' => connectivity_issue,
|
117
|
+
'QualityIssues' => quality_issues,
|
118
|
+
'Spam' => spam,
|
119
|
+
'CallScore' => call_score,
|
120
|
+
'Comment' => comment,
|
121
|
+
'Incident' => incident,
|
122
|
+
})
|
123
|
+
|
124
|
+
payload = @version.update('POST', @uri, data: data)
|
125
|
+
|
126
|
+
AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# Fetch the AnnotationInstance
|
131
|
+
# @return [AnnotationInstance] Fetched AnnotationInstance
|
132
|
+
def fetch
|
133
|
+
payload = @version.fetch('GET', @uri)
|
134
|
+
|
135
|
+
AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# Provide a user friendly representation
|
140
|
+
def to_s
|
141
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
142
|
+
"#<Twilio.Insights.V1.AnnotationContext #{context}>"
|
143
|
+
end
|
144
|
+
|
145
|
+
##
|
146
|
+
# Provide a detailed, user friendly representation
|
147
|
+
def inspect
|
148
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
149
|
+
"#<Twilio.Insights.V1.AnnotationContext #{context}>"
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
##
|
154
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
155
|
+
class AnnotationInstance < InstanceResource
|
156
|
+
##
|
157
|
+
# Initialize the AnnotationInstance
|
158
|
+
# @param [Version] version Version that contains the resource
|
159
|
+
# @param [Hash] payload payload that contains response from Twilio
|
160
|
+
# @param [String] call_sid The unique SID identifier of the Call.
|
161
|
+
# @return [AnnotationInstance] AnnotationInstance
|
162
|
+
def initialize(version, payload, call_sid: nil)
|
163
|
+
super(version)
|
164
|
+
|
165
|
+
# Marshaled Properties
|
166
|
+
@properties = {
|
167
|
+
'call_sid' => payload['call_sid'],
|
168
|
+
'account_sid' => payload['account_sid'],
|
169
|
+
'answered_by' => payload['answered_by'],
|
170
|
+
'connectivity_issue' => payload['connectivity_issue'],
|
171
|
+
'quality_issues' => payload['quality_issues'],
|
172
|
+
'spam' => payload['spam'],
|
173
|
+
'call_score' => payload['call_score'] == nil ? payload['call_score'] : payload['call_score'].to_i,
|
174
|
+
'comment' => payload['comment'],
|
175
|
+
'incident' => payload['incident'],
|
176
|
+
'url' => payload['url'],
|
177
|
+
}
|
178
|
+
|
179
|
+
# Context
|
180
|
+
@instance_context = nil
|
181
|
+
@params = {'call_sid' => call_sid, }
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# Generate an instance context for the instance, the context is capable of
|
186
|
+
# performing various actions. All instance actions are proxied to the context
|
187
|
+
# @return [AnnotationContext] AnnotationContext for this AnnotationInstance
|
188
|
+
def context
|
189
|
+
unless @instance_context
|
190
|
+
@instance_context = AnnotationContext.new(@version, @params['call_sid'], )
|
191
|
+
end
|
192
|
+
@instance_context
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [String] Call SID.
|
197
|
+
def call_sid
|
198
|
+
@properties['call_sid']
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# @return [String] Account SID.
|
203
|
+
def account_sid
|
204
|
+
@properties['account_sid']
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# @return [annotation.AnsweredBy] Indicates the answering entity as determined by Answering Machine Detection.
|
209
|
+
def answered_by
|
210
|
+
@properties['answered_by']
|
211
|
+
end
|
212
|
+
|
213
|
+
##
|
214
|
+
# @return [annotation.ConnectivityIssue] Indicates if the call had any connectivity issue
|
215
|
+
def connectivity_issue
|
216
|
+
@properties['connectivity_issue']
|
217
|
+
end
|
218
|
+
|
219
|
+
##
|
220
|
+
# @return [Array[String]] Indicates if the call had audio quality issues.
|
221
|
+
def quality_issues
|
222
|
+
@properties['quality_issues']
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# @return [Boolean] Call spam indicator
|
227
|
+
def spam
|
228
|
+
@properties['spam']
|
229
|
+
end
|
230
|
+
|
231
|
+
##
|
232
|
+
# @return [String] Call Score
|
233
|
+
def call_score
|
234
|
+
@properties['call_score']
|
235
|
+
end
|
236
|
+
|
237
|
+
##
|
238
|
+
# @return [String] User comments
|
239
|
+
def comment
|
240
|
+
@properties['comment']
|
241
|
+
end
|
242
|
+
|
243
|
+
##
|
244
|
+
# @return [String] Call tag for incidents or support ticket
|
245
|
+
def incident
|
246
|
+
@properties['incident']
|
247
|
+
end
|
248
|
+
|
249
|
+
##
|
250
|
+
# @return [String] The URL of this resource.
|
251
|
+
def url
|
252
|
+
@properties['url']
|
253
|
+
end
|
254
|
+
|
255
|
+
##
|
256
|
+
# Update the AnnotationInstance
|
257
|
+
# @param [annotation.AnsweredBy] answered_by Which entity answered the call as
|
258
|
+
# determined by Answering Machine Detection. Use this to provide feedback on
|
259
|
+
# Answering Machine Detection accuracy. Possible enumerated values, one of: human,
|
260
|
+
# machine. human indicates the call was answered by a person. machine indicates
|
261
|
+
# the call was answered by an answering machine.
|
262
|
+
# @param [annotation.ConnectivityIssue] connectivity_issue Specify if the call had
|
263
|
+
# any connectivity issues. Possible enumerated values, one :
|
264
|
+
# no_connectivity_issue, invalid_number, caller_id, dropped_call,
|
265
|
+
# number_reachability.
|
266
|
+
# @param [String] quality_issues Specify if the call had any subjective quality
|
267
|
+
# issues. Possible values, one or more of: no_quality_issue, low_volume,
|
268
|
+
# choppy_robotic, echo, dtmf, latency, owa, static_noise. Use comma separated
|
269
|
+
# values to indicate multiple quality issues for the same call
|
270
|
+
# @param [Boolean] spam Specify if the call was a spam call. Use this to provide
|
271
|
+
# feedback on whether calls placed from your account were marked as spam, or if
|
272
|
+
# inbound calls received by your account were unwanted spam. Is of type Boolean:
|
273
|
+
# true, false. Use true if the call was a spam call.
|
274
|
+
# @param [String] call_score Specify the call score. This is of type integer. Use
|
275
|
+
# a range of 1-5 to indicate the call experience score, with the following mapping
|
276
|
+
# as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor,
|
277
|
+
# 1: Bad].
|
278
|
+
# @param [String] comment Specify any comments pertaining to the call. This of
|
279
|
+
# type string with a max limit of 100 characters. Twilio does not treat this field
|
280
|
+
# as PII, so don’t put any PII in here.
|
281
|
+
# @param [String] incident Associate this call with an incident or support ticket.
|
282
|
+
# This is of type string with a max limit of 100 characters. Twilio does not treat
|
283
|
+
# this field as PII, so don’t put any PII in here.
|
284
|
+
# @return [AnnotationInstance] Updated AnnotationInstance
|
285
|
+
def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
|
286
|
+
context.update(
|
287
|
+
answered_by: answered_by,
|
288
|
+
connectivity_issue: connectivity_issue,
|
289
|
+
quality_issues: quality_issues,
|
290
|
+
spam: spam,
|
291
|
+
call_score: call_score,
|
292
|
+
comment: comment,
|
293
|
+
incident: incident,
|
294
|
+
)
|
295
|
+
end
|
296
|
+
|
297
|
+
##
|
298
|
+
# Fetch the AnnotationInstance
|
299
|
+
# @return [AnnotationInstance] Fetched AnnotationInstance
|
300
|
+
def fetch
|
301
|
+
context.fetch
|
302
|
+
end
|
303
|
+
|
304
|
+
##
|
305
|
+
# Provide a user friendly representation
|
306
|
+
def to_s
|
307
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
308
|
+
"<Twilio.Insights.V1.AnnotationInstance #{values}>"
|
309
|
+
end
|
310
|
+
|
311
|
+
##
|
312
|
+
# Provide a detailed, user friendly representation
|
313
|
+
def inspect
|
314
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
315
|
+
"<Twilio.Insights.V1.AnnotationInstance #{values}>"
|
316
|
+
end
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
@@ -134,6 +134,7 @@ module Twilio
|
|
134
134
|
'attributes' => payload['attributes'],
|
135
135
|
'properties' => payload['properties'],
|
136
136
|
'trust' => payload['trust'],
|
137
|
+
'annotation' => payload['annotation'],
|
137
138
|
}
|
138
139
|
|
139
140
|
# Context
|
@@ -278,6 +279,12 @@ module Twilio
|
|
278
279
|
@properties['trust']
|
279
280
|
end
|
280
281
|
|
282
|
+
##
|
283
|
+
# @return [Hash] The annotation
|
284
|
+
def annotation
|
285
|
+
@properties['annotation']
|
286
|
+
end
|
287
|
+
|
281
288
|
##
|
282
289
|
# Fetch the CallSummaryInstance
|
283
290
|
# @param [call_summary.ProcessingState] processing_state The processing_state
|
@@ -10,8 +10,6 @@ module Twilio
|
|
10
10
|
module REST
|
11
11
|
class Insights < Domain
|
12
12
|
class V1 < Version
|
13
|
-
##
|
14
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
13
|
class CallList < ListResource
|
16
14
|
##
|
17
15
|
# Initialize the CallList
|
@@ -31,8 +29,6 @@ module Twilio
|
|
31
29
|
end
|
32
30
|
end
|
33
31
|
|
34
|
-
##
|
35
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
36
32
|
class CallPage < Page
|
37
33
|
##
|
38
34
|
# Initialize the CallPage
|
@@ -62,8 +58,6 @@ module Twilio
|
|
62
58
|
end
|
63
59
|
end
|
64
60
|
|
65
|
-
##
|
66
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
67
61
|
class CallContext < InstanceContext
|
68
62
|
##
|
69
63
|
# Initialize the CallContext
|
@@ -81,6 +75,7 @@ module Twilio
|
|
81
75
|
@events = nil
|
82
76
|
@metrics = nil
|
83
77
|
@summary = nil
|
78
|
+
@annotation = nil
|
84
79
|
end
|
85
80
|
|
86
81
|
##
|
@@ -124,6 +119,14 @@ module Twilio
|
|
124
119
|
CallSummaryContext.new(@version, @solution[:sid], )
|
125
120
|
end
|
126
121
|
|
122
|
+
##
|
123
|
+
# Access the annotation
|
124
|
+
# @return [AnnotationList]
|
125
|
+
# @return [AnnotationContext]
|
126
|
+
def annotation
|
127
|
+
AnnotationContext.new(@version, @solution[:sid], )
|
128
|
+
end
|
129
|
+
|
127
130
|
##
|
128
131
|
# Provide a user friendly representation
|
129
132
|
def to_s
|
@@ -139,8 +142,6 @@ module Twilio
|
|
139
142
|
end
|
140
143
|
end
|
141
144
|
|
142
|
-
##
|
143
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
144
145
|
class CallInstance < InstanceResource
|
145
146
|
##
|
146
147
|
# Initialize the CallInstance
|
@@ -216,6 +217,13 @@ module Twilio
|
|
216
217
|
context.summary
|
217
218
|
end
|
218
219
|
|
220
|
+
##
|
221
|
+
# Access the annotation
|
222
|
+
# @return [annotation] annotation
|
223
|
+
def annotation
|
224
|
+
context.annotation
|
225
|
+
end
|
226
|
+
|
219
227
|
##
|
220
228
|
# Provide a user friendly representation
|
221
229
|
def to_s
|
@@ -16,7 +16,6 @@ module Twilio
|
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
18
|
@settings = nil
|
19
|
-
@annotation = nil
|
20
19
|
@calls = nil
|
21
20
|
@call_summaries = nil
|
22
21
|
@conferences = nil
|
@@ -29,21 +28,6 @@ module Twilio
|
|
29
28
|
@settings ||= SettingContext.new self
|
30
29
|
end
|
31
30
|
|
32
|
-
##
|
33
|
-
# @param [String] call_sid The call_sid
|
34
|
-
# @return [Twilio::REST::Insights::V1::AnnotationContext] if call_sid was passed.
|
35
|
-
# @return [Twilio::REST::Insights::V1::AnnotationList]
|
36
|
-
def annotation(call_sid=:unset)
|
37
|
-
if call_sid.nil?
|
38
|
-
raise ArgumentError, 'call_sid cannot be nil'
|
39
|
-
end
|
40
|
-
if call_sid == :unset
|
41
|
-
@annotation ||= AnnotationList.new self
|
42
|
-
else
|
43
|
-
AnnotationContext.new(self, call_sid)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
31
|
##
|
48
32
|
# @param [String] sid The sid
|
49
33
|
# @return [Twilio::REST::Insights::V1::CallContext] if sid was passed.
|
@@ -34,14 +34,6 @@ module Twilio
|
|
34
34
|
self.v1.settings()
|
35
35
|
end
|
36
36
|
|
37
|
-
##
|
38
|
-
# @param [String] call_sid The call_sid
|
39
|
-
# @return [Twilio::REST::Insights::V1::AnnotationInstance] if call_sid was passed.
|
40
|
-
# @return [Twilio::REST::Insights::V1::AnnotationList]
|
41
|
-
def annotation(call_sid=:unset)
|
42
|
-
self.v1.annotation(call_sid)
|
43
|
-
end
|
44
|
-
|
45
37
|
##
|
46
38
|
# @param [String] sid The sid
|
47
39
|
# @return [Twilio::REST::Insights::V1::CallInstance] if sid was passed.
|