twilio-ruby 5.58.3 → 5.61.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/deploy.yml +65 -0
  3. data/.github/workflows/test.yml +51 -0
  4. data/.gitignore +3 -1
  5. data/CHANGES.md +99 -0
  6. data/Makefile +3 -4
  7. data/README.md +4 -4
  8. data/lib/twilio-ruby/jwt/access_token.rb +13 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +30 -4
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
  14. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
  15. data/lib/twilio-ruby/rest/client.rb +7 -0
  16. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  17. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  18. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +31 -6
  19. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +36 -36
  20. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +384 -0
  21. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
  22. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +390 -0
  23. data/lib/twilio-ruby/rest/media/v1.rb +60 -0
  24. data/lib/twilio-ruby/rest/media.rb +56 -0
  25. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +353 -0
  26. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +43 -1
  27. data/lib/twilio-ruby/rest/messaging/v1/service.rb +29 -3
  28. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
  29. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  30. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +40 -0
  31. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  32. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  33. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  34. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  35. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  36. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +8 -2
  37. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  38. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +16 -6
  39. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +5 -5
  40. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +16 -6
  41. data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -3
  42. data/lib/twilio-ruby/rest/verify/v2/{verification_template.rb → template.rb} +25 -25
  43. data/lib/twilio-ruby/rest/verify/v2.rb +4 -4
  44. data/lib/twilio-ruby/rest/verify.rb +3 -3
  45. data/lib/twilio-ruby/rest/video/v1/room.rb +12 -1
  46. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  47. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
  48. data/lib/twilio-ruby/twiml/voice_response.rb +613 -36
  49. data/lib/twilio-ruby/version.rb +1 -1
  50. metadata +16 -5
  51. data/.travis.yml +0 -56
@@ -144,9 +144,9 @@ module Twilio
144
144
  # Calls Beta)
145
145
  # @param [String] call_token A token string needed to invoke a forwarded call. A
146
146
  # call_token is generated when an incoming call is received on a Twilio number.
147
- # this field should be populated by the incoming call's call_token to make this
148
- # outgoing call as a forwarded call of incoming call. A forwarded call should bear
149
- # the same caller-id of incoming call.
147
+ # Pass an incoming call's call_token value to a forwarded call via the call_token
148
+ # parameter when creating a new call. A forwarded call should bear the same
149
+ # CallerID of the original incoming call.
150
150
  # @param [String] recording_track The audio track to record for the call. Can be:
151
151
  # `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
152
152
  # audio that is received by Twilio. `outbound` records the audio that is generated
@@ -160,7 +160,7 @@ module Twilio
160
160
  # section in {Making Calls}[https://www.twilio.com/docs/voice/make-calls].
161
161
  # @param [String] twiml TwiML instructions for the call Twilio will use without
162
162
  # fetching Twiml from url parameter. If both `twiml` and `url` are provided then
163
- # `twiml` parameter will be ignored.
163
+ # `twiml` parameter will be ignored. Max 4000 characters.
164
164
  # @param [String] application_sid The SID of the Application resource that will
165
165
  # handle the call, if the call will be handled by an application.
166
166
  # @return [CallInstance] Created CallInstance
@@ -442,6 +442,7 @@ module Twilio
442
442
  @feedback = nil
443
443
  @events = nil
444
444
  @payments = nil
445
+ @siprec = nil
445
446
  end
446
447
 
447
448
  ##
@@ -598,6 +599,24 @@ module Twilio
598
599
  @payments
599
600
  end
600
601
 
