twilio-ruby 5.67.3 → 5.70.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/.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/flex_api/v1/interaction/interaction_channel.rb +22 -1
- 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 +2 -9
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -7
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +2 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
- 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 +8 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +3 -2
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +4 -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: 101ceb0bd96cbd76a7c4344baba3327f1bd84e73
|
|
4
|
+
data.tar.gz: 7370d333ed649d1f5dc98553b61fa2d90ae80913
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29aac9973a3d76158c94254f81956be791055e6013b989c581f38429b4b187a3ef8b5264f62eabacc2297efdcda52275ce7eb0587b9e8631b36fcfb14f1bafb4
|
|
7
|
+
data.tar.gz: 18dd0b51c26195e9377aa2d6698745296fd155f388a387de9d3734c6124891f0301b1f336e73db5ede774ec34dec79dbc862e3cb9ae0b5cf476edf95c5d29ae0
|
data/CHANGES.md
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
1
|
twilio-ruby changelog
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
|
+
[2022-07-21] Version 5.70.0
|
|
5
|
+
---------------------------
|
|
6
|
+
**Flex**
|
|
7
|
+
- Add `status`, `error_code`, and `error_message` fields to Interaction `Channel`
|
|
8
|
+
- Adding `messenger` and `gbm` as supported channels for Interactions API
|
|
9
|
+
|
|
10
|
+
**Messaging**
|
|
11
|
+
- Update alpha_sender docs with new valid characters
|
|
12
|
+
|
|
13
|
+
**Verify**
|
|
14
|
+
- Reorder Verification Check parameters so `code` stays as the first parameter **(breaking change)**
|
|
15
|
+
- Rollback List Attempts API V2 back to pilot stage.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
[2022-07-13] Version 5.69.0
|
|
19
|
+
---------------------------
|
|
20
|
+
**Library - Fix**
|
|
21
|
+
- [PR #612](https://github.com/twilio/twilio-ruby/pull/612): useragent regrex unit test for RC branch. Thanks to [@claudiachua](https://github.com/claudiachua)!
|
|
22
|
+
|
|
23
|
+
**Library - Test**
|
|
24
|
+
- [PR #610](https://github.com/twilio/twilio-ruby/pull/610): Adding misc as PR type. Thanks to [@rakatyal](https://github.com/rakatyal)!
|
|
25
|
+
|
|
26
|
+
**Conversations**
|
|
27
|
+
- Allowed to use `identity` as part of Participant's resource **(breaking change)**
|
|
28
|
+
|
|
29
|
+
**Lookups**
|
|
30
|
+
- Remove `enhanced_line_type` from the lookup response **(breaking change)**
|
|
31
|
+
|
|
32
|
+
**Supersim**
|
|
33
|
+
- Add support for `sim_ip_addresses` resource to helper libraries
|
|
34
|
+
|
|
35
|
+
**Verify**
|
|
36
|
+
- Changed summary param `service_sid` to `verify_service_sid` to be consistent with list attempts API **(breaking change)**
|
|
37
|
+
- Make `code` optional on Verification check to support `sna` attempts. **(breaking change)**
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
[2022-06-29] Version 5.68.0
|
|
41
|
+
---------------------------
|
|
42
|
+
**Api**
|
|
43
|
+
- Added `amazon-polly` to `usage_record` API.
|
|
44
|
+
|
|
45
|
+
**Insights**
|
|
46
|
+
- Added `annotation` field in call summary
|
|
47
|
+
- Added new endpoint to fetch/create/update Call Annotations
|
|
48
|
+
|
|
49
|
+
**Verify**
|
|
50
|
+
- Remove `api.verify.totp` beta flag and set maturity to `beta` for Verify TOTP properties and parameters. **(breaking change)**
|
|
51
|
+
- Changed summary param `verify_service_sid` to `service_sid` to be consistent with list attempts API **(breaking change)**
|
|
52
|
+
|
|
53
|
+
**Twiml**
|
|
54
|
+
- Add `maxQueueSize` to `Enqueue`
|
|
55
|
+
|
|
56
|
+
|
|
4
57
|
[2022-06-15] Version 5.67.3
|
|
5
58
|
---------------------------
|
|
6
59
|
**Lookups**
|
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.70.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.70.0
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
|
@@ -275,6 +275,9 @@ module Twilio
|
|
|
275
275
|
'sid' => payload['sid'],
|
|
276
276
|
'interaction_sid' => payload['interaction_sid'],
|
|
277
277
|
'type' => payload['type'],
|
|
278
|
+
'status' => payload['status'],
|
|
279
|
+
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
|
280
|
+
'error_message' => payload['error_message'],
|
|
278
281
|
'url' => payload['url'],
|
|
279
282
|
'links' => payload['links'],
|
|
280
283
|
}
|
|
@@ -306,7 +309,7 @@ module Twilio
|
|
|
306
309
|
end
|
|
307
310
|
|
|
308
311
|
##
|
|
309
|
-
# @return [String] The unique string that identifies the resource
|
|
312
|
+
# @return [String] The unique string that identifies the resource.
|
|
310
313
|
def interaction_sid
|
|
311
314
|
@properties['interaction_sid']
|
|
312
315
|
end
|
|
@@ -317,6 +320,24 @@ module Twilio
|
|
|
317
320
|
@properties['type']
|
|
318
321
|
end
|
|
319
322
|
|
|
323
|
+
##
|
|
324
|
+
# @return [interaction_channel.ChannelStatus] The status of this channel.
|
|
325
|
+
def status
|
|
326
|
+
@properties['status']
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
##
|
|
330
|
+
# @return [String] The Twilio error code for a failed channel.
|
|
331
|
+
def error_code
|
|
332
|
+
@properties['error_code']
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
##
|
|
336
|
+
# @return [String] The error message for a failed channel.
|
|
337
|
+
def error_message
|
|
338
|
+
@properties['error_message']
|
|
339
|
+
end
|
|
340
|
+
|
|
320
341
|
##
|
|
321
342
|
# @return [String] The url
|
|
322
343
|
def url
|
|
@@ -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.
|
|
@@ -83,7 +83,7 @@ module Twilio
|
|
|
83
83
|
# Fetch the PhoneNumberInstance
|
|
84
84
|
# @param [String] fields A comma-separated list of fields to return. Possible
|
|
85
85
|
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
|
86
|
-
#
|
|
86
|
+
# line_type_intelligence.
|
|
87
87
|
# @param [String] country_code The {country
|
|
88
88
|
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
|
89
89
|
# provided is in national format.
|
|
@@ -136,7 +136,6 @@ module Twilio
|
|
|
136
136
|
'sim_swap' => payload['sim_swap'],
|
|
137
137
|
'call_forwarding' => payload['call_forwarding'],
|
|
138
138
|
'live_activity' => payload['live_activity'],
|
|
139
|
-
'enhanced_line_type' => payload['enhanced_line_type'],
|
|
140
139
|
'line_type_intelligence' => payload['line_type_intelligence'],
|
|
141
140
|
'url' => payload['url'],
|
|
142
141
|
}
|
|
@@ -217,12 +216,6 @@ module Twilio
|
|
|
217
216
|
@properties['live_activity']
|
|
218
217
|
end
|
|
219
218
|
|
|
220
|
-
##
|
|
221
|
-
# @return [Hash] An object that contains line type information
|
|
222
|
-
def enhanced_line_type
|
|
223
|
-
@properties['enhanced_line_type']
|
|
224
|
-
end
|
|
225
|
-
|
|
226
219
|
##
|
|
227
220
|
# @return [Hash] An object that contains line type information
|
|
228
221
|
def line_type_intelligence
|
|
@@ -239,7 +232,7 @@ module Twilio
|
|
|
239
232
|
# Fetch the PhoneNumberInstance
|
|
240
233
|
# @param [String] fields A comma-separated list of fields to return. Possible
|
|
241
234
|
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
|
242
|
-
#
|
|
235
|
+
# line_type_intelligence.
|
|
243
236
|
# @param [String] country_code The {country
|
|
244
237
|
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
|
245
238
|
# provided is in national format.
|
|
@@ -243,7 +243,6 @@ module Twilio
|
|
|
243
243
|
# Marshaled Properties
|
|
244
244
|
@properties = {
|
|
245
245
|
'account_sid' => payload['account_sid'],
|
|
246
|
-
'bitrate' => payload['bitrate'].to_i,
|
|
247
246
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
248
247
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
249
248
|
'duration' => payload['duration'].to_i,
|
|
@@ -282,12 +281,6 @@ module Twilio
|
|
|
282
281
|
@properties['account_sid']
|
|
283
282
|
end
|
|
284
283
|
|
|
285
|
-
##
|
|
286
|
-
# @return [String] The bitrate of the media
|
|
287
|
-
def bitrate
|
|
288
|
-
@properties['bitrate']
|
|
289
|
-
end
|
|
290
|
-
|
|
291
284
|
##
|
|
292
285
|
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
|
293
286
|
def date_created
|
|
@@ -36,7 +36,8 @@ module Twilio
|
|
|
36
36
|
# PlayerStreamer can run before automatically ends. The default value is 300
|
|
37
37
|
# seconds, and the maximum value is 90000 seconds. Once this maximum duration is
|
|
38
38
|
# reached, Twilio will end the PlayerStreamer, regardless of whether media is
|
|
39
|
-
# still streaming.
|
|
39
|
+
# still streaming. **Note: this feature has not yet been enabled but customers are
|
|
40
|
+
# advised to explicitly set it on all their new PlayerStreamer resources.**
|
|
40
41
|
# @return [PlayerStreamerInstance] Created PlayerStreamerInstance
|
|
41
42
|
def create(video: :unset, status_callback: :unset, status_callback_method: :unset, max_duration: :unset)
|
|
42
43
|
data = Twilio::Values.of({
|
|
@@ -32,8 +32,8 @@ module Twilio
|
|
|
32
32
|
##
|
|
33
33
|
# Create the AlphaSenderInstance
|
|
34
34
|
# @param [String] alpha_sender The Alphanumeric Sender ID string. Can be up to 11
|
|
35
|
-
# characters long. Valid characters are A-Z, a-z, 0-9, space,
|
|
36
|
-
# value cannot contain only numbers.
|
|
35
|
+
# characters long. Valid characters are A-Z, a-z, 0-9, space, hyphen `-`, plus
|
|
36
|
+
# `+`, underscore `_` and ampersand `&`. This value cannot contain only numbers.
|
|
37
37
|
# @return [AlphaSenderInstance] Created AlphaSenderInstance
|
|
38
38
|
def create(alpha_sender: nil)
|
|
39
39
|
data = Twilio::Values.of({'AlphaSender' => alpha_sender, })
|
|
@@ -0,0 +1,195 @@
|
|
|
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 Supersim < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
class SimContext < InstanceContext
|
|
14
|
+
##
|
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
16
|
+
class SimIpAddressList < ListResource
|
|
17
|
+
##
|
|
18
|
+
# Initialize the SimIpAddressList
|
|
19
|
+
# @param [Version] version Version that contains the resource
|
|
20
|
+
# @param [String] sim_sid The unique string that identifies the Sim resource.
|
|
21
|
+
# @return [SimIpAddressList] SimIpAddressList
|
|
22
|
+
def initialize(version, sim_sid: nil)
|
|
23
|
+
super(version)
|
|
24
|
+
|
|
25
|
+
# Path Solution
|
|
26
|
+
@solution = {sim_sid: sim_sid}
|
|
27
|
+
@uri = "/Sims/#{@solution[:sim_sid]}/IpAddresses"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
##
|
|
31
|
+
# Lists SimIpAddressInstance records from the API as a list.
|
|
32
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
33
|
+
# memory before returning.
|
|
34
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
35
|
+
# guarantees to never return more than limit. Default is no limit
|
|
36
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
37
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
38
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
39
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
40
|
+
# @return [Array] Array of up to limit results
|
|
41
|
+
def list(limit: nil, page_size: nil)
|
|
42
|
+
self.stream(limit: limit, page_size: page_size).entries
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
##
|
|
46
|
+
# Streams SimIpAddressInstance records from the API as an Enumerable.
|
|
47
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
48
|
+
# is reached.
|
|
49
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
50
|
+
# guarantees to never return more than limit. Default is no limit.
|
|
51
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
|
52
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
|
53
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
54
|
+
# efficient page size, i.e. min(limit, 1000)
|
|
55
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
56
|
+
def stream(limit: nil, page_size: nil)
|
|
57
|
+
limits = @version.read_limits(limit, page_size)
|
|
58
|
+
|
|
59
|
+
page = self.page(page_size: limits[:page_size], )
|
|
60
|
+
|
|
61
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
##
|
|
65
|
+
# When passed a block, yields SimIpAddressInstance records from the API.
|
|
66
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
|
67
|
+
# is reached.
|
|
68
|
+
def each
|
|
69
|
+
limits = @version.read_limits
|
|
70
|
+
|
|
71
|
+
page = self.page(page_size: limits[:page_size], )
|
|
72
|
+
|
|
73
|
+
@version.stream(page,
|
|
74
|
+
limit: limits[:limit],
|
|
75
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
##
|
|
79
|
+
# Retrieve a single page of SimIpAddressInstance records from the API.
|
|
80
|
+
# Request is executed immediately.
|
|
81
|
+
# @param [String] page_token PageToken provided by the API
|
|
82
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
83
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
84
|
+
# @return [Page] Page of SimIpAddressInstance
|
|
85
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
|
86
|
+
params = Twilio::Values.of({
|
|
87
|
+
'PageToken' => page_token,
|
|
88
|
+
'Page' => page_number,
|
|
89
|
+
'PageSize' => page_size,
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
response = @version.page('GET', @uri, params: params)
|
|
93
|
+
|
|
94
|
+
SimIpAddressPage.new(@version, response, @solution)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
##
|
|
98
|
+
# Retrieve a single page of SimIpAddressInstance records from the API.
|
|
99
|
+
# Request is executed immediately.
|
|
100
|
+
# @param [String] target_url API-generated URL for the requested results page
|
|
101
|
+
# @return [Page] Page of SimIpAddressInstance
|
|
102
|
+
def get_page(target_url)
|
|
103
|
+
response = @version.domain.request(
|
|
104
|
+
'GET',
|
|
105
|
+
target_url
|
|
106
|
+
)
|
|
107
|
+
SimIpAddressPage.new(@version, response, @solution)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
##
|
|
111
|
+
# Provide a user friendly representation
|
|
112
|
+
def to_s
|
|
113
|
+
'#<Twilio.Supersim.V1.SimIpAddressList>'
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
##
|
|
118
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
119
|
+
class SimIpAddressPage < Page
|
|
120
|
+
##
|
|
121
|
+
# Initialize the SimIpAddressPage
|
|
122
|
+
# @param [Version] version Version that contains the resource
|
|
123
|
+
# @param [Response] response Response from the API
|
|
124
|
+
# @param [Hash] solution Path solution for the resource
|
|
125
|
+
# @return [SimIpAddressPage] SimIpAddressPage
|
|
126
|
+
def initialize(version, response, solution)
|
|
127
|
+
super(version, response)
|
|
128
|
+
|
|
129
|
+
# Path Solution
|
|
130
|
+
@solution = solution
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
##
|
|
134
|
+
# Build an instance of SimIpAddressInstance
|
|
135
|
+
# @param [Hash] payload Payload response from the API
|
|
136
|
+
# @return [SimIpAddressInstance] SimIpAddressInstance
|
|
137
|
+
def get_instance(payload)
|
|
138
|
+
SimIpAddressInstance.new(@version, payload, sim_sid: @solution[:sim_sid], )
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
##
|
|
142
|
+
# Provide a user friendly representation
|
|
143
|
+
def to_s
|
|
144
|
+
'<Twilio.Supersim.V1.SimIpAddressPage>'
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
##
|
|
149
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
150
|
+
class SimIpAddressInstance < InstanceResource
|
|
151
|
+
##
|
|
152
|
+
# Initialize the SimIpAddressInstance
|
|
153
|
+
# @param [Version] version Version that contains the resource
|
|
154
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
155
|
+
# @param [String] sim_sid The unique string that identifies the Sim resource.
|
|
156
|
+
# @return [SimIpAddressInstance] SimIpAddressInstance
|
|
157
|
+
def initialize(version, payload, sim_sid: nil)
|
|
158
|
+
super(version)
|
|
159
|
+
|
|
160
|
+
# Marshaled Properties
|
|
161
|
+
@properties = {
|
|
162
|
+
'ip_address' => payload['ip_address'],
|
|
163
|
+
'ip_address_version' => payload['ip_address_version'],
|
|
164
|
+
}
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
##
|
|
168
|
+
# @return [String] IP address assigned to the given Super SIM
|
|
169
|
+
def ip_address
|
|
170
|
+
@properties['ip_address']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
##
|
|
174
|
+
# @return [sim_ip_address.IpAddressVersion] IP address version
|
|
175
|
+
def ip_address_version
|
|
176
|
+
@properties['ip_address_version']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
##
|
|
180
|
+
# Provide a user friendly representation
|
|
181
|
+
def to_s
|
|
182
|
+
"<Twilio.Supersim.V1.SimIpAddressInstance>"
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
##
|
|
186
|
+
# Provide a detailed, user friendly representation
|
|
187
|
+
def inspect
|
|
188
|
+
"<Twilio.Supersim.V1.SimIpAddressInstance>"
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
end
|
|
@@ -203,6 +203,7 @@ module Twilio
|
|
|
203
203
|
|
|
204
204
|
# Dependents
|
|
205
205
|
@billing_periods = nil
|
|
206
|
+
@sim_ip_addresses = nil
|
|
206
207
|
end
|
|
207
208
|
|
|
208
209
|
##
|
|
@@ -261,6 +262,18 @@ module Twilio
|
|
|
261
262
|
@billing_periods
|
|
262
263
|
end
|
|
263
264
|
|
|
265
|
+
##
|
|
266
|
+
# Access the sim_ip_addresses
|
|
267
|
+
# @return [SimIpAddressList]
|
|
268
|
+
# @return [SimIpAddressContext]
|
|
269
|
+
def sim_ip_addresses
|
|
270
|
+
unless @sim_ip_addresses
|
|
271
|
+
@sim_ip_addresses = SimIpAddressList.new(@version, sim_sid: @solution[:sid], )
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
@sim_ip_addresses
|
|
275
|
+
end
|
|
276
|
+
|
|
264
277
|
##
|
|
265
278
|
# Provide a user friendly representation
|
|
266
279
|
def to_s
|
|
@@ -423,6 +436,13 @@ module Twilio
|
|
|
423
436
|
context.billing_periods
|
|
424
437
|
end
|
|
425
438
|
|
|
439
|
+
##
|
|
440
|
+
# Access the sim_ip_addresses
|
|
441
|
+
# @return [sim_ip_addresses] sim_ip_addresses
|
|
442
|
+
def sim_ip_addresses
|
|
443
|
+
context.sim_ip_addresses
|
|
444
|
+
end
|
|
445
|
+
|
|
426
446
|
##
|
|
427
447
|
# Provide a user friendly representation
|
|
428
448
|
def to_s
|
|
@@ -42,7 +42,7 @@ module Twilio
|
|
|
42
42
|
# @param [String] payee The payee of the associated PSD2 compliant transaction.
|
|
43
43
|
# Requires the PSD2 Service flag enabled.
|
|
44
44
|
# @return [VerificationCheckInstance] Created VerificationCheckInstance
|
|
45
|
-
def create(code:
|
|
45
|
+
def create(code: :unset, to: :unset, verification_sid: :unset, amount: :unset, payee: :unset)
|
|
46
46
|
data = Twilio::Values.of({
|
|
47
47
|
'Code' => code,
|
|
48
48
|
'To' => to,
|
|
@@ -117,6 +117,7 @@ module Twilio
|
|
|
117
117
|
'payee' => payload['payee'],
|
|
118
118
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
119
119
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
120
|
+
'sna_attempts_error_codes' => payload['sna_attempts_error_codes'],
|
|
120
121
|
}
|
|
121
122
|
end
|
|
122
123
|
|
|
@@ -186,6 +187,12 @@ module Twilio
|
|
|
186
187
|
@properties['date_updated']
|
|
187
188
|
end
|
|
188
189
|
|
|
190
|
+
##
|
|
191
|
+
# @return [Array[Hash]] List of error codes as a result of attempting a verification using the `sna` channel.
|
|
192
|
+
def sna_attempts_error_codes
|
|
193
|
+
@properties['sna_attempts_error_codes']
|
|
194
|
+
end
|
|
195
|
+
|
|
189
196
|
##
|
|
190
197
|
# Provide a user friendly representation
|
|
191
198
|
def to_s
|
|
@@ -69,13 +69,14 @@ module Twilio
|
|
|
69
69
|
# Create a new <Enqueue> element
|
|
70
70
|
# name:: Friendly name
|
|
71
71
|
# action:: Action URL
|
|
72
|
+
# max_queue_size:: Maximum size of queue
|
|
72
73
|
# method:: Action URL method
|
|
73
74
|
# wait_url:: Wait URL
|
|
74
75
|
# wait_url_method:: Wait URL method
|
|
75
76
|
# workflow_sid:: TaskRouter Workflow SID
|
|
76
77
|
# keyword_args:: additional attributes
|
|
77
|
-
def enqueue(name: nil, action: nil, method: nil, wait_url: nil, wait_url_method: nil, workflow_sid: nil, **keyword_args)
|
|
78
|
-
enqueue = Enqueue.new(name: name, action: action, method: method, wait_url: wait_url, wait_url_method: wait_url_method, workflow_sid: workflow_sid, **keyword_args)
|
|
78
|
+
def enqueue(name: nil, action: nil, max_queue_size: nil, method: nil, wait_url: nil, wait_url_method: nil, workflow_sid: nil, **keyword_args)
|
|
79
|
+
enqueue = Enqueue.new(name: name, action: action, max_queue_size: max_queue_size, method: method, wait_url: wait_url, wait_url_method: wait_url_method, workflow_sid: workflow_sid, **keyword_args)
|
|
79
80
|
|
|
80
81
|
yield(enqueue) if block_given?
|
|
81
82
|
append(enqueue)
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twilio-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.70.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Twilio API Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-07-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jwt
|
|
@@ -433,8 +433,8 @@ files:
|
|
|
433
433
|
- lib/twilio-ruby/rest/frontline_api/v1/user.rb
|
|
434
434
|
- lib/twilio-ruby/rest/insights.rb
|
|
435
435
|
- lib/twilio-ruby/rest/insights/v1.rb
|
|
436
|
-
- lib/twilio-ruby/rest/insights/v1/annotation.rb
|
|
437
436
|
- lib/twilio-ruby/rest/insights/v1/call.rb
|
|
437
|
+
- lib/twilio-ruby/rest/insights/v1/call/annotation.rb
|
|
438
438
|
- lib/twilio-ruby/rest/insights/v1/call/event.rb
|
|
439
439
|
- lib/twilio-ruby/rest/insights/v1/call/metric.rb
|
|
440
440
|
- lib/twilio-ruby/rest/insights/v1/call/summary.rb
|
|
@@ -641,6 +641,7 @@ files:
|
|
|
641
641
|
- lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb
|
|
642
642
|
- lib/twilio-ruby/rest/supersim/v1/sim.rb
|
|
643
643
|
- lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb
|
|
644
|
+
- lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb
|
|
644
645
|
- lib/twilio-ruby/rest/supersim/v1/sms_command.rb
|
|
645
646
|
- lib/twilio-ruby/rest/supersim/v1/usage_record.rb
|
|
646
647
|
- lib/twilio-ruby/rest/sync.rb
|
|
@@ -1,271 +0,0 @@
|
|
|
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 AnnotationList < ListResource
|
|
14
|
-
##
|
|
15
|
-
# Initialize the AnnotationList
|
|
16
|
-
# @param [Version] version Version that contains the resource
|
|
17
|
-
# @return [AnnotationList] AnnotationList
|
|
18
|
-
def initialize(version)
|
|
19
|
-
super(version)
|
|
20
|
-
|
|
21
|
-
# Path Solution
|
|
22
|
-
@solution = {}
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
##
|
|
26
|
-
# Provide a user friendly representation
|
|
27
|
-
def to_s
|
|
28
|
-
'#<Twilio.Insights.V1.AnnotationList>'
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
class AnnotationPage < Page
|
|
33
|
-
##
|
|
34
|
-
# Initialize the AnnotationPage
|
|
35
|
-
# @param [Version] version Version that contains the resource
|
|
36
|
-
# @param [Response] response Response from the API
|
|
37
|
-
# @param [Hash] solution Path solution for the resource
|
|
38
|
-
# @return [AnnotationPage] AnnotationPage
|
|
39
|
-
def initialize(version, response, solution)
|
|
40
|
-
super(version, response)
|
|
41
|
-
|
|
42
|
-
# Path Solution
|
|
43
|
-
@solution = solution
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
##
|
|
47
|
-
# Build an instance of AnnotationInstance
|
|
48
|
-
# @param [Hash] payload Payload response from the API
|
|
49
|
-
# @return [AnnotationInstance] AnnotationInstance
|
|
50
|
-
def get_instance(payload)
|
|
51
|
-
AnnotationInstance.new(@version, payload, )
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
##
|
|
55
|
-
# Provide a user friendly representation
|
|
56
|
-
def to_s
|
|
57
|
-
'<Twilio.Insights.V1.AnnotationPage>'
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
class AnnotationContext < InstanceContext
|
|
62
|
-
##
|
|
63
|
-
# Initialize the AnnotationContext
|
|
64
|
-
# @param [Version] version Version that contains the resource
|
|
65
|
-
# @param [String] call_sid The call_sid
|
|
66
|
-
# @return [AnnotationContext] AnnotationContext
|
|
67
|
-
def initialize(version, call_sid)
|
|
68
|
-
super(version)
|
|
69
|
-
|
|
70
|
-
# Path Solution
|
|
71
|
-
@solution = {call_sid: call_sid, }
|
|
72
|
-
@uri = "/Voice/#{@solution[:call_sid]}/Annotation"
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
##
|
|
76
|
-
# Update the AnnotationInstance
|
|
77
|
-
# @param [annotation.AnsweredBy] answered_by The answered_by
|
|
78
|
-
# @param [annotation.ConnectivityIssue] connectivity_issue The connectivity_issue
|
|
79
|
-
# @param [String] quality_issues The quality_issues
|
|
80
|
-
# @param [Boolean] spam The spam
|
|
81
|
-
# @param [String] call_score The call_score
|
|
82
|
-
# @param [String] comment The comment
|
|
83
|
-
# @param [String] incident The incident
|
|
84
|
-
# @return [AnnotationInstance] Updated AnnotationInstance
|
|
85
|
-
def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
|
|
86
|
-
data = Twilio::Values.of({
|
|
87
|
-
'AnsweredBy' => answered_by,
|
|
88
|
-
'ConnectivityIssue' => connectivity_issue,
|
|
89
|
-
'QualityIssues' => quality_issues,
|
|
90
|
-
'Spam' => spam,
|
|
91
|
-
'CallScore' => call_score,
|
|
92
|
-
'Comment' => comment,
|
|
93
|
-
'Incident' => incident,
|
|
94
|
-
})
|
|
95
|
-
|
|
96
|
-
payload = @version.update('POST', @uri, data: data)
|
|
97
|
-
|
|
98
|
-
AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
##
|
|
102
|
-
# Fetch the AnnotationInstance
|
|
103
|
-
# @return [AnnotationInstance] Fetched AnnotationInstance
|
|
104
|
-
def fetch
|
|
105
|
-
payload = @version.fetch('GET', @uri)
|
|
106
|
-
|
|
107
|
-
AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
##
|
|
111
|
-
# Provide a user friendly representation
|
|
112
|
-
def to_s
|
|
113
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
114
|
-
"#<Twilio.Insights.V1.AnnotationContext #{context}>"
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
##
|
|
118
|
-
# Provide a detailed, user friendly representation
|
|
119
|
-
def inspect
|
|
120
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
121
|
-
"#<Twilio.Insights.V1.AnnotationContext #{context}>"
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
class AnnotationInstance < InstanceResource
|
|
126
|
-
##
|
|
127
|
-
# Initialize the AnnotationInstance
|
|
128
|
-
# @param [Version] version Version that contains the resource
|
|
129
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
130
|
-
# @param [String] call_sid The call_sid
|
|
131
|
-
# @return [AnnotationInstance] AnnotationInstance
|
|
132
|
-
def initialize(version, payload, call_sid: nil)
|
|
133
|
-
super(version)
|
|
134
|
-
|
|
135
|
-
# Marshaled Properties
|
|
136
|
-
@properties = {
|
|
137
|
-
'call_sid' => payload['call_sid'],
|
|
138
|
-
'account_sid' => payload['account_sid'],
|
|
139
|
-
'answered_by' => payload['answered_by'],
|
|
140
|
-
'connectivity_issue' => payload['connectivity_issue'],
|
|
141
|
-
'quality_issues' => payload['quality_issues'],
|
|
142
|
-
'spam' => payload['spam'],
|
|
143
|
-
'call_score' => payload['call_score'] == nil ? payload['call_score'] : payload['call_score'].to_i,
|
|
144
|
-
'comment' => payload['comment'],
|
|
145
|
-
'incident' => payload['incident'],
|
|
146
|
-
'url' => payload['url'],
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
# Context
|
|
150
|
-
@instance_context = nil
|
|
151
|
-
@params = {'call_sid' => call_sid || @properties['call_sid'], }
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
##
|
|
155
|
-
# Generate an instance context for the instance, the context is capable of
|
|
156
|
-
# performing various actions. All instance actions are proxied to the context
|
|
157
|
-
# @return [AnnotationContext] AnnotationContext for this AnnotationInstance
|
|
158
|
-
def context
|
|
159
|
-
unless @instance_context
|
|
160
|
-
@instance_context = AnnotationContext.new(@version, @params['call_sid'], )
|
|
161
|
-
end
|
|
162
|
-
@instance_context
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
##
|
|
166
|
-
# @return [String] The call_sid
|
|
167
|
-
def call_sid
|
|
168
|
-
@properties['call_sid']
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
##
|
|
172
|
-
# @return [String] The account_sid
|
|
173
|
-
def account_sid
|
|
174
|
-
@properties['account_sid']
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
##
|
|
178
|
-
# @return [annotation.AnsweredBy] The answered_by
|
|
179
|
-
def answered_by
|
|
180
|
-
@properties['answered_by']
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
##
|
|
184
|
-
# @return [annotation.ConnectivityIssue] The connectivity_issue
|
|
185
|
-
def connectivity_issue
|
|
186
|
-
@properties['connectivity_issue']
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
##
|
|
190
|
-
# @return [Array[String]] The quality_issues
|
|
191
|
-
def quality_issues
|
|
192
|
-
@properties['quality_issues']
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
##
|
|
196
|
-
# @return [Boolean] The spam
|
|
197
|
-
def spam
|
|
198
|
-
@properties['spam']
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
##
|
|
202
|
-
# @return [String] The call_score
|
|
203
|
-
def call_score
|
|
204
|
-
@properties['call_score']
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
##
|
|
208
|
-
# @return [String] The comment
|
|
209
|
-
def comment
|
|
210
|
-
@properties['comment']
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
##
|
|
214
|
-
# @return [String] The incident
|
|
215
|
-
def incident
|
|
216
|
-
@properties['incident']
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
##
|
|
220
|
-
# @return [String] The url
|
|
221
|
-
def url
|
|
222
|
-
@properties['url']
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
##
|
|
226
|
-
# Update the AnnotationInstance
|
|
227
|
-
# @param [annotation.AnsweredBy] answered_by The answered_by
|
|
228
|
-
# @param [annotation.ConnectivityIssue] connectivity_issue The connectivity_issue
|
|
229
|
-
# @param [String] quality_issues The quality_issues
|
|
230
|
-
# @param [Boolean] spam The spam
|
|
231
|
-
# @param [String] call_score The call_score
|
|
232
|
-
# @param [String] comment The comment
|
|
233
|
-
# @param [String] incident The incident
|
|
234
|
-
# @return [AnnotationInstance] Updated AnnotationInstance
|
|
235
|
-
def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
|
|
236
|
-
context.update(
|
|
237
|
-
answered_by: answered_by,
|
|
238
|
-
connectivity_issue: connectivity_issue,
|
|
239
|
-
quality_issues: quality_issues,
|
|
240
|
-
spam: spam,
|
|
241
|
-
call_score: call_score,
|
|
242
|
-
comment: comment,
|
|
243
|
-
incident: incident,
|
|
244
|
-
)
|
|
245
|
-
end
|
|
246
|
-
|
|
247
|
-
##
|
|
248
|
-
# Fetch the AnnotationInstance
|
|
249
|
-
# @return [AnnotationInstance] Fetched AnnotationInstance
|
|
250
|
-
def fetch
|
|
251
|
-
context.fetch
|
|
252
|
-
end
|
|
253
|
-
|
|
254
|
-
##
|
|
255
|
-
# Provide a user friendly representation
|
|
256
|
-
def to_s
|
|
257
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
258
|
-
"<Twilio.Insights.V1.AnnotationInstance #{values}>"
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
##
|
|
262
|
-
# Provide a detailed, user friendly representation
|
|
263
|
-
def inspect
|
|
264
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
265
|
-
"<Twilio.Insights.V1.AnnotationInstance #{values}>"
|
|
266
|
-
end
|
|
267
|
-
end
|
|
268
|
-
end
|
|
269
|
-
end
|
|
270
|
-
end
|
|
271
|
-
end
|