twilio-ruby 5.52.0 → 5.67.3

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 (163) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/pr-lint.yml +15 -0
  3. data/.github/workflows/test-and-deploy.yml +129 -0
  4. data/.gitignore +5 -1
  5. data/.rubocop.yml +1 -1
  6. data/.rubocop_todo.yml +91 -28
  7. data/CHANGES.md +563 -0
  8. data/Gemfile +1 -0
  9. data/Makefile +8 -11
  10. data/README.md +13 -6
  11. data/examples/examples.rb +1 -1
  12. data/lib/rack/twilio_webhook_authentication.rb +25 -1
  13. data/lib/twilio-ruby/http/http_client.rb +20 -4
  14. data/lib/twilio-ruby/http.rb +5 -0
  15. data/lib/twilio-ruby/jwt/access_token.rb +13 -0
  16. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +23 -23
  17. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +8 -8
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +674 -0
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
  21. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +68 -14
  22. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +12 -8
  23. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  24. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
  25. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
  26. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
  27. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
  28. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +18 -5
  29. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +34 -7
  30. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
  31. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
  32. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -8
  33. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -6
  34. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -8
  35. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -8
  36. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -8
  37. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
  38. data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
  39. data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
  40. data/lib/twilio-ruby/rest/chat.rb +16 -0
  41. data/lib/twilio-ruby/rest/client.rb +21 -12
  42. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +454 -0
  43. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
  44. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
  45. data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
  46. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  47. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
  48. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
  49. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
  50. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
  51. data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
  52. data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
  53. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
  54. data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
  55. data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
  56. data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
  57. data/lib/twilio-ruby/rest/conversations/v1.rb +24 -0
  58. data/lib/twilio-ruby/rest/conversations.rb +15 -0
  59. data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
  60. data/lib/twilio-ruby/rest/events/v1/sink.rb +41 -5
  61. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +28 -0
  62. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +55 -34
  63. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
  64. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
  65. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +384 -0
  66. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
  67. data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
  68. data/lib/twilio-ruby/rest/flex_api.rb +9 -0
  69. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +258 -0
  70. data/lib/twilio-ruby/rest/{fax → frontline_api}/v1.rb +11 -11
  71. data/lib/twilio-ruby/rest/{fax.rb → frontline_api.rb} +11 -11
  72. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
  73. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
  74. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
  75. data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
  76. data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
  77. data/lib/twilio-ruby/rest/insights/v1.rb +46 -0
  78. data/lib/twilio-ruby/rest/insights.rb +28 -0
  79. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +268 -0
  80. data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
  81. data/lib/twilio-ruby/rest/lookups.rb +7 -0
  82. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +397 -0
  83. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
  84. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
  85. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +403 -0
  86. data/lib/twilio-ruby/rest/media/v1.rb +76 -0
  87. data/lib/twilio-ruby/rest/media.rb +65 -0
  88. data/lib/twilio-ruby/rest/{fax/v1/fax/fax_media.rb → messaging/v1/brand_registration/brand_vetting.rb} +134 -95
  89. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +127 -2
  90. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
  91. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +187 -20
  92. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
  93. data/lib/twilio-ruby/rest/messaging/v1/service.rb +37 -5
  94. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +268 -0
  95. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  96. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +128 -26
  97. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
  98. data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
  99. data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
  100. data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
  101. data/lib/twilio-ruby/rest/pricing.rb +19 -0
  102. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  103. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  104. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
  105. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
  106. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
  107. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +44 -55
  108. data/lib/twilio-ruby/rest/supersim/v1/{command.rb → ip_command.rb} +132 -84
  109. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
  110. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
  111. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
  112. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +23 -9
  113. data/lib/twilio-ruby/rest/supersim/v1.rb +23 -7
  114. data/lib/twilio-ruby/rest/supersim.rb +15 -6
  115. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
  116. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  117. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
  118. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  119. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  120. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
  121. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
  122. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +38 -22
  123. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  124. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +155 -10
  125. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +12 -9
  126. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +74 -22
  127. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +34 -15
  128. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +66 -31
  129. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
  130. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +25 -7
  131. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
  132. data/lib/twilio-ruby/rest/verify/v2/service.rb +40 -11
  133. data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
  134. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
  135. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
  136. data/lib/twilio-ruby/rest/verify/v2.rb +14 -0
  137. data/lib/twilio-ruby/rest/verify.rb +14 -2
  138. data/lib/twilio-ruby/rest/video/v1/composition.rb +21 -8
  139. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
  140. data/lib/twilio-ruby/rest/video/v1/recording.rb +21 -0
  141. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
  142. data/lib/twilio-ruby/rest/video/v1/room.rb +62 -5
  143. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
  144. data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
  145. data/lib/twilio-ruby/rest/voice.rb +8 -0
  146. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  147. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
  148. data/lib/twilio-ruby/rest.rb +13 -0
  149. data/lib/twilio-ruby/twiml/voice_response.rb +727 -87
  150. data/lib/twilio-ruby/version.rb +1 -1
  151. data/lib/twilio-ruby.rb +6 -16
  152. data/sonar-project.properties +13 -0
  153. data/twilio-ruby.gemspec +1 -2
  154. metadata +59 -32
  155. data/.travis.yml +0 -45
  156. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
  157. /data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
  158. /data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
  159. /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
  160. /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
  161. /data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
  162. /data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
  163. /data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +0 -0