602
+ ##
603
+ # Access the siprec
604
+ # @return [SiprecList]
605
+ # @return [SiprecContext] if sid was passed.
606
+ def siprec(sid=:unset)
607
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
608
+
609
+ if sid != :unset
610
+ return SiprecContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
611
+ end
612
+
613
+ unless @siprec
614
+ @siprec = SiprecList.new(@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
615
+ end
616
+
617
+ @siprec
618
+ end
619
+
601
620
  ##
602
621
  # Provide a user friendly representation
603
622
  def to_s
@@ -932,6 +951,13 @@ module Twilio
932
951
  context.payments
933
952
  end
934
953
 
954
+ ##
955
+ # Access the siprec
956
+ # @return [siprec] siprec
957
+ def siprec
958
+ context.siprec
959
+ end
960
+
935
961
  ##
936
962
  # Provide a user friendly representation
937
963
  def to_s
@@ -202,9 +202,9 @@ module Twilio
202
202
  # @param [String] address_sid The SID of the Address resource we should associate
203
203
  # with the new phone number. Some regions require addresses to meet local
204
204
  # regulations.
205
- # @param [local.EmergencyStatus] emergency_status The configuration status
206
- # parameter that determines whether the new phone number is enabled for emergency
207
- # calling.
205
+ # @param [local.EmergencyStatus] emergency_status The parameter displays if
206
+ # emergency calling is enabled for this number. Active numbers may place emergency
207
+ # calls by dialing valid emergency numbers for the country.
208
208
  # @param [String] emergency_address_sid The SID of the emergency address
209
209
  # configuration to use for emergency calling from the new phone number.
210
210
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -331,6 +331,7 @@ module Twilio
331
331
  'voice_url' => payload['voice_url'],
332
332
  'emergency_status' => payload['emergency_status'],
333
333
  'emergency_address_sid' => payload['emergency_address_sid'],
334
+ 'emergency_address_status' => payload['emergency_address_status'],
334
335
  'bundle_sid' => payload['bundle_sid'],
335
336
  'status' => payload['status'],
336
337
  }
@@ -511,7 +512,7 @@ module Twilio
511
512
  end
512
513
 
513
514
  ##
514
- # @return [local.EmergencyStatus] Whether the phone number is enabled for emergency calling
515
+ # @return [local.EmergencyStatus] Displays if emergency calling is enabled for this number.
515
516
  def emergency_status
516
517
  @properties['emergency_status']
517
518
  end
@@ -522,6 +523,12 @@ module Twilio
522
523
  @properties['emergency_address_sid']
523
524
  end
524
525
 
526
+ ##
527
+ # @return [local.EmergencyAddressStatus] State of the emergency address configuration for the phone number
528
+ def emergency_address_status
529
+ @properties['emergency_address_status']
530
+ end
531
+
525
532
  ##
526
533
  # @return [String] The SID of the Bundle resource associated with number
527
534
  def bundle_sid
@@ -201,9 +201,9 @@ module Twilio
201
201
  # @param [String] address_sid The SID of the Address resource we should associate
202
202
  # with the new phone number. Some regions require addresses to meet local
203
203
  # regulations.
204
- # @param [mobile.EmergencyStatus] emergency_status The configuration status
205
- # parameter that determines whether the new phone number is enabled for emergency
206
- # calling.
204
+ # @param [mobile.EmergencyStatus] emergency_status The parameter displays if
205
+ # emergency calling is enabled for this number. Active numbers may place emergency
206
+ # calls by dialing valid emergency numbers for the country.
207
207
  # @param [String] emergency_address_sid The SID of the emergency address
208
208
  # configuration to use for emergency calling from the new phone number.
209
209
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -330,6 +330,7 @@ module Twilio
330
330
  'voice_url' => payload['voice_url'],
331
331
  'emergency_status' => payload['emergency_status'],
332
332
  'emergency_address_sid' => payload['emergency_address_sid'],
333
+ 'emergency_address_status' => payload['emergency_address_status'],
333
334
  'bundle_sid' => payload['bundle_sid'],
334
335
  'status' => payload['status'],
335
336
  }
@@ -510,7 +511,7 @@ module Twilio
510
511
  end
511
512
 
512
513
  ##
513
- # @return [mobile.EmergencyStatus] Whether the phone number is enabled for emergency calling
514
+ # @return [mobile.EmergencyStatus] Displays if emergency calling is enabled for this number.
514
515
  def emergency_status
515
516
  @properties['emergency_status']
516
517
  end
