twilio-ruby 5.59.0 → 5.61.2

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.
Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/deploy.yml +65 -0
  3. data/.github/workflows/test.yml +52 -0
  4. data/.gitignore +3 -1
  5. data/.rubocop.yml +1 -1
  6. data/CHANGES.md +91 -0
  7. data/Makefile +3 -4
  8. data/README.md +4 -4
  9. data/lib/twilio-ruby/jwt/access_token.rb +13 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +3 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +7 -0
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +7 -0
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +7 -0
  14. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +7 -0
  15. data/lib/twilio-ruby/rest/client.rb +7 -0
  16. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
  17. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
  18. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  19. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +31 -6
  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/supersim/v1/ip_command.rb +416 -0
  29. data/lib/twilio-ruby/rest/supersim/v1.rb +16 -0
  30. data/lib/twilio-ruby/rest/supersim.rb +9 -0
  31. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +8 -2
  32. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +8 -2
  33. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +16 -6
  34. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +5 -5
  35. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +9 -1
  36. data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -3
  37. data/lib/twilio-ruby/rest/video/v1/room.rb +23 -1
  38. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  39. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
  40. data/lib/twilio-ruby/twiml/voice_response.rb +613 -36
  41. data/lib/twilio-ruby/version.rb +1 -1
  42. metadata +14 -4
  43. data/.travis.yml +0 -57
@@ -73,8 +73,11 @@ module Twilio
73
73
  # @param [String] totp_skew Optional configuration for the TOTP factors. The
74
74
  # number of time-steps, past and future, that are valid for validation of TOTP
75
75
  # codes. Must be between 0 and 2, inclusive. Defaults to 1
76
+ # @param [String] default_template_sid The default message
77
+ # {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
78
+ # all SMS verifications unless explicitly overriden. SMS channel only.
76
79
  # @return [ServiceInstance] Created ServiceInstance
77
- def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
80
+ def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
78
81
  data = Twilio::Values.of({
79
82
  'FriendlyName' => friendly_name,
80
83
  'CodeLength' => code_length,
@@ -92,6 +95,7 @@ module Twilio
92
95
  'Totp.TimeStep' => totp_time_step,
93
96
  'Totp.CodeLength' => totp_code_length,
94
97
  'Totp.Skew' => totp_skew,
98
+ 'DefaultTemplateSid' => default_template_sid,
95
99
  })
96
100
 
97
101
  payload = @version.create('POST', @uri, data: data)
@@ -303,8 +307,11 @@ module Twilio
303
307
  # @param [String] totp_skew Optional configuration for the TOTP factors. The
304
308
  # number of time-steps, past and future, that are valid for validation of TOTP
305
309
  # codes. Must be between 0 and 2, inclusive. Defaults to 1
310
+ # @param [String] default_template_sid The default message
311
+ # {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
312
+ # all SMS verifications unless explicitly overriden. SMS channel only.
306
313
  # @return [ServiceInstance] Updated ServiceInstance
307
- def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
314
+ def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
308
315
  data = Twilio::Values.of({
309
316
  'FriendlyName' => friendly_name,
310
317
  'CodeLength' => code_length,
@@ -322,6 +329,7 @@ module Twilio
322
329
  'Totp.TimeStep' => totp_time_step,
323
330
  'Totp.CodeLength' => totp_code_length,
324
331
  'Totp.Skew' => totp_skew,
332
+ 'DefaultTemplateSid' => default_template_sid,
325
333
  })
326
334
 
327
335
  payload = @version.update('POST', @uri, data: data)
@@ -484,6 +492,7 @@ module Twilio
484
492
  'custom_code_enabled' => payload['custom_code_enabled'],
485
493
  'push' => payload['push'],
486
494
  'totp' => payload['totp'],
495
+ 'default_template_sid' => payload['default_template_sid'],
487
496
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
488
497
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
489
498
  'url' => payload['url'],
@@ -584,6 +593,12 @@ module Twilio
584
593
  @properties['totp']
585
594
  end
586
595
 
596
+ ##
597
+ # @return [String] The default_template_sid
598
+ def default_template_sid
599
+ @properties['default_template_sid']
600
+ end
601
+
587
602
  ##
588
603
  # @return [Time] The RFC 2822 date and time in GMT when the resource was created
589
604
  def date_created
@@ -670,8 +685,11 @@ module Twilio
670
685
  # @param [String] totp_skew Optional configuration for the TOTP factors. The
671
686
  # number of time-steps, past and future, that are valid for validation of TOTP
672
687
  # codes. Must be between 0 and 2, inclusive. Defaults to 1
688
+ # @param [String] default_template_sid The default message
689
+ # {template}[https://www.twilio.com/docs/verify/api/templates]. Will be used for
690
+ # all SMS verifications unless explicitly overriden. SMS channel only.
673
691
  # @return [ServiceInstance] Updated ServiceInstance
