twilio-ruby 5.67.2 → 5.69.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.
@@ -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)
@@ -194,7 +195,7 @@ module Twilio
194
195
  # message:: Message to say
195
196
  # voice:: Voice to use
196
197
  # loop:: Times to loop message
197
- # language:: Message langauge
198
+ # language:: Message language
198
199
  # keyword_args:: additional attributes
199
200
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
200
201
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -469,7 +470,7 @@ module Twilio
469
470
  # message:: Message to say
470
471
  # voice:: Voice to use
471
472
  # loop:: Times to loop message
472
- # language:: Message langauge
473
+ # language:: Message language
473
474
  # keyword_args:: additional attributes
474
475
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
475
476
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -1435,7 +1436,7 @@ module Twilio
1435
1436
  # message:: Message to say
1436
1437
  # voice:: Voice to use
1437
1438
  # loop:: Times to loop message
1438
- # language:: Message langauge
1439
+ # language:: Message language
1439
1440
  # keyword_args:: additional attributes
1440
1441
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
1441
1442
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -1743,9 +1744,43 @@ module Twilio
1743
1744
  # language:: Language to be used by Dialogflow to transcribe speech
1744
1745
  # sentiment_analysis:: Whether sentiment analysis needs to be enabled or not
1745
1746
  # status_callback:: URL to post status callbacks from Twilio
1747
+ # status_callback_method:: HTTP method to use when requesting the status callback URL
1746
1748
  # keyword_args:: additional attributes
1747
- def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, **keyword_args)
1748
- append(VirtualAgent.new(connector_name: connector_name, language: language, sentiment_analysis: sentiment_analysis, status_callback: status_callback, **keyword_args))
1749
+ def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
1750
+ virtual_agent = VirtualAgent.new(connector_name: connector_name, language: language, sentiment_analysis: sentiment_analysis, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args)
1751
+
1752
+ yield(virtual_agent) if block_given?
1753
+ append(virtual_agent)
1754
+ end
1755
+
1756
+ ##
1757
+ # Create a new <Conversation> element
1758
+ # service_instance_sid:: Service instance Sid
1759
+ # inbound_autocreation:: Inbound autocreation
1760
+ # routing_assignment_timeout:: Routing assignment timeout
1761
+ # inbound_timeout:: Inbound timeout
1762
+ # record:: Record
1763
+ # trim:: Trim
1764
+ # recording_status_callback:: Recording status callback URL
1765
+ # recording_status_callback_method:: Recording status callback URL method
1766
+ # recording_status_callback_event:: Recording status callback events
1767
+ # status_callback:: Status callback URL
1768
+ # status_callback_method:: Status callback URL method
1769
+ # status_callback_event:: Events to call status callback URL
1770
+ # keyword_args:: additional attributes
1771
+ def conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args)
1772
+ append(Conversation.new(service_instance_sid: service_instance_sid, inbound_autocreation: inbound_autocreation, routing_assignment_timeout: routing_assignment_timeout, inbound_timeout: inbound_timeout, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, status_callback_event: status_callback_event, **keyword_args))
1773
+ end
1774
+ end
1775
+
1776
+ ##
1777
+ # <Conversation> TwiML Noun
1778
+ class Conversation < TwiML
1779
+ def initialize(**keyword_args)
1780
+ super(**keyword_args)
1781
+ @name = 'Conversation'
1782
+
1783
+ yield(self) if block_given?
1749
1784
  end
1750
1785
  end
1751
1786
 
@@ -1758,6 +1793,35 @@ module Twilio
1758
1793
 
1759
1794
  yield(self) if block_given?
1760
1795
  end
1796
+
1797
+ ##
1798
+ # Create a new <Config> element
1799
+ # name:: The name of the custom config
1800
+ # value:: The value of the custom config
1801
+ # keyword_args:: additional attributes
1802
+ def config(name: nil, value: nil, **keyword_args)
1803
+ append(Config.new(name: name, value: value, **keyword_args))
1804
+ end
1805
+
1806
+ ##
1807
+ # Create a new <Parameter> element
1808
+ # name:: The name of the custom parameter
1809
+ # value:: The value of the custom parameter
1810
+ # keyword_args:: additional attributes
1811
+ def parameter(name: nil, value: nil, **keyword_args)
1812
+ append(Parameter.new(name: name, value: value, **keyword_args))
1813
+ end
1814
+ end
1815
+
1816
+ ##
1817
+ # <Config> TwiML Noun
1818
+ class Config < TwiML
1819
+ def initialize(**keyword_args)
1820
+ super(**keyword_args)
1821
+ @name = 'Config'
1822
+
1823
+ yield(self) if block_given?
1824
+ end
1761
1825
  end
1762
1826
 
1763
1827
  ##
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.67.2'
2
+ VERSION = '5.69.0'
3
3
  end
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.67.2
4
+ version: 5.69.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-06-01 00:00:00.000000000 Z
11
+ date: 2022-07-13 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
@@ -471,6 +471,8 @@ files:
471
471
  - lib/twilio-ruby/rest/lookups.rb
472
472
  - lib/twilio-ruby/rest/lookups/v1.rb
473
473
  - lib/twilio-ruby/rest/lookups/v1/phone_number.rb
474
+ - lib/twilio-ruby/rest/lookups/v2.rb
475
+ - lib/twilio-ruby/rest/lookups/v2/phone_number.rb
474
476
  - lib/twilio-ruby/rest/media.rb
475
477
  - lib/twilio-ruby/rest/media/v1.rb
476
478
  - lib/twilio-ruby/rest/media/v1/media_processor.rb
@@ -639,6 +641,7 @@ files:
639
641
  - lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb
640
642
  - lib/twilio-ruby/rest/supersim/v1/sim.rb
641
643
  - lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb
644
+ - lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb
642
645
  - lib/twilio-ruby/rest/supersim/v1/sms_command.rb
643
646
  - lib/twilio-ruby/rest/supersim/v1/usage_record.rb
644
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