@@ -521,6 +522,12 @@ module Twilio
521
522
  @properties['emergency_address_sid']
522
523
  end
523
524
 
525
+ ##
526
+ # @return [mobile.EmergencyAddressStatus] State of the emergency address configuration for the phone number
527
+ def emergency_address_status
528
+ @properties['emergency_address_status']
529
+ end
530
+
524
531
  ##
525
532
  # @return [String] The SID of the Bundle resource associated with number
526
533
  def bundle_sid
@@ -201,9 +201,9 @@ module Twilio
201
201
  # @param [String] address_sid The SID of the Address resource we should associate
202
202
  # with the new phone number. Some regions require addresses to meet local
203
203
  # regulations.
204
- # @param [toll_free.EmergencyStatus] emergency_status The configuration status
205
- # parameter that determines whether the new phone number is enabled for emergency
206
- # calling.
204
+ # @param [toll_free.EmergencyStatus] emergency_status The parameter displays if
205
+ # emergency calling is enabled for this number. Active numbers may place emergency
206
+ # calls by dialing valid emergency numbers for the country.
207
207
  # @param [String] emergency_address_sid The SID of the emergency address
208
208
  # configuration to use for emergency calling from the new phone number.
209
209
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -330,6 +330,7 @@ module Twilio
330
330
  'voice_url' => payload['voice_url'],
331
331
  'emergency_status' => payload['emergency_status'],
332
332
  'emergency_address_sid' => payload['emergency_address_sid'],
333
+ 'emergency_address_status' => payload['emergency_address_status'],
333
334
  'bundle_sid' => payload['bundle_sid'],
334
335
  'status' => payload['status'],
335
336
  }
@@ -510,7 +511,7 @@ module Twilio
510
511
  end
511
512
 
512
513
  ##
513
- # @return [toll_free.EmergencyStatus] Whether the phone number is enabled for emergency calling
514
+ # @return [toll_free.EmergencyStatus] Displays if emergency calling is enabled for this number.
514
515
  def emergency_status
515
516
  @properties['emergency_status']
516
517
  end
@@ -521,6 +522,12 @@ module Twilio
521
522
  @properties['emergency_address_sid']
522
523
  end
523
524
 
525
+ ##
526
+ # @return [toll_free.EmergencyAddressStatus] State of the emergency address configuration for the phone number
527
+ def emergency_address_status
528
+ @properties['emergency_address_status']
529
+ end
530
+
524
531
  ##
525
532
  # @return [String] The SID of the Bundle resource associated with number
526
533
  def bundle_sid
@@ -199,9 +199,9 @@ module Twilio
199
199
  # @param [String] voice_url The URL that we should call to answer a call to the
200
200
  # new phone number. The `voice_url` will not be called if a
201
201
  # `voice_application_sid` or a `trunk_sid` is set.
202
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
203
- # configuration status parameter that determines whether the new phone number is
204
- # enabled for emergency calling.
202
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
203
+ # displays if emergency calling is enabled for this number. Active numbers may
204
+ # place emergency calls by dialing valid emergency numbers for the country.
205
205
  # @param [String] emergency_address_sid The SID of the emergency address
206
206
  # configuration to use for emergency calling from the new phone number.
207
207
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -387,9 +387,9 @@ module Twilio
387
387
  # @param [String] voice_url The URL that we should call to answer a call to the
388
388
  # phone number. The `voice_url` will not be called if a `voice_application_sid` or
389
389
  # a `trunk_sid` is set.
390
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
391
- # configuration status parameter that determines whether the phone number is
392
- # enabled for emergency calling.
390
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
391
+ # displays if emergency calling is enabled for this number. Active numbers may
392
+ # place emergency calls by dialing valid emergency numbers for the country.
393
393
  # @param [String] emergency_address_sid The SID of the emergency address
394
394
  # configuration to use for emergency calling from this phone number.
395
395
  # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
@@ -550,6 +550,7 @@ module Twilio
550
550
  'voice_url' => payload['voice_url'],