674
- def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset)
692
+ def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset, skip_sms_to_landlines: :unset, dtmf_input_required: :unset, tts_name: :unset, psd2_enabled: :unset, do_not_share_warning_enabled: :unset, custom_code_enabled: :unset, push_include_date: :unset, push_apn_credential_sid: :unset, push_fcm_credential_sid: :unset, totp_issuer: :unset, totp_time_step: :unset, totp_code_length: :unset, totp_skew: :unset, default_template_sid: :unset)
675
693
  context.update(
676
694
  friendly_name: friendly_name,
677
695
  code_length: code_length,
@@ -689,6 +707,7 @@ module Twilio
689
707
  totp_time_step: totp_time_step,
690
708
  totp_code_length: totp_code_length,
691
709
  totp_skew: totp_skew,
710
+ default_template_sid: default_template_sid,
692
711
  )
693
712
  end
694
713
 
@@ -57,8 +57,14 @@ module Twilio
57
57
  # ***This feature is not available in `peer-to-peer` rooms.***
58
58
  # @param [Hash] recording_rules A collection of Recording Rules that describe how
59
59
  # to include or exclude matching tracks for recording
60
+ # @param [Boolean] audio_only When set to true, indicates that the participants in
61
+ # the room will only publish audio. No video tracks will be allowed. Group rooms
62
+ # only.
63
+ # @param [String] max_participant_duration The maximum number of seconds a
64
+ # Participant can be connected to the room. The maximum possible value is 86400
65
+ # seconds (24 hours). The default is 14400 seconds (4 hours).
60
66
  # @return [RoomInstance] Created RoomInstance
61
- def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset)
67
+ def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset, max_participant_duration: :unset)
62
68
  data = Twilio::Values.of({
63
69
  'EnableTurn' => enable_turn,
64
70
  'Type' => type,
@@ -70,6 +76,8 @@ module Twilio
70
76
  'VideoCodecs' => Twilio.serialize_list(video_codecs) { |e| e },
71
77
  'MediaRegion' => media_region,
72
78
  'RecordingRules' => Twilio.serialize_object(recording_rules),
79
+ 'AudioOnly' => audio_only,
80
+ 'MaxParticipantDuration' => max_participant_duration,
73
81
  })
74
82
 
75
83
  payload = @version.create('POST', @uri, data: data)
@@ -360,10 +368,12 @@ module Twilio
360
368
  'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
361
369
  'type' => payload['type'],
362
370
  'max_participants' => payload['max_participants'].to_i,
371
+ 'max_participant_duration' => payload['max_participant_duration'].to_i,
363
372
  'max_concurrent_published_tracks' => payload['max_concurrent_published_tracks'] == nil ? payload['max_concurrent_published_tracks'] : payload['max_concurrent_published_tracks'].to_i,
364
373
  'record_participants_on_connect' => payload['record_participants_on_connect'],
365
374
  'video_codecs' => payload['video_codecs'],
366
375
  'media_region' => payload['media_region'],
376
+ 'audio_only' => payload['audio_only'],
367
377
  'url' => payload['url'],
368
378
  'links' => payload['links'],
369
379
  }
@@ -462,6 +472,12 @@ module Twilio
462
472
  @properties['max_participants']
463
473
  end
464
474
 
475
+ ##
476
+ # @return [String] The maximum number of seconds a Participant can be connected to the room
477
+ def max_participant_duration
478
+ @properties['max_participant_duration']
479
+ end
480
+
465
481
  ##
466
482
  # @return [String] The maximum number of published tracks allowed in the room at the same time
467
483
  def max_concurrent_published_tracks
@@ -486,6 +502,12 @@ module Twilio
486
502
  @properties['media_region']
487
503
  end
488
504
 
505
+ ##
506
+ # @return [Boolean] Indicates whether the room will only contain audio track participants for group rooms.
507
+ def audio_only
508
+ @properties['audio_only']
509
+ end
510
+
489
511
  ##
490
512
  # @return [String] The absolute URL of the resource
491
513
  def url
@@ -123,13 +123,13 @@ module Twilio
123
123
  # models}[https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans].
124
124
  # @param [Boolean] messaging_enabled Whether SIMs can make, send, and receive SMS
125
125
  # using {Commands}[https://www.twilio.com/docs/wireless/api/command-resource].
126
- # @param [Boolean] voice_enabled Whether SIMs can make and receive voice calls.
126
+ # @param [Boolean] voice_enabled Deprecated.
127
127
  # @param [Boolean] national_roaming_enabled Whether SIMs can roam on networks
128
128
  # other than the home network (T-Mobile USA) in the United States. See {national
129
129
  # roaming}[https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming].
130
130
  # @param [Array[String]] international_roaming The list of services that SIMs
131
131
  # capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United
132
- # States. Can be: `data`, `voice`, and `messaging`.
132
+ # States. Can contain: `data` and `messaging`.
133
133
  # @param [String] national_roaming_data_limit The total data usage (download and
134
134
  # upload combined) in Megabytes that the Network allows during one month on
135
135
  # non-home networks in the United States. The metering period begins the day of
@@ -353,7 +353,7 @@ module Twilio
353
353
  end
354
354
 
355
355
  ##
356
- # @return [Boolean] Whether SIMs can make and receive voice calls
356
+ # @return [Boolean] Deprecated. Whether SIMs can make and receive voice calls
357
357
  def voice_enabled