@@ -194,7 +194,7 @@ module Twilio
194
194
  # message:: Message to say
195
195
  # voice:: Voice to use
196
196
  # loop:: Times to loop message
197
- # language:: Message langauge
197
+ # language:: Message language
198
198
  # keyword_args:: additional attributes
199
199
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
200
200
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -469,7 +469,7 @@ module Twilio
469
469
  # message:: Message to say
470
470
  # voice:: Voice to use
471
471
  # loop:: Times to loop message
472
- # language:: Message langauge
472
+ # language:: Message language
473
473
  # keyword_args:: additional attributes
474
474
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
475
475
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -543,8 +543,460 @@ module Twilio
543
543
  # words:: Words to emphasize
544
544
  # level:: Specify the degree of emphasis
545
545
  # keyword_args:: additional attributes
546
- def emphasis(words, level: nil, **keyword_args)
547
- append(SsmlEmphasis.new(words, level: level, **keyword_args))
546
+ def emphasis(words: nil, level: nil, **keyword_args)
547
+ emphasis = SsmlEmphasis.new(words: words, level: level, **keyword_args)
548
+
549
+ yield(emphasis) if block_given?
550
+ append(emphasis)
551
+ end
552
+
553
+ ##
554
+ # Create a new <Lang> element
555
+ # words:: Words to speak
556
+ # xmlLang:: Specify the language
557
+ # keyword_args:: additional attributes
558
+ def lang(words: nil, xmlLang: nil, **keyword_args)
559
+ lang = SsmlLang.new(words: words, xmlLang: xmlLang, **keyword_args)
560
+
561
+ yield(lang) if block_given?
562
+ append(lang)
563
+ end
564
+
565
+ ##
566
+ # Create a new <P> element
567
+ # words:: Words to speak
568
+ # keyword_args:: additional attributes
569
+ def p(words: nil, **keyword_args)
570
+ p = SsmlP.new(words: words, **keyword_args)
571
+
572
+ yield(p) if block_given?
573
+ append(p)
574
+ end
575
+
576
+ ##
577
+ # Create a new <Phoneme> element
578
+ # words:: Words to speak
579
+ # alphabet:: Specify the phonetic alphabet
580
+ # ph:: Specifiy the phonetic symbols for pronunciation
581
+ # keyword_args:: additional attributes
582
+ def phoneme(words, alphabet: nil, ph: nil, **keyword_args)
583
+ append(SsmlPhoneme.new(words, alphabet: alphabet, ph: ph, **keyword_args))
584
+ end
585
+
586
+ ##
587
+ # Create a new <Prosody> element
588
+ # words:: Words to speak
589
+ # volume:: Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB
590
+ # rate:: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
591
+ # pitch:: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
592
+ # keyword_args:: additional attributes
593
+ def prosody(words: nil, volume: nil, rate: nil, pitch: nil, **keyword_args)
594
+ prosody = SsmlProsody.new(words: words, volume: volume, rate: rate, pitch: pitch, **keyword_args)
595
+
596
+ yield(prosody) if block_given?
597
+ append(prosody)
598
+ end
599
+
600
+ ##
601
+ # Create a new <S> element
602
+ # words:: Words to speak
603
+ # keyword_args:: additional attributes
604
+ def s(words: nil, **keyword_args)
605
+ s = SsmlS.new(words: words, **keyword_args)
606
+
607
+ yield(s) if block_given?
608
+ append(s)
609
+ end
610
+
611
+ ##
612
+ # Create a new <Say-As> element
613
+ # words:: Words to be interpreted
614
+ # interpretAs:: Specify the type of words are spoken
615
+ # role:: Specify the format of the date when interpret-as is set to date
616
+ # keyword_args:: additional attributes
617
+ def say_as(words, interpretAs: nil, role: nil, **keyword_args)
618
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
619
+ end
620
+
621
+ ##
622
+ # Create a new <Sub> element
623
+ # words:: Words to be substituted
624
+ # aliasAttribute:: Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation
625
+ # keyword_args:: additional attributes
626
+ def sub(words, aliasAttribute: nil, **keyword_args)
627
+ append(SsmlSub.new(words, aliasAttribute: aliasAttribute, **keyword_args))
628
+ end
629
+
630
+ ##
631
+ # Create a new <W> element
632
+ # words:: Words to speak
633
+ # role:: Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning
634
+ # keyword_args:: additional attributes
635
+ def w(words: nil, role: nil, **keyword_args)
636
+ w = SsmlW.new(words: words, role: role, **keyword_args)
637
+
638
+ yield(w) if block_given?
639
+ append(w)
640
+ end
641
+ end
642
+
643
+ ##
644
+ # Improving Pronunciation by Specifying Parts of Speech in <Say>
645
+ class SsmlW < TwiML
646
+ def initialize(words: nil, **keyword_args)
647
+ super(**keyword_args)
648
+ @name = 'w'
649
+ @value = words unless words.nil?
650
+ yield(self) if block_given?
651
+ end
652
+
653
+ ##
654
+ # Create a new <Break> element
655
+ # strength:: Set a pause based on strength
656
+ # time:: Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms
657
+ # keyword_args:: additional attributes
658
+ def break(strength: nil, time: nil, **keyword_args)
659
+ append(SsmlBreak.new(strength: strength, time: time, **keyword_args))
660
+ end
661
+
662
+ ##
663
+ # Create a new <Emphasis> element
664
+ # words:: Words to emphasize
665
+ # level:: Specify the degree of emphasis
666
+ # keyword_args:: additional attributes
667
+ def emphasis(words: nil, level: nil, **keyword_args)
668
+ emphasis = SsmlEmphasis.new(words: words, level: level, **keyword_args)
669
+
670
+ yield(emphasis) if block_given?
671
+ append(emphasis)
672
+ end
673
+
674
+ ##
675
+ # Create a new <Phoneme> element
676
+ # words:: Words to speak
677
+ # alphabet:: Specify the phonetic alphabet
678
+ # ph:: Specifiy the phonetic symbols for pronunciation
679
+ # keyword_args:: additional attributes
680
+ def phoneme(words, alphabet: nil, ph: nil, **keyword_args)
681
+ append(SsmlPhoneme.new(words, alphabet: alphabet, ph: ph, **keyword_args))
682
+ end
683
+
684
+ ##
685
+ # Create a new <Prosody> element
686
+ # words:: Words to speak
687
+ # volume:: Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB
688
+ # rate:: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
689
+ # pitch:: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
690
+ # keyword_args:: additional attributes
691
+ def prosody(words: nil, volume: nil, rate: nil, pitch: nil, **keyword_args)
692
+ prosody = SsmlProsody.new(words: words, volume: volume, rate: rate, pitch: pitch, **keyword_args)
693
+
694
+ yield(prosody) if block_given?
695
+ append(prosody)
696
+ end
697
+
698
+ ##
699
+ # Create a new <Say-As> element
700
+ # words:: Words to be interpreted
701
+ # interpretAs:: Specify the type of words are spoken
702
+ # role:: Specify the format of the date when interpret-as is set to date
703
+ # keyword_args:: additional attributes
704
+ def say_as(words, interpretAs: nil, role: nil, **keyword_args)
705
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
706
+ end
707
+
708
+ ##
709
+ # Create a new <Sub> element
710
+ # words:: Words to be substituted
711
+ # aliasAttribute:: Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation
712
+ # keyword_args:: additional attributes
713
+ def sub(words, aliasAttribute: nil, **keyword_args)
714
+ append(SsmlSub.new(words, aliasAttribute: aliasAttribute, **keyword_args))
715
+ end
716
+ end
717
+
718
+ ##
719
+ # Pronouncing Acronyms and Abbreviations in <Say>
720
+ class SsmlSub < TwiML
721
+ def initialize(words, **keyword_args)
722
+ super(**keyword_args)
723
+ @name = 'sub'
724
+ @value = words
725
+ yield(self) if block_given?
726
+ end
727
+ end
728
+
729
+ ##
730
+ # Controlling How Special Types of Words Are Spoken in <Say>
731
+ class SsmlSayAs < TwiML
732
+ def initialize(words, **keyword_args)
733
+ super(**keyword_args)
734
+ @name = 'say-as'
735
+ @value = words
736
+ yield(self) if block_given?
737
+ end
738
+ end
739
+
740
+ ##
741
+ # Controling Volume, Speaking Rate, and Pitch in <Say>
742
+ class SsmlProsody < TwiML
743
+ def initialize(words: nil, **keyword_args)
744
+ super(**keyword_args)
745
+ @name = 'prosody'
746
+ @value = words unless words.nil?
747
+ yield(self) if block_given?
748
+ end
749
+
750
+ ##
751
+ # Create a new <Break> element
752
+ # strength:: Set a pause based on strength
753
+ # time:: Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms
754
+ # keyword_args:: additional attributes
755
+ def break(strength: nil, time: nil, **keyword_args)
756
+ append(SsmlBreak.new(strength: strength, time: time, **keyword_args))
757
+ end
758
+
759
+ ##
760
+ # Create a new <Emphasis> element
761
+ # words:: Words to emphasize
762
+ # level:: Specify the degree of emphasis
763
+ # keyword_args:: additional attributes
764
+ def emphasis(words: nil, level: nil, **keyword_args)
765
+ emphasis = SsmlEmphasis.new(words: words, level: level, **keyword_args)
766
+
767
+ yield(emphasis) if block_given?
768
+ append(emphasis)
769
+ end
770
+
771
+ ##
772
+ # Create a new <Lang> element
773
+ # words:: Words to speak
774
+ # xmlLang:: Specify the language
775
+ # keyword_args:: additional attributes
776
+ def lang(words: nil, xmlLang: nil, **keyword_args)
777
+ lang = SsmlLang.new(words: words, xmlLang: xmlLang, **keyword_args)
778
+
779
+ yield(lang) if block_given?
780
+ append(lang)
781
+ end
782
+
783
+ ##
784
+ # Create a new <P> element
785
+ # words:: Words to speak
786
+ # keyword_args:: additional attributes
787
+ def p(words: nil, **keyword_args)
788
+ p = SsmlP.new(words: words, **keyword_args)
789
+
790
+ yield(p) if block_given?
791
+ append(p)
792
+ end
793
+
794
+ ##
795
+ # Create a new <Phoneme> element
796
+ # words:: Words to speak
797
+ # alphabet:: Specify the phonetic alphabet
798
+ # ph:: Specifiy the phonetic symbols for pronunciation
799
+ # keyword_args:: additional attributes
800
+ def phoneme(words, alphabet: nil, ph: nil, **keyword_args)
801
+ append(SsmlPhoneme.new(words, alphabet: alphabet, ph: ph, **keyword_args))
802
+ end
803
+
804
+ ##
805
+ # Create a new <Prosody> element
806
+ # words:: Words to speak
807
+ # volume:: Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB
808
+ # rate:: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
809
+ # pitch:: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
810
+ # keyword_args:: additional attributes
811
+ def prosody(words: nil, volume: nil, rate: nil, pitch: nil, **keyword_args)
812
+ prosody = SsmlProsody.new(words: words, volume: volume, rate: rate, pitch: pitch, **keyword_args)
813
+
814
+ yield(prosody) if block_given?
815
+ append(prosody)
816
+ end
817
+
818
+ ##
819
+ # Create a new <S> element
820
+ # words:: Words to speak
821
+ # keyword_args:: additional attributes
822
+ def s(words: nil, **keyword_args)
823
+ s = SsmlS.new(words: words, **keyword_args)
824
+
825
+ yield(s) if block_given?
826
+ append(s)
827
+ end
828
+
829
+ ##
830
+ # Create a new <Say-As> element
831
+ # words:: Words to be interpreted
832
+ # interpretAs:: Specify the type of words are spoken
833
+ # role:: Specify the format of the date when interpret-as is set to date
834
+ # keyword_args:: additional attributes
835
+ def say_as(words, interpretAs: nil, role: nil, **keyword_args)
836
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
837
+ end
838
+
839
+ ##
840
+ # Create a new <Sub> element
841
+ # words:: Words to be substituted
842
+ # aliasAttribute:: Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation
843
+ # keyword_args:: additional attributes
844
+ def sub(words, aliasAttribute: nil, **keyword_args)
845
+ append(SsmlSub.new(words, aliasAttribute: aliasAttribute, **keyword_args))
846
+ end
847
+
848
+ ##
849
+ # Create a new <W> element
850
+ # words:: Words to speak
851
+ # role:: Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning
852
+ # keyword_args:: additional attributes
853
+ def w(words: nil, role: nil, **keyword_args)
854
+ w = SsmlW.new(words: words, role: role, **keyword_args)
855
+
856
+ yield(w) if block_given?
857
+ append(w)
858
+ end
859
+ end
860
+
861
+ ##
862
+ # Adding A Pause Between Sentences in <Say>
863
+ class SsmlS < TwiML
864
+ def initialize(words: nil, **keyword_args)
865
+ super(**keyword_args)
866
+ @name = 's'
867
+ @value = words unless words.nil?
868
+ yield(self) if block_given?
869
+ end
870
+
871
+ ##
872
+ # Create a new <Break> element
873
+ # strength:: Set a pause based on strength
874
+ # time:: Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms
875
+ # keyword_args:: additional attributes
876
+ def break(strength: nil, time: nil, **keyword_args)
877
+ append(SsmlBreak.new(strength: strength, time: time, **keyword_args))
878
+ end
879
+
880
+ ##
881
+ # Create a new <Emphasis> element
882
+ # words:: Words to emphasize
883
+ # level:: Specify the degree of emphasis
884
+ # keyword_args:: additional attributes
885
+ def emphasis(words: nil, level: nil, **keyword_args)
886
+ emphasis = SsmlEmphasis.new(words: words, level: level, **keyword_args)
887
+
888
+ yield(emphasis) if block_given?
889
+ append(emphasis)
890
+ end
891
+
892
+ ##
893
+ # Create a new <Lang> element
894
+ # words:: Words to speak
895
+ # xmlLang:: Specify the language
896
+ # keyword_args:: additional attributes
897
+ def lang(words: nil, xmlLang: nil, **keyword_args)
898
+ lang = SsmlLang.new(words: words, xmlLang: xmlLang, **keyword_args)
899
+
900
+ yield(lang) if block_given?
901
+ append(lang)
902
+ end
903
+
904
+ ##
905
+ # Create a new <Phoneme> element
906
+ # words:: Words to speak
907
+ # alphabet:: Specify the phonetic alphabet
908
+ # ph:: Specifiy the phonetic symbols for pronunciation
909
+ # keyword_args:: additional attributes
910
+ def phoneme(words, alphabet: nil, ph: nil, **keyword_args)
911
+ append(SsmlPhoneme.new(words, alphabet: alphabet, ph: ph, **keyword_args))
912
+ end
913
+
914
+ ##
915
+ # Create a new <Prosody> element
916
+ # words:: Words to speak
917
+ # volume:: Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB
918
+ # rate:: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
919
+ # pitch:: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
920
+ # keyword_args:: additional attributes
921
+ def prosody(words: nil, volume: nil, rate: nil, pitch: nil, **keyword_args)
922
+ prosody = SsmlProsody.new(words: words, volume: volume, rate: rate, pitch: pitch, **keyword_args)
923
+
924
+ yield(prosody) if block_given?
925
+ append(prosody)
926
+ end
927
+
928
+ ##
929
+ # Create a new <Say-As> element
930
+ # words:: Words to be interpreted
931
+ # interpretAs:: Specify the type of words are spoken
932
+ # role:: Specify the format of the date when interpret-as is set to date
933
+ # keyword_args:: additional attributes
934
+ def say_as(words, interpretAs: nil, role: nil, **keyword_args)
935
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
936
+ end
937
+
938
+ ##
939
+ # Create a new <Sub> element
940
+ # words:: Words to be substituted
941
+ # aliasAttribute:: Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation
942
+ # keyword_args:: additional attributes
943
+ def sub(words, aliasAttribute: nil, **keyword_args)
944
+ append(SsmlSub.new(words, aliasAttribute: aliasAttribute, **keyword_args))
945
+ end
946
+
947
+ ##
948
+ # Create a new <W> element
949
+ # words:: Words to speak
950
+ # role:: Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning
951
+ # keyword_args:: additional attributes
952
+ def w(words: nil, role: nil, **keyword_args)
953
+ w = SsmlW.new(words: words, role: role, **keyword_args)
954
+
955
+ yield(w) if block_given?
956
+ append(w)
957
+ end
958
+ end
959
+
960
+ ##
961
+ # Using Phonetic Pronunciation in <Say>
962
+ class SsmlPhoneme < TwiML
963
+ def initialize(words, **keyword_args)
964
+ super(**keyword_args)
965
+ @name = 'phoneme'
966
+ @value = words
967
+ yield(self) if block_given?
968
+ end
969
+ end
970
+
971
+ ##
972
+ # Specifying Another Language for Specific Words in <Say>
973
+ class SsmlLang < TwiML
974
+ def initialize(words: nil, **keyword_args)
975
+ super(**keyword_args)
976
+ @name = 'lang'
977
+ @value = words unless words.nil?
978
+ yield(self) if block_given?
979
+ end
980
+
981
+ ##
982
+ # Create a new <Break> element
983
+ # strength:: Set a pause based on strength
984
+ # time:: Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms
985
+ # keyword_args:: additional attributes
986
+ def break(strength: nil, time: nil, **keyword_args)
987
+ append(SsmlBreak.new(strength: strength, time: time, **keyword_args))
988
+ end
989
+
990
+ ##
991
+ # Create a new <Emphasis> element
992
+ # words:: Words to emphasize
993
+ # level:: Specify the degree of emphasis
994
+ # keyword_args:: additional attributes
995
+ def emphasis(words: nil, level: nil, **keyword_args)
996
+ emphasis = SsmlEmphasis.new(words: words, level: level, **keyword_args)
997
+
998
+ yield(emphasis) if block_given?
999
+ append(emphasis)
548
1000
  end