551
551
  'emergency_status' => payload['emergency_status'],
552
552
  'emergency_address_sid' => payload['emergency_address_sid'],
553
+ 'emergency_address_status' => payload['emergency_address_status'],
553
554
  'bundle_sid' => payload['bundle_sid'],
554
555
  'status' => payload['status'],
555
556
  }
@@ -745,7 +746,7 @@ module Twilio
745
746
  end
746
747
 
747
748
  ##
748
- # @return [incoming_phone_number.EmergencyStatus] Whether the phone number is enabled for emergency calling
749
+ # @return [incoming_phone_number.EmergencyStatus] Displays if emergency calling is enabled for this number.
749
750
  def emergency_status
750
751
  @properties['emergency_status']
751
752
  end
@@ -756,6 +757,12 @@ module Twilio
756
757
  @properties['emergency_address_sid']
757
758
  end
758
759
 
760
+ ##
761
+ # @return [incoming_phone_number.EmergencyAddressStatus] State of the emergency address configuration for the phone number
762
+ def emergency_address_status
763
+ @properties['emergency_address_status']
764
+ end
765
+
759
766
  ##
760
767
  # @return [String] The SID of the Bundle resource associated with number
761
768
  def bundle_sid
@@ -812,9 +819,9 @@ module Twilio
812
819
  # @param [String] voice_url The URL that we should call to answer a call to the
813
820
  # phone number. The `voice_url` will not be called if a `voice_application_sid` or
814
821
  # a `trunk_sid` is set.
815
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
816
- # configuration status parameter that determines whether the phone number is
817
- # enabled for emergency calling.
822
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
823
+ # displays if emergency calling is enabled for this number. Active numbers may
824
+ # place emergency calls by dialing valid emergency numbers for the country.
818
825
  # @param [String] emergency_address_sid The SID of the emergency address
819
826
  # configuration to use for emergency calling from this phone number.
820
827
  # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
@@ -41,6 +41,7 @@ module Twilio
41
41
  @insights = nil
42
42
  @ip_messaging = nil
43
43
  @lookups = nil
44
+ @media = nil
44
45
  @messaging = nil
45
46
  @monitor = nil
46
47
  @notify = nil
@@ -231,6 +232,12 @@ module Twilio
231
232
  @lookups ||= Lookups.new self
232
233
  end
233
234
 
235
+ ##
236
+ # Access the Media Twilio Domain
237
+ def media
238
+ @media ||= Media.new self
239
+ end
240
+
234
241
  ##
235
242
  # Access the Messaging Twilio Domain
236
243
  def messaging
@@ -107,8 +107,14 @@ module Twilio
107
107
  # @param [String] removed_from_conversation_sound The name of the sound to play to
108
108
  # a user when they are removed from a conversation and
109
109
  # `removed_from_conversation.enabled` is `true`.
110
+ # @param [Boolean] new_message_with_media_enabled Whether to send a notification
111
+ # when a new message with media/file attachments is added to a conversation. The
112
+ # default is `false`.
113
+ # @param [String] new_message_with_media_template The template to use to create
114
+ # the notification text displayed when a new message with media/file attachments
115
+ # is added to a conversation and `new_message.attachments.enabled` is `true`.
110
116
  # @return [NotificationInstance] Updated NotificationInstance
111
- def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset)
117
+ def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset, new_message_with_media_enabled: :unset, new_message_with_media_template: :unset)
112
118
  data = Twilio::Values.of({
113
119
  'LogEnabled' => log_enabled,
114
120
  'NewMessage.Enabled' => new_message_enabled,
@@ -121,6 +127,8 @@ module Twilio
121
127
  'RemovedFromConversation.Enabled' => removed_from_conversation_enabled,
122
128
  'RemovedFromConversation.Template' => removed_from_conversation_template,
123
129
  'RemovedFromConversation.Sound' => removed_from_conversation_sound,
130
+ 'NewMessage.WithMedia.Enabled' => new_message_with_media_enabled,
131
+ 'NewMessage.WithMedia.Template' => new_message_with_media_template,
124
132
  })