358
358
  @properties['voice_enabled']
359
359
  end
@@ -249,15 +249,10 @@ module Twilio
249
249
  # @param [String] sms_url The URL we should call using the `sms_method` when the
250
250
  # SIM-connected device sends an SMS message that is not a
251
251
  # {Command}[https://www.twilio.com/docs/wireless/api/command-resource].
252
- # @param [String] voice_fallback_method The HTTP method we should use to call
253
- # `voice_fallback_url`. Can be: `GET` or `POST`.
254
- # @param [String] voice_fallback_url The URL we should call using the
255
- # `voice_fallback_method` when an error occurs while retrieving or executing the
256
- # TwiML requested from `voice_url`.
257
- # @param [String] voice_method The HTTP method we should use when we call
258
- # `voice_url`. Can be: `GET` or `POST`.
259
- # @param [String] voice_url The URL we should call using the `voice_method` when
260
- # the SIM-connected device makes a voice call.
252
+ # @param [String] voice_fallback_method Deprecated.
253
+ # @param [String] voice_fallback_url Deprecated.
254
+ # @param [String] voice_method Deprecated.
255
+ # @param [String] voice_url Deprecated.
261
256
  # @param [sim.ResetStatus] reset_status Initiate a connectivity reset on the SIM.
262
257
  # Set to `resetting` to initiate a connectivity reset on the SIM. No other value
263
258
  # is valid.
@@ -463,49 +458,49 @@ module Twilio
463
458
  end
464
459
 
465
460
  ##
466
- # @return [String] The HTTP method we use to call sms_fallback_url
461
+ # @return [String] Deprecated. The HTTP method we use to call sms_fallback_url
467
462
  def sms_fallback_method
468
463
  @properties['sms_fallback_method']
469
464
  end
470
465
 
471
466
  ##
472
- # @return [String] The URL we call when an error occurs while retrieving or executing the TwiML requested from the sms_url
467
+ # @return [String] Deprecated. The URL we call when an error occurs while retrieving or executing the TwiML requested from the sms_url
473
468
  def sms_fallback_url
474
469
  @properties['sms_fallback_url']
475
470
  end
476
471
 
477
472
  ##
478
- # @return [String] The HTTP method we use to call sms_url
473
+ # @return [String] Deprecated. The HTTP method we use to call sms_url
479
474
  def sms_method
480
475
  @properties['sms_method']
481
476
  end
482
477
 
483
478
  ##
484
- # @return [String] The URL we call when the SIM-connected device sends an SMS message that is not a Command
479
+ # @return [String] Deprecated. The URL we call when the SIM-connected device sends an SMS message that is not a Command
485
480
  def sms_url
486
481
  @properties['sms_url']
487
482
  end
488
483
 
489
484
  ##
490
- # @return [String] The HTTP method we use to call voice_fallback_url
485
+ # @return [String] Deprecated. The HTTP method we use to call voice_fallback_url
491
486
  def voice_fallback_method
492
487
  @properties['voice_fallback_method']
493
488
  end
494
489
 
495
490
  ##
496
- # @return [String] The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url
491
+ # @return [String] Deprecated. The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url
497
492
  def voice_fallback_url
498
493
  @properties['voice_fallback_url']
499
494
  end
500
495
 
501
496
  ##
502
- # @return [String] The HTTP method we use to call voice_url
497
+ # @return [String] Deprecated. The HTTP method we use to call voice_url
503
498
  def voice_method
504
499
  @properties['voice_method']
505
500
  end
506
501
 
507
502
  ##
508
- # @return [String] The URL we call when the SIM-connected device makes a voice call
503
+ # @return [String] Deprecated. The URL we call when the SIM-connected device makes a voice call
509
504
  def voice_url
510
505
  @properties['voice_url']
511
506
  end
@@ -583,15 +578,10 @@ module Twilio
583
578
  # @param [String] sms_url The URL we should call using the `sms_method` when the
584
579
  # SIM-connected device sends an SMS message that is not a
585
580
  # {Command}[https://www.twilio.com/docs/wireless/api/command-resource].
586
- # @param [String] voice_fallback_method The HTTP method we should use to call
587
- # `voice_fallback_url`. Can be: `GET` or `POST`.
588
- # @param [String] voice_fallback_url The URL we should call using the
589
- # `voice_fallback_method` when an error occurs while retrieving or executing the
590
- # TwiML requested from `voice_url`.
591
- # @param [String] voice_method The HTTP method we should use when we call
592
- # `voice_url`. Can be: `GET` or `POST`.
593
- # @param [String] voice_url The URL we should call using the `voice_method` when
594
- # the SIM-connected device makes a voice call.
581
+ # @param [String] voice_fallback_method Deprecated.
582
+ # @param [String] voice_fallback_url Deprecated.
583
+ # @param [String] voice_method Deprecated.
584
+ # @param [String] voice_url Deprecated.
595
585
  # @param [sim.ResetStatus] reset_status Initiate a connectivity reset on the SIM.
596
586
  # Set to `resetting` to initiate a connectivity reset on the SIM. No other value
597
587
  # is valid.