twilio-ruby 5.58.3 → 5.59.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.md +36 -0
- data/README.md +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +36 -36
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +40 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -5
- data/lib/twilio-ruby/rest/verify/v2/{verification_template.rb → template.rb} +25 -25
- data/lib/twilio-ruby/rest/verify/v2.rb +4 -4
- data/lib/twilio-ruby/rest/verify.rb +3 -3
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +7 -4
@@ -0,0 +1,188 @@
|
|
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 Numbers < Domain
|
12
|
+
class V2 < Version
|
13
|
+
class RegulatoryComplianceList < ListResource
|
14
|
+
class BundleContext < InstanceContext
|
15
|
+
##
|
16
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
17
|
+
class ReplaceItemsList < ListResource
|
18
|
+
##
|
19
|
+
# Initialize the ReplaceItemsList
|
20
|
+
# @param [Version] version Version that contains the resource
|
21
|
+
# @param [String] bundle_sid The unique string that we created to identify the
|
22
|
+
# Bundle resource.
|
23
|
+
# @return [ReplaceItemsList] ReplaceItemsList
|
24
|
+
def initialize(version, bundle_sid: nil)
|
25
|
+
super(version)
|
26
|
+
|
27
|
+
# Path Solution
|
28
|
+
@solution = {bundle_sid: bundle_sid}
|
29
|
+
@uri = "/RegulatoryCompliance/Bundles/#{@solution[:bundle_sid]}/ReplaceItems"
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
33
|
+
# Create the ReplaceItemsInstance
|
34
|
+
# @param [String] from_bundle_sid The source bundle sid to copy the item
|
35
|
+
# assignments from.
|
36
|
+
# @return [ReplaceItemsInstance] Created ReplaceItemsInstance
|
37
|
+
def create(from_bundle_sid: nil)
|
38
|
+
data = Twilio::Values.of({'FromBundleSid' => from_bundle_sid, })
|
39
|
+
|
40
|
+
payload = @version.create('POST', @uri, data: data)
|
41
|
+
|
42
|
+
ReplaceItemsInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], )
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# Provide a user friendly representation
|
47
|
+
def to_s
|
48
|
+
'#<Twilio.Numbers.V2.ReplaceItemsList>'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
54
|
+
class ReplaceItemsPage < Page
|
55
|
+
##
|
56
|
+
# Initialize the ReplaceItemsPage
|
57
|
+
# @param [Version] version Version that contains the resource
|
58
|
+
# @param [Response] response Response from the API
|
59
|
+
# @param [Hash] solution Path solution for the resource
|
60
|
+
# @return [ReplaceItemsPage] ReplaceItemsPage
|
61
|
+
def initialize(version, response, solution)
|
62
|
+
super(version, response)
|
63
|
+
|
64
|
+
# Path Solution
|
65
|
+
@solution = solution
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# Build an instance of ReplaceItemsInstance
|
70
|
+
# @param [Hash] payload Payload response from the API
|
71
|
+
# @return [ReplaceItemsInstance] ReplaceItemsInstance
|
72
|
+
def get_instance(payload)
|
73
|
+
ReplaceItemsInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], )
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Provide a user friendly representation
|
78
|
+
def to_s
|
79
|
+
'<Twilio.Numbers.V2.ReplaceItemsPage>'
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
85
|
+
class ReplaceItemsInstance < InstanceResource
|
86
|
+
##
|
87
|
+
# Initialize the ReplaceItemsInstance
|
88
|
+
# @param [Version] version Version that contains the resource
|
89
|
+
# @param [Hash] payload payload that contains response from Twilio
|
90
|
+
# @param [String] bundle_sid The unique string that we created to identify the
|
91
|
+
# Bundle resource.
|
92
|
+
# @return [ReplaceItemsInstance] ReplaceItemsInstance
|
93
|
+
def initialize(version, payload, bundle_sid: nil)
|
94
|
+
super(version)
|
95
|
+
|
96
|
+
# Marshaled Properties
|
97
|
+
@properties = {
|
98
|
+
'sid' => payload['sid'],
|
99
|
+
'account_sid' => payload['account_sid'],
|
100
|
+
'regulation_sid' => payload['regulation_sid'],
|
101
|
+
'friendly_name' => payload['friendly_name'],
|
102
|
+
'status' => payload['status'],
|
103
|
+
'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
|
104
|
+
'email' => payload['email'],
|
105
|
+
'status_callback' => payload['status_callback'],
|
106
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
107
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
108
|
+
}
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# @return [String] The unique string that identifies the resource
|
113
|
+
def sid
|
114
|
+
@properties['sid']
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# @return [String] The SID of the Account that created the resource
|
119
|
+
def account_sid
|
120
|
+
@properties['account_sid']
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# @return [String] The unique string of a regulation
|
125
|
+
def regulation_sid
|
126
|
+
@properties['regulation_sid']
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# @return [String] The string that you assigned to describe the resource
|
131
|
+
def friendly_name
|
132
|
+
@properties['friendly_name']
|
133
|
+
end
|
134
|
+
|
135
|
+
##
|
136
|
+
# @return [replace_items.Status] The verification status of the Bundle resource
|
137
|
+
def status
|
138
|
+
@properties['status']
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource will be valid until
|
143
|
+
def valid_until
|
144
|
+
@properties['valid_until']
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# @return [String] The email address
|
149
|
+
def email
|
150
|
+
@properties['email']
|
151
|
+
end
|
152
|
+
|
153
|
+
##
|
154
|
+
# @return [String] The URL we call to inform your application of status changes
|
155
|
+
def status_callback
|
156
|
+
@properties['status_callback']
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
161
|
+
def date_created
|
162
|
+
@properties['date_created']
|
163
|
+
end
|
164
|
+
|
165
|
+
##
|
166
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
167
|
+
def date_updated
|
168
|
+
@properties['date_updated']
|
169
|
+
end
|
170
|
+
|
171
|
+
##
|
172
|
+
# Provide a user friendly representation
|
173
|
+
def to_s
|
174
|
+
"<Twilio.Numbers.V2.ReplaceItemsInstance>"
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# Provide a detailed, user friendly representation
|
179
|
+
def inspect
|
180
|
+
"<Twilio.Numbers.V2.ReplaceItemsInstance>"
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
@@ -242,6 +242,8 @@ module Twilio
|
|
242
242
|
# Dependents
|
243
243
|
@evaluations = nil
|
244
244
|
@item_assignments = nil
|
245
|
+
@bundle_copies = nil
|
246
|
+
@replace_items = nil
|
245
247
|
end
|
246
248
|
|
247
249
|
##
|
@@ -319,6 +321,30 @@ module Twilio
|
|
319
321
|
@item_assignments
|
320
322
|
end
|
321
323
|
|
324
|
+
##
|
325
|
+
# Access the bundle_copies
|
326
|
+
# @return [BundleCopyList]
|
327
|
+
# @return [BundleCopyContext]
|
328
|
+
def bundle_copies
|
329
|
+
unless @bundle_copies
|
330
|
+
@bundle_copies = BundleCopyList.new(@version, bundle_sid: @solution[:sid], )
|
331
|
+
end
|
332
|
+
|
333
|
+
@bundle_copies
|
334
|
+
end
|
335
|
+
|
336
|
+
##
|
337
|
+
# Access the replace_items
|
338
|
+
# @return [ReplaceItemsList]
|
339
|
+
# @return [ReplaceItemsContext]
|
340
|
+
def replace_items
|
341
|
+
unless @replace_items
|
342
|
+
@replace_items = ReplaceItemsList.new(@version, bundle_sid: @solution[:sid], )
|
343
|
+
end
|
344
|
+
|
345
|
+
@replace_items
|
346
|
+
end
|
347
|
+
|
322
348
|
##
|
323
349
|
# Provide a user friendly representation
|
324
350
|
def to_s
|
@@ -496,6 +522,20 @@ module Twilio
|
|
496
522
|
context.item_assignments
|
497
523
|
end
|
498
524
|
|
525
|
+
##
|
526
|
+
# Access the bundle_copies
|
527
|
+
# @return [bundle_copies] bundle_copies
|
528
|
+
def bundle_copies
|
529
|
+
context.bundle_copies
|
530
|
+
end
|
531
|
+
|
532
|
+
##
|
533
|
+
# Access the replace_items
|
534
|
+
# @return [replace_items] replace_items
|
535
|
+
def replace_items
|
536
|
+
context.replace_items
|
537
|
+
end
|
538
|
+
|
499
539
|
##
|
500
540
|
# Provide a user friendly representation
|
501
541
|
def to_s
|
@@ -369,7 +369,7 @@ module Twilio
|
|
369
369
|
end
|
370
370
|
|
371
371
|
##
|
372
|
-
# @return [String] The
|
372
|
+
# @return [String] The domain name for all Functions and Assets deployed in the Environment
|
373
373
|
def domain_name
|
374
374
|
@properties['domain_name']
|
375
375
|
end
|
@@ -335,6 +335,7 @@ module Twilio
|
|
335
335
|
'unique_name' => payload['unique_name'],
|
336
336
|
'include_credentials' => payload['include_credentials'],
|
337
337
|
'ui_editable' => payload['ui_editable'],
|
338
|
+
'domain_base' => payload['domain_base'],
|
338
339
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
339
340
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
340
341
|
'url' => payload['url'],
|
@@ -393,6 +394,12 @@ module Twilio
|
|
393
394
|
@properties['ui_editable']
|
394
395
|
end
|
395
396
|
|
397
|
+
##
|
398
|
+
# @return [String] The base domain name for this Service, which is a combination of the unique name and a randomly generated string
|
399
|
+
def domain_base
|
400
|
+
@properties['domain_base']
|
401
|
+
end
|
402
|
+
|
396
403
|
##
|
397
404
|
# @return [Time] The ISO 8601 date and time in GMT when the Service resource was created
|
398
405
|
def date_created
|
@@ -322,8 +322,9 @@ module Twilio
|
|
322
322
|
# when the customer leaves.
|
323
323
|
# @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
|
324
324
|
# when the customer joins.
|
325
|
+
# @param [String] if_match The If-Match HTTP request header
|
325
326
|
# @return [ReservationInstance] Updated ReservationInstance
|
326
|
-
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, supervisor_mode: :unset, supervisor: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset)
|
327
|
+
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, supervisor_mode: :unset, supervisor: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset, if_match: :unset)
|
327
328
|
data = Twilio::Values.of({
|
328
329
|
'ReservationStatus' => reservation_status,
|
329
330
|
'WorkerActivitySid' => worker_activity_sid,
|
@@ -379,8 +380,9 @@ module Twilio
|
|
379
380
|
'EndConferenceOnCustomerExit' => end_conference_on_customer_exit,
|
380
381
|
'BeepOnCustomerEntrance' => beep_on_customer_entrance,
|
381
382
|
})
|
383
|
+
headers = Twilio::Values.of({'If-Match' => if_match, })
|
382
384
|
|
383
|
-
payload = @version.update('POST', @uri, data: data)
|
385
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
384
386
|
|
385
387
|
ReservationInstance.new(
|
386
388
|
@version,
|
@@ -662,8 +664,9 @@ module Twilio
|
|
662
664
|
# when the customer leaves.
|
663
665
|
# @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
|
664
666
|
# when the customer joins.
|
667
|
+
# @param [String] if_match The If-Match HTTP request header
|
665
668
|
# @return [ReservationInstance] Updated ReservationInstance
|
666
|
-
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, supervisor_mode: :unset, supervisor: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset)
|
669
|
+
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, supervisor_mode: :unset, supervisor: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset, if_match: :unset)
|
667
670
|
context.update(
|
668
671
|
reservation_status: reservation_status,
|
669
672
|
worker_activity_sid: worker_activity_sid,
|
@@ -718,6 +721,7 @@ module Twilio
|
|
718
721
|
supervisor: supervisor,
|
719
722
|
end_conference_on_customer_exit: end_conference_on_customer_exit,
|
720
723
|
beep_on_customer_entrance: beep_on_customer_entrance,
|
724
|
+
if_match: if_match,
|
721
725
|
)
|
722
726
|
end
|
723
727
|
|
@@ -322,8 +322,9 @@ module Twilio
|
|
322
322
|
# when the customer leaves.
|
323
323
|
# @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
|
324
324
|
# when the customer joins.
|
325
|
+
# @param [String] if_match The If-Match HTTP request header
|
325
326
|
# @return [ReservationInstance] Updated ReservationInstance
|
326
|
-
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset)
|
327
|
+
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset, if_match: :unset)
|
327
328
|
data = Twilio::Values.of({
|
328
329
|
'ReservationStatus' => reservation_status,
|
329
330
|
'WorkerActivitySid' => worker_activity_sid,
|
@@ -377,8 +378,9 @@ module Twilio
|
|
377
378
|
'EndConferenceOnCustomerExit' => end_conference_on_customer_exit,
|
378
379
|
'BeepOnCustomerEntrance' => beep_on_customer_entrance,
|
379
380
|
})
|
381
|
+
headers = Twilio::Values.of({'If-Match' => if_match, })
|
380
382
|
|
381
|
-
payload = @version.update('POST', @uri, data: data)
|
383
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
382
384
|
|
383
385
|
ReservationInstance.new(
|
384
386
|
@version,
|
@@ -660,8 +662,9 @@ module Twilio
|
|
660
662
|
# when the customer leaves.
|
661
663
|
# @param [Boolean] beep_on_customer_entrance Whether to play a notification beep
|
662
664
|
# when the customer joins.
|
665
|
+
# @param [String] if_match The If-Match HTTP request header
|
663
666
|
# @return [ReservationInstance] Updated ReservationInstance
|
664
|
-
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset)
|
667
|
+
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, end_conference_on_customer_exit: :unset, beep_on_customer_entrance: :unset, if_match: :unset)
|
665
668
|
context.update(
|
666
669
|
reservation_status: reservation_status,
|
667
670
|
worker_activity_sid: worker_activity_sid,
|
@@ -714,6 +717,7 @@ module Twilio
|
|
714
717
|
post_work_activity_sid: post_work_activity_sid,
|
715
718
|
end_conference_on_customer_exit: end_conference_on_customer_exit,
|
716
719
|
beep_on_customer_entrance: beep_on_customer_entrance,
|
720
|
+
if_match: if_match,
|
717
721
|
)
|
718
722
|
end
|
719
723
|
|
@@ -299,18 +299,22 @@ module Twilio
|
|
299
299
|
# Worker. Defaults to {}.
|
300
300
|
# @param [String] friendly_name A descriptive string that you create to describe
|
301
301
|
# the Worker. It can be up to 64 characters long.
|
302
|
-
# @param [Boolean] reject_pending_reservations Whether to reject
|
303
|
-
# reservations.
|
302
|
+
# @param [Boolean] reject_pending_reservations Whether to reject the Worker's
|
303
|
+
# pending reservations. This option is only valid if the Worker's new
|
304
|
+
# {Activity}[https://www.twilio.com/docs/taskrouter/api/activity] resource has its
|
305
|
+
# `availability` property set to `False`.
|
306
|
+
# @param [String] if_match The If-Match HTTP request header
|
304
307
|
# @return [WorkerInstance] Updated WorkerInstance
|
305
|
-
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset)
|
308
|
+
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset, if_match: :unset)
|
306
309
|
data = Twilio::Values.of({
|
307
310
|
'ActivitySid' => activity_sid,
|
308
311
|
'Attributes' => attributes,
|
309
312
|
'FriendlyName' => friendly_name,
|
310
313
|
'RejectPendingReservations' => reject_pending_reservations,
|
311
314
|
})
|
315
|
+
headers = Twilio::Values.of({'If-Match' => if_match, })
|
312
316
|
|
313
|
-
payload = @version.update('POST', @uri, data: data)
|
317
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
314
318
|
|
315
319
|
WorkerInstance.new(
|
316
320
|
@version,
|
@@ -322,9 +326,12 @@ module Twilio
|
|
322
326
|
|
323
327
|
##
|
324
328
|
# Delete the WorkerInstance
|
329
|
+
# @param [String] if_match The If-Match HTTP request header
|
325
330
|
# @return [Boolean] true if delete succeeds, false otherwise
|
326
|
-
def delete
|
327
|
-
|
331
|
+
def delete(if_match: :unset)
|
332
|
+
headers = Twilio::Values.of({'If-Match' => if_match, })
|
333
|
+
|
334
|
+
@version.delete('DELETE', @uri, headers: headers)
|
328
335
|
end
|
329
336
|
|
330
337
|
##
|
@@ -551,23 +558,28 @@ module Twilio
|
|
551
558
|
# Worker. Defaults to {}.
|
552
559
|
# @param [String] friendly_name A descriptive string that you create to describe
|
553
560
|
# the Worker. It can be up to 64 characters long.
|
554
|
-
# @param [Boolean] reject_pending_reservations Whether to reject
|
555
|
-
# reservations.
|
561
|
+
# @param [Boolean] reject_pending_reservations Whether to reject the Worker's
|
562
|
+
# pending reservations. This option is only valid if the Worker's new
|
563
|
+
# {Activity}[https://www.twilio.com/docs/taskrouter/api/activity] resource has its
|
564
|
+
# `availability` property set to `False`.
|
565
|
+
# @param [String] if_match The If-Match HTTP request header
|
556
566
|
# @return [WorkerInstance] Updated WorkerInstance
|
557
|
-
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset)
|
567
|
+
def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset, reject_pending_reservations: :unset, if_match: :unset)
|
558
568
|
context.update(
|
559
569
|
activity_sid: activity_sid,
|
560
570
|
attributes: attributes,
|
561
571
|
friendly_name: friendly_name,
|
562
572
|
reject_pending_reservations: reject_pending_reservations,
|
573
|
+
if_match: if_match,
|
563
574
|
)
|
564
575
|
end
|
565
576
|
|
566
577
|
##
|
567
578
|
# Delete the WorkerInstance
|
579
|
+
# @param [String] if_match The If-Match HTTP request header
|
568
580
|
# @return [Boolean] true if delete succeeds, false otherwise
|
569
|
-
def delete
|
570
|
-
context.delete
|
581
|
+
def delete(if_match: :unset)
|
582
|
+
context.delete(if_match: if_match, )
|
571
583
|
end
|
572
584
|
|
573
585
|
##
|
@@ -54,8 +54,10 @@ module Twilio
|
|
54
54
|
# the United States and Canada automatically perform a CNAM Lookup and display
|
55
55
|
# Caller ID data on your phone. See {CNAM
|
56
56
|
# Lookups}[https://www.twilio.com/docs/sip-trunking#CNAM] for more information.
|
57
|
+
# @param [trunk.TransferCallerId] transfer_caller_id Caller Id for transfer
|
58
|
+
# target. Can be: `from-transferee` (default) or `from-transferor`.
|
57
59
|
# @return [TrunkInstance] Created TrunkInstance
|
58
|
-
def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
60
|
+
def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset, transfer_caller_id: :unset)
|
59
61
|
data = Twilio::Values.of({
|
60
62
|
'FriendlyName' => friendly_name,
|
61
63
|
'DomainName' => domain_name,
|
@@ -64,6 +66,7 @@ module Twilio
|
|
64
66
|
'TransferMode' => transfer_mode,
|
65
67
|
'Secure' => secure,
|
66
68
|
'CnamLookupEnabled' => cnam_lookup_enabled,
|
69
|
+
'TransferCallerId' => transfer_caller_id,
|
67
70
|
})
|
68
71
|
|
69
72
|
payload = @version.create('POST', @uri, data: data)
|
@@ -256,8 +259,10 @@ module Twilio
|
|
256
259
|
# the United States and Canada automatically perform a CNAM Lookup and display
|
257
260
|
# Caller ID data on your phone. See {CNAM
|
258
261
|
# Lookups}[https://www.twilio.com/docs/sip-trunking#CNAM] for more information.
|
262
|
+
# @param [trunk.TransferCallerId] transfer_caller_id Caller Id for transfer
|
263
|
+
# target. Can be: `from-transferee` (default) or `from-transferor`.
|
259
264
|
# @return [TrunkInstance] Updated TrunkInstance
|
260
|
-
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
265
|
+
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset, transfer_caller_id: :unset)
|
261
266
|
data = Twilio::Values.of({
|
262
267
|
'FriendlyName' => friendly_name,
|
263
268
|
'DomainName' => domain_name,
|
@@ -266,6 +271,7 @@ module Twilio
|
|
266
271
|
'TransferMode' => transfer_mode,
|
267
272
|
'Secure' => secure,
|
268
273
|
'CnamLookupEnabled' => cnam_lookup_enabled,
|
274
|
+
'TransferCallerId' => transfer_caller_id,
|
269
275
|
})
|
270
276
|
|
271
277
|
payload = @version.update('POST', @uri, data: data)
|
@@ -389,6 +395,7 @@ module Twilio
|
|
389
395
|
'secure' => payload['secure'],
|
390
396
|
'recording' => payload['recording'],
|
391
397
|
'transfer_mode' => payload['transfer_mode'],
|
398
|
+
'transfer_caller_id' => payload['transfer_caller_id'],
|
392
399
|
'cnam_lookup_enabled' => payload['cnam_lookup_enabled'],
|
393
400
|
'auth_type' => payload['auth_type'],
|
394
401
|
'auth_type_set' => payload['auth_type_set'],
|
@@ -463,6 +470,12 @@ module Twilio
|
|
463
470
|
@properties['transfer_mode']
|
464
471
|
end
|
465
472
|
|
473
|
+
##
|
474
|
+
# @return [trunk.TransferCallerId] Caller Id for transfer target
|
475
|
+
def transfer_caller_id
|
476
|
+
@properties['transfer_caller_id']
|
477
|
+
end
|
478
|
+
|
466
479
|
##
|
467
480
|
# @return [Boolean] Whether Caller ID Name (CNAM) lookup is enabled for the trunk
|
468
481
|
def cnam_lookup_enabled
|
@@ -556,8 +569,10 @@ module Twilio
|
|
556
569
|
# the United States and Canada automatically perform a CNAM Lookup and display
|
557
570
|
# Caller ID data on your phone. See {CNAM
|
558
571
|
# Lookups}[https://www.twilio.com/docs/sip-trunking#CNAM] for more information.
|
572
|
+
# @param [trunk.TransferCallerId] transfer_caller_id Caller Id for transfer
|
573
|
+
# target. Can be: `from-transferee` (default) or `from-transferor`.
|
559
574
|
# @return [TrunkInstance] Updated TrunkInstance
|
560
|
-
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
575
|
+
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset, transfer_caller_id: :unset)
|
561
576
|
context.update(
|
562
577
|
friendly_name: friendly_name,
|
563
578
|
domain_name: domain_name,
|
@@ -566,6 +581,7 @@ module Twilio
|
|
566
581
|
transfer_mode: transfer_mode,
|
567
582
|
secure: secure,
|
568
583
|
cnam_lookup_enabled: cnam_lookup_enabled,
|
584
|
+
transfer_caller_id: transfer_caller_id,
|
569
585
|
)
|
570
586
|
end
|
571
587
|
|
@@ -33,7 +33,8 @@ module Twilio
|
|
33
33
|
# {email}[https://www.twilio.com/docs/verify/email] to verify. Phone numbers must
|
34
34
|
# be in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
|
35
35
|
# @param [String] channel The verification method to use. Can be:
|
36
|
-
# {`email`}[https://www.twilio.com/docs/verify/email], `sms` or
|
36
|
+
# {`email`}[https://www.twilio.com/docs/verify/email], `sms`, `whatsapp` or
|
37
|
+
# `call`.
|
37
38
|
# @param [String] custom_friendly_name A custom user defined friendly name that
|
38
39
|
# overwrites the existing one in the verification message
|
39
40
|
# @param [String] custom_message The text of a custom message to use for the
|
@@ -42,10 +43,11 @@ module Twilio
|
|
42
43
|
# for example, to dial an extension. For more information, see the Programmable
|
43
44
|
# Voice documentation of
|
44
45
|
# {sendDigits}[https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits].
|
45
|
-
# @param [String] locale The locale to use for the verification SMS or
|
46
|
-
# be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`,
|
47
|
-
# `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`,
|
48
|
-
# `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or
|
46
|
+
# @param [String] locale The locale to use for the verification SMS, WhatsApp or
|
47
|
+
# call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`,
|
48
|
+
# `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`,
|
49
|
+
# `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or
|
50
|
+
# `zh-HK.`
|
49
51
|
# @param [String] custom_code A pre-generated code to use for verification. The
|
50
52
|
# code can be between 4 and 10 characters, inclusive.
|
51
53
|
# @param [String] amount The amount of the associated PSD2 compliant transaction.
|