125
133
 
126
134
  payload = @version.update('POST', @uri, data: data)
@@ -261,8 +269,14 @@ module Twilio
261
269
  # @param [String] removed_from_conversation_sound The name of the sound to play to
262
270
  # a user when they are removed from a conversation and
263
271
  # `removed_from_conversation.enabled` is `true`.
272
+ # @param [Boolean] new_message_with_media_enabled Whether to send a notification
273
+ # when a new message with media/file attachments is added to a conversation. The
274
+ # default is `false`.
275
+ # @param [String] new_message_with_media_template The template to use to create
276
+ # the notification text displayed when a new message with media/file attachments
277
+ # is added to a conversation and `new_message.attachments.enabled` is `true`.
264
278
  # @return [NotificationInstance] Updated NotificationInstance
265
- def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset)
279
+ def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset, new_message_with_media_enabled: :unset, new_message_with_media_template: :unset)
266
280
  context.update(
267
281
  log_enabled: log_enabled,
268
282
  new_message_enabled: new_message_enabled,
@@ -275,6 +289,8 @@ module Twilio
275
289
  removed_from_conversation_enabled: removed_from_conversation_enabled,
276
290
  removed_from_conversation_template: removed_from_conversation_template,
277
291
  removed_from_conversation_sound: removed_from_conversation_sound,
292
+ new_message_with_media_enabled: new_message_with_media_enabled,
293
+ new_message_with_media_template: new_message_with_media_template,
278
294
  )
279
295
  end
280
296
 
@@ -167,6 +167,7 @@ module Twilio
167
167
  'notifications' => payload['notifications'],
168
168
  'markdown' => payload['markdown'],
169
169
  'url' => payload['url'],
170
+ 'flex_insights_hr' => payload['flex_insights_hr'],
170
171
  }
171
172
 
172
173
  # Context
@@ -419,6 +420,12 @@ module Twilio
419
420
  @properties['url']
420
421
  end
421
422
 
423
+ ##
424
+ # @return [Hash] Object that controls workspace reporting
425
+ def flex_insights_hr
426
+ @properties['flex_insights_hr']
427
+ end
428
+
422
429
  ##
423
430
  # Fetch the ConfigurationInstance
424
431
  # @param [String] ui_version The Pinned UI version of the Configuration resource
@@ -94,10 +94,19 @@ module Twilio
94
94
  # @param [String] avatar The avatar URL which will be shown in Frontline
95
95
  # application.
96
96
  # @param [user.StateType] state Current state of this user. Can be either `active`
97
- # or `deactivated` and defaults to `active`
97
+ # or `deactivated`.
98
+ # @param [Boolean] is_available Whether the User is available for new
99
+ # conversations. Set to `false` to prevent User from receiving new inbound
100
+ # conversations if you are using {Pool
101
+ # Routing}[https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing].
98
102
  # @return [UserInstance] Updated UserInstance
99
- def update(friendly_name: :unset, avatar: :unset, state: :unset)
100
- data = Twilio::Values.of({'FriendlyName' => friendly_name, 'Avatar' => avatar, 'State' => state, })
103
+ def update(friendly_name: :unset, avatar: :unset, state: :unset, is_available: :unset)
104
+ data = Twilio::Values.of({
105
+ 'FriendlyName' => friendly_name,
106
+ 'Avatar' => avatar,
107
+ 'State' => state,
108
+ 'IsAvailable' => is_available,
109
+ })
101
110
 
102
111
  payload = @version.update('POST', @uri, data: data)
103
112
 
@@ -139,6 +148,7 @@ module Twilio
139
148
  'friendly_name' => payload['friendly_name'],
140
149
  'avatar' => payload['avatar'],
141
150
  'state' => payload['state'],
151
+ 'is_available' => payload['is_available'],
142
152
  'url' => payload['url'],
143
153
  }
144
154
 
@@ -188,6 +198,12 @@ module Twilio
188
198
  @properties['state']
189
199
  end
190
200
 