549
1001
 
550
1002
  ##
@@ -552,16 +1004,22 @@ module Twilio
552
1004
  # words:: Words to speak
553
1005
  # xmlLang:: Specify the language
554
1006
  # keyword_args:: additional attributes
555
- def lang(words, xmlLang: nil, **keyword_args)
556
- append(SsmlLang.new(words, xmlLang: xmlLang, **keyword_args))
1007
+ def lang(words: nil, xmlLang: nil, **keyword_args)
1008
+ lang = SsmlLang.new(words: words, xmlLang: xmlLang, **keyword_args)
1009
+
1010
+ yield(lang) if block_given?
1011
+ append(lang)
557
1012
  end
558
1013
 
559
1014
  ##
560
1015
  # Create a new <P> element
561
1016
  # words:: Words to speak
562
1017
  # keyword_args:: additional attributes
563
- def p(words, **keyword_args)
564
- append(SsmlP.new(words, **keyword_args))
1018
+ def p(words: nil, **keyword_args)
1019
+ p = SsmlP.new(words: words, **keyword_args)
1020
+
1021
+ yield(p) if block_given?
1022
+ append(p)
565
1023
  end
566
1024
 
567
1025
  ##
@@ -581,16 +1039,22 @@ module Twilio
581
1039
  # rate:: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