201
+ ##
202
+ # @return [Boolean] Whether the User is available for new conversations
203
+ def is_available
204
+ @properties['is_available']
205
+ end
206
+
191
207
  ##
192
208
  # @return [String] An absolute URL for this user.
193
209
  def url
@@ -207,10 +223,19 @@ module Twilio
207
223
  # @param [String] avatar The avatar URL which will be shown in Frontline
208
224
  # application.
209
225
  # @param [user.StateType] state Current state of this user. Can be either `active`
210
- # or `deactivated` and defaults to `active`
226
+ # or `deactivated`.
227
+ # @param [Boolean] is_available Whether the User is available for new
228
+ # conversations. Set to `false` to prevent User from receiving new inbound
229
+ # conversations if you are using {Pool
230
+ # Routing}[https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing].
211
231
  # @return [UserInstance] Updated UserInstance
212
- def update(friendly_name: :unset, avatar: :unset, state: :unset)
213
- context.update(friendly_name: friendly_name, avatar: avatar, state: state, )
232
+ def update(friendly_name: :unset, avatar: :unset, state: :unset, is_available: :unset)
233
+ context.update(
234
+ friendly_name: friendly_name,
235
+ avatar: avatar,
236
+ state: state,
237
+ is_available: is_available,
238
+ )
214
239
  end
215
240
 
216
241
  ##
@@ -27,20 +27,20 @@ module Twilio
27
27
  # Lists CallSummariesInstance records from the API as a list.
28
28
  # Unlike stream(), this operation is eager and will load `limit` records into
29
29
  # memory before returning.
30
- # @param [Array[String]] from The from
31
- # @param [Array[String]] to The to
32
- # @param [Array[String]] from_carrier The from_carrier
33
- # @param [Array[String]] to_carrier The to_carrier
34
- # @param [Array[String]] from_country_code The from_country_code
35
- # @param [Array[String]] to_country_code The to_country_code
30
+ # @param [String] from The from
31
+ # @param [String] to The to
32
+ # @param [String] from_carrier The from_carrier
33
+ # @param [String] to_carrier The to_carrier
34
+ # @param [String] from_country_code The from_country_code
35
+ # @param [String] to_country_code The to_country_code
36
36
  # @param [Boolean] branded The branded
37
37
  # @param [Boolean] verified_caller The verified_caller
38
38
  # @param [Boolean] has_tag The has_tag
39
39
  # @param [String] start_time The start_time
40
40
  # @param [String] end_time The end_time
41
- # @param [Array[call_summaries.CallType]] call_type The call_type
42
- # @param [Array[call_summaries.CallState]] call_state The call_state
43
- # @param [Array[call_summaries.CallDirection]] direction The direction
41
+ # @param [String] call_type The call_type
42
+ # @param [String] call_state The call_state
43
+ # @param [String] direction The direction
44
44
  # @param [call_summaries.ProcessingStateRequest] processing_state The
45
45
  # processing_state
46
46
  # @param [call_summaries.SortBy] sort_by The sort_by
@@ -82,20 +82,20 @@ module Twilio
82
82
  # Streams CallSummariesInstance records from the API as an Enumerable.
83
83
  # This operation lazily loads records as efficiently as possible until the limit
84
84
  # is reached.
85
- # @param [Array[String]] from The from
86
- # @param [Array[String]] to The to
87
- # @param [Array[String]] from_carrier The from_carrier
88
- # @param [Array[String]] to_carrier The to_carrier
89
- # @param [Array[String]] from_country_code The from_country_code
90
- # @param [Array[String]] to_country_code The to_country_code
85
+ # @param [String] from The from
86
+ # @param [String] to The to
87
+ # @param [String] from_carrier The from_carrier
88
+ # @param [String] to_carrier The to_carrier
89
+ # @param [String] from_country_code The from_country_code
90
+ # @param [String] to_country_code The to_country_code
91
91
  # @param [Boolean] branded The branded
92
92
  # @param [Boolean] verified_caller The verified_caller