582
1040
  # pitch:: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
583
1041
  # keyword_args:: additional attributes
584
- def prosody(words, volume: nil, rate: nil, pitch: nil, **keyword_args)
585
- append(SsmlProsody.new(words, volume: volume, rate: rate, pitch: pitch, **keyword_args))
1042
+ def prosody(words: nil, volume: nil, rate: nil, pitch: nil, **keyword_args)
1043
+ prosody = SsmlProsody.new(words: words, volume: volume, rate: rate, pitch: pitch, **keyword_args)
1044
+
1045
+ yield(prosody) if block_given?
1046
+ append(prosody)
586
1047
  end
587
1048
 
588
1049
  ##
589
1050
  # Create a new <S> element
590
1051
  # words:: Words to speak
591
1052
  # keyword_args:: additional attributes
592
- def s(words, **keyword_args)
593
- append(SsmlS.new(words, **keyword_args))
1053
+ def s(words: nil, **keyword_args)
1054
+ s = SsmlS.new(words: words, **keyword_args)
1055
+
1056
+ yield(s) if block_given?
1057
+ append(s)
594
1058
  end
595
1059
 
596
1060
  ##
@@ -617,108 +1081,221 @@ module Twilio
617
1081
  # words:: Words to speak
618
1082
  # role:: Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning
619
1083
  # keyword_args:: additional attributes
620
- def w(words, role: nil, **keyword_args)
621
- append(SsmlW.new(words, role: role, **keyword_args))
1084
+ def w(words: nil, role: nil, **keyword_args)
1085
+ w = SsmlW.new(words: words, role: role, **keyword_args)
1086
+
1087
+ yield(w) if block_given?
1088
+ append(w)
622
1089
  end
623
1090
  end
624
1091
 
625
1092
  ##
626
- # Improving Pronunciation by Specifying Parts of Speech in <Say>
627
- class SsmlW < TwiML
628
- def initialize(words, **keyword_args)
1093
+ # Adding a Pause Between Paragraphs in <Say>
1094
+ class SsmlP < TwiML
1095
+ def initialize(words: nil, **keyword_args)
629
1096
  super(**keyword_args)
630
- @name = 'w'
631
- @value = words
1097
+ @name = 'p'
1098
+ @value = words unless words.nil?
632
1099
  yield(self) if block_given?
633
1100
  end
634
- end
635
1101
 
636
- ##
637
- # Pronouncing Acronyms and Abbreviations in <Say>
638
- class SsmlSub < TwiML
639
- def initialize(words, **keyword_args)
640
- super(**keyword_args)
641
- @name = 'sub'
642
- @value = words
643
- yield(self) if block_given?
1102
+ ##
1103
+ # Create a new <Break> element
1104
+ # strength:: Set a pause based on strength
1105
+ # time:: Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms
1106
+ # keyword_args:: additional attributes
1107
+ def break(strength: nil, time: nil, **keyword_args)
1108
+ append(SsmlBreak.new(strength: strength, time: time, **keyword_args))
644
1109
  end