93
93
  # @param [Boolean] has_tag The has_tag
94
94
  # @param [String] start_time The start_time
95
95
  # @param [String] end_time The end_time
96
- # @param [Array[call_summaries.CallType]] call_type The call_type
97
- # @param [Array[call_summaries.CallState]] call_state The call_state
98
- # @param [Array[call_summaries.CallDirection]] direction The direction
96
+ # @param [String] call_type The call_type
97
+ # @param [String] call_state The call_state
98
+ # @param [String] direction The direction
99
99
  # @param [call_summaries.ProcessingStateRequest] processing_state The
100
100
  # processing_state
101
101
  # @param [call_summaries.SortBy] sort_by The sort_by
@@ -153,20 +153,20 @@ module Twilio
153
153
  ##
154
154
  # Retrieve a single page of CallSummariesInstance records from the API.
155
155
  # Request is executed immediately.
156
- # @param [Array[String]] from The from
157
- # @param [Array[String]] to The to
158
- # @param [Array[String]] from_carrier The from_carrier
159
- # @param [Array[String]] to_carrier The to_carrier
160
- # @param [Array[String]] from_country_code The from_country_code
161
- # @param [Array[String]] to_country_code The to_country_code
156
+ # @param [String] from The from
157
+ # @param [String] to The to
158
+ # @param [String] from_carrier The from_carrier
159
+ # @param [String] to_carrier The to_carrier
160
+ # @param [String] from_country_code The from_country_code
161
+ # @param [String] to_country_code The to_country_code
162
162
  # @param [Boolean] branded The branded
163
163
  # @param [Boolean] verified_caller The verified_caller
164
164
  # @param [Boolean] has_tag The has_tag
165
165
  # @param [String] start_time The start_time
166
166
  # @param [String] end_time The end_time
167
- # @param [Array[call_summaries.CallType]] call_type The call_type
168
- # @param [Array[call_summaries.CallState]] call_state The call_state
169
- # @param [Array[call_summaries.CallDirection]] direction The direction
167
+ # @param [String] call_type The call_type
168
+ # @param [String] call_state The call_state
169
+ # @param [String] direction The direction
170
170
  # @param [call_summaries.ProcessingStateRequest] processing_state The
171
171
  # processing_state
172
172
  # @param [call_summaries.SortBy] sort_by The sort_by
@@ -178,20 +178,20 @@ module Twilio
178
178
  # @return [Page] Page of CallSummariesInstance
179
179
  def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
180
180
  params = Twilio::Values.of({
181
- 'From' => Twilio.serialize_list(from) { |e| e },
182
- 'To' => Twilio.serialize_list(to) { |e| e },
183
- 'FromCarrier' => Twilio.serialize_list(from_carrier) { |e| e },
184
- 'ToCarrier' => Twilio.serialize_list(to_carrier) { |e| e },
185
- 'FromCountryCode' => Twilio.serialize_list(from_country_code) { |e| e },
186
- 'ToCountryCode' => Twilio.serialize_list(to_country_code) { |e| e },
181
+ 'From' => from,
182
+ 'To' => to,
183
+ 'FromCarrier' => from_carrier,
184
+ 'ToCarrier' => to_carrier,
185
+ 'FromCountryCode' => from_country_code,
186
+ 'ToCountryCode' => to_country_code,
187
187
  'Branded' => branded,
188
188
  'VerifiedCaller' => verified_caller,
189
189
  'HasTag' => has_tag,
190
190
  'StartTime' => start_time,
191
191
  'EndTime' => end_time,
192
- 'CallType' => Twilio.serialize_list(call_type) { |e| e },
193
- 'CallState' => Twilio.serialize_list(call_state) { |e| e },
194
- 'Direction' => Twilio.serialize_list(direction) { |e| e },
192
+ 'CallType' => call_type,
193
+ 'CallState' => call_state,
194
+ 'Direction' => direction,
195
195
  'ProcessingState' => processing_state,
196
196
  'SortBy' => sort_by,
197
197
  'Subaccount' => subaccount,