645
- end
646
1110
 
647
- ##
648
- # Controlling How Special Types of Words Are Spoken in <Say>
649
- class SsmlSayAs < TwiML
650
- def initialize(words, **keyword_args)
651
- super(**keyword_args)
652
- @name = 'say-as'
653
- @value = words
654
- yield(self) if block_given?
1111
+ ##
1112
+ # Create a new <Emphasis> element
1113
+ # words:: Words to emphasize
1114
+ # level:: Specify the degree of emphasis
1115
+ # keyword_args:: additional attributes
1116
+ def emphasis(words: nil, level: nil, **keyword_args)
1117
+ emphasis = SsmlEmphasis.new(words: words, level: level, **keyword_args)
1118
+
1119
+ yield(emphasis) if block_given?
1120
+ append(emphasis)
655
1121
  end
656
- end
657
1122
 
658
- ##
659
- # Adding A Pause Between Sentences in <Say>
660
- class SsmlS < TwiML
661
- def initialize(words, **keyword_args)
662
- super(**keyword_args)
663
- @name = 's'
664
- @value = words
665
- yield(self) if block_given?
1123
+ ##
1124
+ # Create a new <Lang> element
1125
+ # words:: Words to speak
1126
+ # xmlLang:: Specify the language
1127
+ # keyword_args:: additional attributes
1128
+ def lang(words: nil, xmlLang: nil, **keyword_args)
1129
+ lang = SsmlLang.new(words: words, xmlLang: xmlLang, **keyword_args)
1130
+
1131
+ yield(lang) if block_given?
1132
+ append(lang)
666
1133
  end
667
- end
668
1134
 
669
- ##
670
- # Controling Volume, Speaking Rate, and Pitch in <Say>
671
- class SsmlProsody < TwiML
672
- def initialize(words, **keyword_args)
673
- super(**keyword_args)
674
- @name = 'prosody'
675
- @value = words
676
- yield(self) if block_given?
1135
+ ##
1136
+ # Create a new <Phoneme> element
1137
+ # words:: Words to speak
1138
+ # alphabet:: Specify the phonetic alphabet
1139
+ # ph:: Specifiy the phonetic symbols for pronunciation
1140
+ # keyword_args:: additional attributes
1141
+ def phoneme(words, alphabet: nil, ph: nil, **keyword_args)
1142
+ append(SsmlPhoneme.new(words, alphabet: alphabet, ph: ph, **keyword_args))
677
1143
  end
678
- end
679
1144
 
680
- ##
681
- # Using Phonetic Pronunciation in <Say>
682
- class SsmlPhoneme < TwiML
683
- def initialize(words, **keyword_args)
684
- super(**keyword_args)
685
- @name = 'phoneme'
686
- @value = words
687
- yield(self) if block_given?
1145
+ ##
1146
+ # Create a new <Prosody> element
1147
+ # words:: Words to speak
1148
+ # volume:: Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB
1149
+ # rate:: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
1150
+ # pitch:: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
1151
+ # keyword_args:: additional attributes
1152
+ def prosody(words: nil, volume: nil, rate: nil, pitch: nil, **keyword_args)
1153
+ prosody = SsmlProsody.new(words: words, volume: volume, rate: rate, pitch: pitch, **keyword_args)
1154
+
1155
+ yield(prosody) if block_given?
1156
+ append(prosody)
688
1157
  end
689
- end
690
1158
 
691
- ##
692
- # Adding a Pause Between Paragraphs in <Say>
693
- class SsmlP < TwiML
694
- def initialize(words, **keyword_args)
695
- super(**keyword_args)
696
- @name = 'p'
697
- @value = words
698
- yield(self) if block_given?
1159
+ ##
1160
+ # Create a new <S> element
1161
+ # words:: Words to speak
1162
+ # keyword_args:: additional attributes
1163
+ def s(words: nil, **keyword_args)
1164
+ s = SsmlS.new(words: words, **keyword_args)
1165
+
1166
+ yield(s) if block_given?
1167
+ append(s)
699
1168
  end
700
- end
701
1169
 
702
- ##
703
- # Specifying Another Language for Specific Words in <Say>
704
- class SsmlLang < TwiML
705
- def initialize(words, **keyword_args)
706
- super(**keyword_args)
707
- @name = 'lang'
708
- @value = words
709
- yield(self) if block_given?
1170
+ ##
1171
+ # Create a new <Say-As> element
1172
+ # words:: Words to be interpreted
1173
+ # interpretAs:: Specify the type of words are spoken
1174
+ # role:: Specify the format of the date when interpret-as is set to date
1175
+ # keyword_args:: additional attributes
1176
+ def say_as(words, interpretAs: nil, role: nil, **keyword_args)
1177
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
1178
+ end
1179
+
1180
+ ##
1181
+ # Create a new <Sub> element
1182
+ # words:: Words to be substituted
1183
+ # aliasAttribute:: Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation
1184
+ # keyword_args:: additional attributes
1185
+ def sub(words, aliasAttribute: nil, **keyword_args)
1186
+ append(SsmlSub.new(words, aliasAttribute: aliasAttribute, **keyword_args))
1187
+ end
1188
+
1189
+ ##
1190
+ # Create a new <W> element
1191
+ # words:: Words to speak
1192
+ # role:: Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning
1193
+ # keyword_args:: additional attributes
1194
+ def w(words: nil, role: nil, **keyword_args)
1195
+ w = SsmlW.new(words: words, role: role, **keyword_args)
1196
+
1197
+ yield(w) if block_given?
1198
+ append(w)
710
1199
  end
711
1200
  end
712
1201
 
713
1202
  ##
714
1203
  # Emphasizing Words in <Say>
715
1204
  class SsmlEmphasis < TwiML
716
- def initialize(words, **keyword_args)
1205
+ def initialize(words: nil, **keyword_args)
717
1206
  super(**keyword_args)
718
1207
  @name = 'emphasis'
719
- @value = words
1208
+ @value = words unless words.nil?
720
1209
  yield(self) if block_given?
721
1210
  end
1211
+
1212
+ ##
1213
+ # Create a new <Break> element
1214
+ # strength:: Set a pause based on strength
1215
+ # time:: Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms
1216
+ # keyword_args:: additional attributes
1217
+ def break(strength: nil, time: nil, **keyword_args)
1218
+ append(SsmlBreak.new(strength: strength, time: time, **keyword_args))
1219
+ end
1220
+
1221
+ ##
1222
+ # Create a new <Emphasis> element
1223
+ # words:: Words to emphasize
1224
+ # level:: Specify the degree of emphasis
1225
+ # keyword_args:: additional attributes
1226
+ def emphasis(words: nil, level: nil, **keyword_args)
1227
+ emphasis = SsmlEmphasis.new(words: words, level: level, **keyword_args)
1228
+
1229
+ yield(emphasis) if block_given?
1230
+ append(emphasis)
1231
+ end
1232
+
1233
+ ##
1234
+ # Create a new <Lang> element
1235
+ # words:: Words to speak
1236
+ # xmlLang:: Specify the language
1237
+ # keyword_args:: additional attributes
1238
+ def lang(words: nil, xmlLang: nil, **keyword_args)
1239
+ lang = SsmlLang.new(words: words, xmlLang: xmlLang, **keyword_args)
1240
+
1241
+ yield(lang) if block_given?
1242
+ append(lang)
1243
+ end
1244
+
1245
+ ##
1246
+ # Create a new <Phoneme> element
1247
+ # words:: Words to speak
1248
+ # alphabet:: Specify the phonetic alphabet
1249
+ # ph:: Specifiy the phonetic symbols for pronunciation
1250
+ # keyword_args:: additional attributes
1251
+ def phoneme(words, alphabet: nil, ph: nil, **keyword_args)
1252
+ append(SsmlPhoneme.new(words, alphabet: alphabet, ph: ph, **keyword_args))
1253
+ end
1254
+
1255
+ ##
1256
+ # Create a new <Prosody> element
1257
+ # words:: Words to speak
1258
+ # volume:: Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB
1259
+ # rate:: Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
1260
+ # pitch:: Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
1261
+ # keyword_args:: additional attributes
1262
+ def prosody(words: nil, volume: nil, rate: nil, pitch: nil, **keyword_args)
1263
+ prosody = SsmlProsody.new(words: words, volume: volume, rate: rate, pitch: pitch, **keyword_args)
1264
+
1265
+ yield(prosody) if block_given?
1266
+ append(prosody)
1267
+ end
1268
+
1269
+ ##
1270
+ # Create a new <Say-As> element
1271
+ # words:: Words to be interpreted
1272
+ # interpretAs:: Specify the type of words are spoken
1273
+ # role:: Specify the format of the date when interpret-as is set to date
1274
+ # keyword_args:: additional attributes
1275
+ def say_as(words, interpretAs: nil, role: nil, **keyword_args)
1276
+ append(SsmlSayAs.new(words, interpretAs: interpretAs, role: role, **keyword_args))
1277
+ end
1278
+
1279
+ ##
1280
+ # Create a new <Sub> element
1281
+ # words:: Words to be substituted
1282
+ # aliasAttribute:: Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation
1283
+ # keyword_args:: additional attributes
1284
+ def sub(words, aliasAttribute: nil, **keyword_args)
1285
+ append(SsmlSub.new(words, aliasAttribute: aliasAttribute, **keyword_args))
1286
+ end
1287
+
1288
+ ##
1289
+ # Create a new <W> element
1290
+ # words:: Words to speak
1291
+ # role:: Customize the pronunciation of words by specifying the word’s part of speech or alternate meaning
1292
+ # keyword_args:: additional attributes
1293
+ def w(words: nil, role: nil, **keyword_args)
1294
+ w = SsmlW.new(words: words, role: role, **keyword_args)
1295
+
1296
+ yield(w) if block_given?
1297
+ append(w)
1298
+ end
722
1299
  end
723
1300
 
724
1301
  ##
@@ -858,7 +1435,7 @@ module Twilio
858
1435
  # message:: Message to say
859
1436
  # voice:: Voice to use
860
1437
  # loop:: Times to loop message
861
- # language:: Message langauge
1438
+ # language:: Message language
862
1439
  # keyword_args:: additional attributes
863
1440
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
864
1441
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -1166,9 +1743,43 @@ module Twilio
1166
1743
  # language:: Language to be used by Dialogflow to transcribe speech
1167
1744
  # sentiment_analysis:: Whether sentiment analysis needs to be enabled or not
1168
1745
  # status_callback:: URL to post status callbacks from Twilio
1746
+ # status_callback_method:: HTTP method to use when requesting the status callback URL
1747
+ # keyword_args:: additional attributes
1748
+ def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
1749
+ 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)
1750
+
1751
+ yield(virtual_agent) if block_given?
1752
+ append(virtual_agent)
1753
+ end
1754
+
1755
+ ##
1756
+ # Create a new <Conversation> element
1757
+ # service_instance_sid:: Service instance Sid
1758
+ # inbound_autocreation:: Inbound autocreation
1759
+ # routing_assignment_timeout:: Routing assignment timeout
1760
+ # inbound_timeout:: Inbound timeout
1761
+ # record:: Record
1762
+ # trim:: Trim
1763
+ # recording_status_callback:: Recording status callback URL
1764
+ # recording_status_callback_method:: Recording status callback URL method
1765
+ # recording_status_callback_event:: Recording status callback events
1766
+ # status_callback:: Status callback URL
1767
+ # status_callback_method:: Status callback URL method
1768
+ # status_callback_event:: Events to call status callback URL
1169
1769
  # keyword_args:: additional attributes
1170
- def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, **keyword_args)
1171
- append(VirtualAgent.new(connector_name: connector_name, language: language, sentiment_analysis: sentiment_analysis, status_callback: status_callback, **keyword_args))
1770
+ 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)
1771
+ 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))
1772
+ end
1773
+ end
1774
+
1775
+ ##
1776
+ # <Conversation> TwiML Noun
1777
+ class Conversation < TwiML
1778
+ def initialize(**keyword_args)
1779
+ super(**keyword_args)
1780
+ @name = 'Conversation'
1781
+
1782
+ yield(self) if block_given?
1172
1783
  end
1173
1784
  end
1174
1785
 
@@ -1181,6 +1792,35 @@ module Twilio
1181
1792
 
1182
1793
  yield(self) if block_given?
1183
1794
  end
1795
+
1796
+ ##
1797
+ # Create a new <Config> element
1798
+ # name:: The name of the custom config
1799
+ # value:: The value of the custom config
1800
+ # keyword_args:: additional attributes
1801
+ def config(name: nil, value: nil, **keyword_args)
1802
+ append(Config.new(name: name, value: value, **keyword_args))
1803
+ end
1804
+
1805
+ ##
1806
+ # Create a new <Parameter> element
1807
+ # name:: The name of the custom parameter
1808
+ # value:: The value of the custom parameter
1809
+ # keyword_args:: additional attributes
1810
+ def parameter(name: nil, value: nil, **keyword_args)
1811
+ append(Parameter.new(name: name, value: value, **keyword_args))
1812
+ end
1813
+ end
1814
+
1815
+ ##
1816
+ # <Config> TwiML Noun
1817
+ class Config < TwiML
1818
+ def initialize(**keyword_args)
1819
+ super(**keyword_args)
1820
+ @name = 'Config'
1821
+
1822
+ yield(self) if block_given?
1823
+ end
1184
1824
  end
1185
1825
 
1186
1826
  ##