diff --git a/src/Twilio/TwiML/FaxResponse.cs b/src/Twilio/TwiML/FaxResponse.cs
index a313eaa66..40e49abfd 100644
--- a/src/Twilio/TwiML/FaxResponse.cs
+++ b/src/Twilio/TwiML/FaxResponse.cs
@@ -25,17 +25,6 @@ public FaxResponse() : base("Response")
{
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Receive instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public FaxResponse Receive(Receive receive)
- {
- this.Append(receive);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -48,6 +37,17 @@ public FaxResponse Receive(Uri action = null, Twilio.Http.HttpMethod method = nu
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Receive instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public FaxResponse Receive(Receive receive)
+ {
+ this.Append(receive);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Messaging/Message.cs b/src/Twilio/TwiML/Messaging/Message.cs
index 5d1becf3c..85ffda8eb 100644
--- a/src/Twilio/TwiML/Messaging/Message.cs
+++ b/src/Twilio/TwiML/Messaging/Message.cs
@@ -104,17 +104,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Body instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Message Body(Body body)
- {
- this.Append(body);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -127,13 +116,13 @@ public Message Body(string message = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Media instance.
+ /// A Body instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Message Media(Media media)
+ public Message Body(Body body)
{
- this.Append(media);
+ this.Append(body);
return this;
}
@@ -148,6 +137,17 @@ public Message Media(Uri url = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Media instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Message Media(Media media)
+ {
+ this.Append(media);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/MessagingResponse.cs b/src/Twilio/TwiML/MessagingResponse.cs
index 93b4439c3..ef6d3462b 100644
--- a/src/Twilio/TwiML/MessagingResponse.cs
+++ b/src/Twilio/TwiML/MessagingResponse.cs
@@ -25,17 +25,6 @@ public MessagingResponse() : base("Response")
{
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Message instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public MessagingResponse Message(Message message)
- {
- this.Append(message);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -58,13 +47,13 @@ public MessagingResponse Message(string body = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Redirect instance.
+ /// A Message instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public MessagingResponse Redirect(Redirect redirect)
+ public MessagingResponse Message(Message message)
{
- this.Append(redirect);
+ this.Append(message);
return this;
}
@@ -80,6 +69,17 @@ public MessagingResponse Redirect(Uri url = null, Twilio.Http.HttpMethod method
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Redirect instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public MessagingResponse Redirect(Redirect redirect)
+ {
+ this.Append(redirect);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Client.cs b/src/Twilio/TwiML/Voice/Client.cs
index 13bca85dc..7096b05db 100644
--- a/src/Twilio/TwiML/Voice/Client.cs
+++ b/src/Twilio/TwiML/Voice/Client.cs
@@ -121,17 +121,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Identity instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Client Identity(Identity identity)
- {
- this.Append(identity);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -144,13 +133,13 @@ public Client Identity(string clientIdentity = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Parameter instance.
+ /// A Identity instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Client Parameter(Parameter parameter)
+ public Client Identity(Identity identity)
{
- this.Append(parameter);
+ this.Append(identity);
return this;
}
@@ -166,6 +155,17 @@ public Client Parameter(string name = null, string value = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Parameter instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Client Parameter(Parameter parameter)
+ {
+ this.Append(parameter);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Connect.cs b/src/Twilio/TwiML/Voice/Connect.cs
index d48498914..475791e2a 100644
--- a/src/Twilio/TwiML/Voice/Connect.cs
+++ b/src/Twilio/TwiML/Voice/Connect.cs
@@ -55,17 +55,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Room instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Connect Room(Room room)
- {
- this.Append(room);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -79,13 +68,13 @@ public Connect Room(string name = null, string participantIdentity = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Autopilot instance.
+ /// A Room instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Connect Autopilot(Autopilot autopilot)
+ public Connect Room(Room room)
{
- this.Append(autopilot);
+ this.Append(room);
return this;
}
@@ -101,13 +90,13 @@ public Connect Autopilot(string name = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Stream instance.
+ /// A Autopilot instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Connect Stream(Stream stream)
+ public Connect Autopilot(Autopilot autopilot)
{
- this.Append(stream);
+ this.Append(autopilot);
return this;
}
@@ -128,6 +117,17 @@ public Connect Stream(string name = null,
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Stream instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Connect Stream(Stream stream)
+ {
+ this.Append(stream);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Dial.cs b/src/Twilio/TwiML/Voice/Dial.cs
index e5efca0e3..1d3379cfa 100644
--- a/src/Twilio/TwiML/Voice/Dial.cs
+++ b/src/Twilio/TwiML/Voice/Dial.cs
@@ -290,17 +290,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Client instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Dial Client(Client client)
- {
- this.Append(client);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -330,13 +319,13 @@ public Dial Client(string identity = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Conference instance.
+ /// A Client instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Dial Conference(Conference conference)
+ public Dial Client(Client client)
{
- this.Append(conference);
+ this.Append(client);
return this;
}
@@ -408,13 +397,13 @@ public Dial Conference(string name = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Number instance.
+ /// A Conference instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Dial Number(Number number)
+ public Dial Conference(Conference conference)
{
- this.Append(number);
+ this.Append(conference);
return this;
}
@@ -450,13 +439,13 @@ public Dial Number(Types.PhoneNumber phoneNumber = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Queue instance.
+ /// A Number instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Dial Queue(Queue queue)
+ public Dial Number(Number number)
{
- this.Append(queue);
+ this.Append(number);
return this;
}
@@ -480,13 +469,13 @@ public Dial Queue(string name = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Sim instance.
+ /// A Queue instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Dial Sim(Sim sim)
+ public Dial Queue(Queue queue)
{
- this.Append(sim);
+ this.Append(queue);
return this;
}
@@ -502,13 +491,13 @@ public Dial Sim(string simSid = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Sip instance.
+ /// A Sim instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Dial Sip(Sip sip)
+ public Dial Sim(Sim sim)
{
- this.Append(sip);
+ this.Append(sim);
return this;
}
@@ -546,6 +535,17 @@ public Dial Sip(Uri sipUrl = null,
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Sip instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Dial Sip(Sip sip)
+ {
+ this.Append(sip);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Enqueue.cs b/src/Twilio/TwiML/Voice/Enqueue.cs
index 5cfbe4419..ab678c7bb 100644
--- a/src/Twilio/TwiML/Voice/Enqueue.cs
+++ b/src/Twilio/TwiML/Voice/Enqueue.cs
@@ -104,17 +104,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Task instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Enqueue Task(Task task)
- {
- this.Append(task);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -129,6 +118,17 @@ public Enqueue Task(string body = null, int? priority = null, int? timeout = nul
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Task instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Enqueue Task(Task task)
+ {
+ this.Append(task);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Gather.cs b/src/Twilio/TwiML/Voice/Gather.cs
index c5a1f8d26..292b6f3cc 100644
--- a/src/Twilio/TwiML/Voice/Gather.cs
+++ b/src/Twilio/TwiML/Voice/Gather.cs
@@ -356,17 +356,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Say instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Gather Say(Say say)
- {
- this.Append(say);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -385,13 +374,13 @@ public Gather Say(string message = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Pause instance.
+ /// A Say instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Gather Pause(Pause pause)
+ public Gather Say(Say say)
{
- this.Append(pause);
+ this.Append(say);
return this;
}
@@ -407,13 +396,13 @@ public Gather Pause(int? length = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Play instance.
+ /// A Pause instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Gather Play(Play play)
+ public Gather Pause(Pause pause)
{
- this.Append(play);
+ this.Append(pause);
return this;
}
@@ -430,6 +419,17 @@ public Gather Play(Uri url = null, int? loop = null, string digits = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Play instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Gather Play(Play play)
+ {
+ this.Append(play);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Pay.cs b/src/Twilio/TwiML/Voice/Pay.cs
index abdf7073f..534aa70b9 100644
--- a/src/Twilio/TwiML/Voice/Pay.cs
+++ b/src/Twilio/TwiML/Voice/Pay.cs
@@ -348,17 +348,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Prompt instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Pay Prompt(Prompt prompt)
- {
- this.Append(prompt);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -377,13 +366,13 @@ public Pay Prompt(Prompt.ForEnum for_ = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Parameter instance.
+ /// A Prompt instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Pay Parameter(Parameter parameter)
+ public Pay Prompt(Prompt prompt)
{
- this.Append(parameter);
+ this.Append(prompt);
return this;
}
@@ -399,6 +388,17 @@ public Pay Parameter(string name = null, string value = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Parameter instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Pay Parameter(Parameter parameter)
+ {
+ this.Append(parameter);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Prompt.cs b/src/Twilio/TwiML/Voice/Prompt.cs
index f7c5f71e8..261213d43 100644
--- a/src/Twilio/TwiML/Voice/Prompt.cs
+++ b/src/Twilio/TwiML/Voice/Prompt.cs
@@ -135,17 +135,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Say instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Prompt Say(Say say)
- {
- this.Append(say);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -164,13 +153,13 @@ public Prompt Say(string message = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Play instance.
+ /// A Say instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Prompt Play(Play play)
+ public Prompt Say(Say say)
{
- this.Append(play);
+ this.Append(say);
return this;
}
@@ -188,13 +177,13 @@ public Prompt Play(Uri url = null, int? loop = null, string digits = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Pause instance.
+ /// A Play instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Prompt Pause(Pause pause)
+ public Prompt Play(Play play)
{
- this.Append(pause);
+ this.Append(play);
return this;
}
@@ -209,6 +198,17 @@ public Prompt Pause(int? length = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Pause instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Prompt Pause(Pause pause)
+ {
+ this.Append(pause);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Refer.cs b/src/Twilio/TwiML/Voice/Refer.cs
index 39f9f2af0..5a708d763 100644
--- a/src/Twilio/TwiML/Voice/Refer.cs
+++ b/src/Twilio/TwiML/Voice/Refer.cs
@@ -55,6 +55,17 @@ protected override List GetElementAttributes()
return attributes;
}
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// SIP URL, the body of the TwiML Element.
+ public Refer Sip(Uri sipUrl = null)
+ {
+ var newChild = new ReferSip(sipUrl);
+ this.Append(newChild);
+ return this;
+ }
+
///
/// Append a element as a child of this element
///
@@ -70,11 +81,10 @@ public Refer ReferSip(ReferSip referSip)
/// Create a new element and append it as a child of this element.
///
/// SIP URL, the body of the TwiML Element.
+ [System.Obsolete("This method is deprecated, use .Sip() instead.")]
public Refer ReferSip(Uri sipUrl = null)
{
- var newChild = new ReferSip(sipUrl);
- this.Append(newChild);
- return this;
+ return Sip(sipUrl);
}
///
diff --git a/src/Twilio/TwiML/Voice/Say.cs b/src/Twilio/TwiML/Voice/Say.cs
index f09d55666..ed239d77d 100644
--- a/src/Twilio/TwiML/Voice/Say.cs
+++ b/src/Twilio/TwiML/Voice/Say.cs
@@ -198,6 +198,19 @@ protected override List GetElementAttributes()
return attributes;
}
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Set a pause based on strength
+ /// Set a pause to a specific length of time in seconds or milliseconds, available values:
+ /// [number]s, [number]ms
+ public Say Break(SsmlBreak.StrengthEnum strength = null, string time = null)
+ {
+ var newChild = new SsmlBreak(strength, time);
+ this.Append(newChild);
+ return this;
+ }
+
///
/// Append a element as a child of this element
///
@@ -215,9 +228,20 @@ public Say SsmlBreak(SsmlBreak ssmlBreak)
/// Set a pause based on strength
/// Set a pause to a specific length of time in seconds or milliseconds, available values:
/// [number]s, [number]ms
+ [System.Obsolete("This method is deprecated, use .Break() instead.")]
public Say SsmlBreak(SsmlBreak.StrengthEnum strength = null, string time = null)
{
- var newChild = new SsmlBreak(strength, time);
+ return Break(strength, time);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to emphasize, the body of the TwiML Element.
+ /// Specify the degree of emphasis
+ public Say Emphasis(string words = null, SsmlEmphasis.LevelEnum level = null)
+ {
+ var newChild = new SsmlEmphasis(words, level);
this.Append(newChild);
return this;
}
@@ -238,9 +262,20 @@ public Say SsmlEmphasis(SsmlEmphasis ssmlEmphasis)
///
/// Words to emphasize, the body of the TwiML Element.
/// Specify the degree of emphasis
+ [System.Obsolete("This method is deprecated, use .Emphasis() instead.")]
public Say SsmlEmphasis(string words = null, SsmlEmphasis.LevelEnum level = null)
{
- var newChild = new SsmlEmphasis(words, level);
+ return Emphasis(words, level);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to speak, the body of the TwiML Element.
+ /// Specify the language
+ public Say Lang(string words = null, SsmlLang.XmlLangEnum xmlLang = null)
+ {
+ var newChild = new SsmlLang(words, xmlLang);
this.Append(newChild);
return this;
}
@@ -261,9 +296,19 @@ public Say SsmlLang(SsmlLang ssmlLang)
///
/// Words to speak, the body of the TwiML Element.
/// Specify the language
+ [System.Obsolete("This method is deprecated, use .Lang() instead.")]
public Say SsmlLang(string words = null, SsmlLang.XmlLangEnum xmlLang = null)
{
- var newChild = new SsmlLang(words, xmlLang);
+ return Lang(words, xmlLang);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to speak, the body of the TwiML Element.
+ public Say P(string words = null)
+ {
+ var newChild = new SsmlP(words);
this.Append(newChild);
return this;
}
@@ -283,9 +328,21 @@ public Say SsmlP(SsmlP ssmlP)
/// Create a new element and append it as a child of this element.
///
/// Words to speak, the body of the TwiML Element.
+ [System.Obsolete("This method is deprecated, use .P() instead.")]
public Say SsmlP(string words = null)
{
- var newChild = new SsmlP(words);
+ return P(words);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to speak, the body of the TwiML Element.
+ /// Specify the phonetic alphabet
+ /// Specifiy the phonetic symbols for pronunciation
+ public Say Phoneme(string words = null, SsmlPhoneme.AlphabetEnum alphabet = null, string ph = null)
+ {
+ var newChild = new SsmlPhoneme(words, alphabet, ph);
this.Append(newChild);
return this;
}
@@ -307,9 +364,24 @@ public Say SsmlPhoneme(SsmlPhoneme ssmlPhoneme)
/// Words to speak, the body of the TwiML Element.
/// Specify the phonetic alphabet
/// Specifiy the phonetic symbols for pronunciation
+ [System.Obsolete("This method is deprecated, use .Phoneme() instead.")]
public Say SsmlPhoneme(string words = null, SsmlPhoneme.AlphabetEnum alphabet = null, string ph = null)
{
- var newChild = new SsmlPhoneme(words, alphabet, ph);
+ return Phoneme(words, alphabet, ph);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to speak, the body of the TwiML Element.
+ /// Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud,
+ /// +ndB, -ndB
+ /// Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
+ /// Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
+ ///
+ public Say Prosody(string words = null, string volume = null, string rate = null, string pitch = null)
+ {
+ var newChild = new SsmlProsody(words, volume, rate, pitch);
this.Append(newChild);
return this;
}
@@ -334,9 +406,19 @@ public Say SsmlProsody(SsmlProsody ssmlProsody)
/// Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%
/// Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%
///
+ [System.Obsolete("This method is deprecated, use .Prosody() instead.")]
public Say SsmlProsody(string words = null, string volume = null, string rate = null, string pitch = null)
{
- var newChild = new SsmlProsody(words, volume, rate, pitch);
+ return Prosody(words, volume, rate, pitch);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to speak, the body of the TwiML Element.
+ public Say S(string words = null)
+ {
+ var newChild = new SsmlS(words);
this.Append(newChild);
return this;
}
@@ -356,9 +438,21 @@ public Say SsmlS(SsmlS ssmlS)
/// Create a new element and append it as a child of this element.
///
/// Words to speak, the body of the TwiML Element.
+ [System.Obsolete("This method is deprecated, use .S() instead.")]
public Say SsmlS(string words = null)
{
- var newChild = new SsmlS(words);
+ return S(words);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to be interpreted, the body of the TwiML Element.
+ /// Specify the type of words are spoken
+ /// Specify the format of the date when interpret-as is set to date
+ public Say SayAs(string words = null, SsmlSayAs.InterpretAsEnum interpretAs = null, SsmlSayAs.RoleEnum role = null)
+ {
+ var newChild = new SsmlSayAs(words, interpretAs, role);
this.Append(newChild);
return this;
}
@@ -380,11 +474,23 @@ public Say SsmlSayAs(SsmlSayAs ssmlSayAs)
/// Words to be interpreted, the body of the TwiML Element.
/// Specify the type of words are spoken
/// Specify the format of the date when interpret-as is set to date
+ [System.Obsolete("This method is deprecated, use .SayAs() instead.")]
public Say SsmlSayAs(string words = null,
SsmlSayAs.InterpretAsEnum interpretAs = null,
SsmlSayAs.RoleEnum role = null)
{
- var newChild = new SsmlSayAs(words, interpretAs, role);
+ return SayAs(words, interpretAs, role);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to be substituted, the body of the TwiML Element.
+ /// Substitute a different word (or pronunciation) for selected text such as an acronym or
+ /// abbreviation
+ public Say Sub(string words = null, string alias = null)
+ {
+ var newChild = new SsmlSub(words, alias);
this.Append(newChild);
return this;
}
@@ -406,9 +512,21 @@ public Say SsmlSub(SsmlSub ssmlSub)
/// Words to be substituted, the body of the TwiML Element.
/// Substitute a different word (or pronunciation) for selected text such as an acronym or
/// abbreviation
+ [System.Obsolete("This method is deprecated, use .Sub() instead.")]
public Say SsmlSub(string words = null, string alias = null)
{
- var newChild = new SsmlSub(words, alias);
+ return Sub(words, alias);
+ }
+
+ ///
+ /// Create a new element and append it as a child of this element.
+ ///
+ /// Words to speak, the body of the TwiML Element.
+ /// Customize the pronunciation of words by specifying the word’s part of speech or alternate
+ /// meaning
+ public Say W(string words = null, string role = null)
+ {
+ var newChild = new SsmlW(words, role);
this.Append(newChild);
return this;
}
@@ -430,11 +548,10 @@ public Say SsmlW(SsmlW ssmlW)
/// Words to speak, the body of the TwiML Element.
/// Customize the pronunciation of words by specifying the word’s part of speech or alternate
/// meaning
+ [System.Obsolete("This method is deprecated, use .W() instead.")]
public Say SsmlW(string words = null, string role = null)
{
- var newChild = new SsmlW(words, role);
- this.Append(newChild);
- return this;
+ return W(words, role);
}
///
diff --git a/src/Twilio/TwiML/Voice/Siprec.cs b/src/Twilio/TwiML/Voice/Siprec.cs
index bda506c09..8287e84ff 100644
--- a/src/Twilio/TwiML/Voice/Siprec.cs
+++ b/src/Twilio/TwiML/Voice/Siprec.cs
@@ -53,17 +53,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Parameter instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Siprec Parameter(Parameter parameter)
- {
- this.Append(parameter);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -76,6 +65,17 @@ public Siprec Parameter(string name = null, string value = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Parameter instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Siprec Parameter(Parameter parameter)
+ {
+ this.Append(parameter);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Start.cs b/src/Twilio/TwiML/Voice/Start.cs
index c23d6e396..e67cb389a 100644
--- a/src/Twilio/TwiML/Voice/Start.cs
+++ b/src/Twilio/TwiML/Voice/Start.cs
@@ -55,17 +55,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Stream instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Start Stream(Stream stream)
- {
- this.Append(stream);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -84,13 +73,13 @@ public Start Stream(string name = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Siprec instance.
+ /// A Stream instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Start Siprec(Siprec siprec)
+ public Start Stream(Stream stream)
{
- this.Append(siprec);
+ this.Append(stream);
return this;
}
@@ -106,6 +95,17 @@ public Start Siprec(string name = null, string connectorName = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Siprec instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Start Siprec(Siprec siprec)
+ {
+ this.Append(siprec);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Stop.cs b/src/Twilio/TwiML/Voice/Stop.cs
index a647f6137..4e03953e3 100644
--- a/src/Twilio/TwiML/Voice/Stop.cs
+++ b/src/Twilio/TwiML/Voice/Stop.cs
@@ -22,17 +22,6 @@ public Stop() : base("Stop")
{
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Stream instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Stop Stream(Stream stream)
- {
- this.Append(stream);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -48,13 +37,13 @@ public Stop Stream(string name = null, string connectorName = null, string url =
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Siprec instance.
+ /// A Stream instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Stop Siprec(Siprec siprec)
+ public Stop Stream(Stream stream)
{
- this.Append(siprec);
+ this.Append(stream);
return this;
}
@@ -70,6 +59,17 @@ public Stop Siprec(string name = null, string connectorName = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Siprec instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Stop Siprec(Siprec siprec)
+ {
+ this.Append(siprec);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/Voice/Stream.cs b/src/Twilio/TwiML/Voice/Stream.cs
index b005a5670..461acbcde 100644
--- a/src/Twilio/TwiML/Voice/Stream.cs
+++ b/src/Twilio/TwiML/Voice/Stream.cs
@@ -92,17 +92,6 @@ protected override List GetElementAttributes()
return attributes;
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Parameter instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public Stream Parameter(Parameter parameter)
- {
- this.Append(parameter);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -115,6 +104,17 @@ public Stream Parameter(string name = null, string value = null)
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Parameter instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public Stream Parameter(Parameter parameter)
+ {
+ this.Append(parameter);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/src/Twilio/TwiML/VoiceResponse.cs b/src/Twilio/TwiML/VoiceResponse.cs
index eb4fab13e..a5a3daeaa 100644
--- a/src/Twilio/TwiML/VoiceResponse.cs
+++ b/src/Twilio/TwiML/VoiceResponse.cs
@@ -26,17 +26,6 @@ public VoiceResponse() : base("Response")
{
}
- ///
- /// Append a element as a child of this element
- ///
- /// A Connect instance.
- [System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Connect(Connect connect)
- {
- this.Append(connect);
- return this;
- }
-
///
/// Create a new element and append it as a child of this element.
///
@@ -50,13 +39,13 @@ public VoiceResponse Connect(Uri action = null, Twilio.Http.HttpMethod method =
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Dial instance.
+ /// A Connect instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Dial(Dial dial)
+ public VoiceResponse Connect(Connect connect)
{
- this.Append(dial);
+ this.Append(connect);
return this;
}
@@ -115,13 +104,13 @@ public VoiceResponse Dial(string number = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Echo instance.
+ /// A Dial instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Echo(Echo echo)
+ public VoiceResponse Dial(Dial dial)
{
- this.Append(echo);
+ this.Append(dial);
return this;
}
@@ -136,13 +125,13 @@ public VoiceResponse Echo()
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Enqueue instance.
+ /// A Echo instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Enqueue(Enqueue enqueue)
+ public VoiceResponse Echo(Echo echo)
{
- this.Append(enqueue);
+ this.Append(echo);
return this;
}
@@ -168,13 +157,13 @@ public VoiceResponse Enqueue(string name = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Gather instance.
+ /// A Enqueue instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Gather(Gather gather)
+ public VoiceResponse Enqueue(Enqueue enqueue)
{
- this.Append(gather);
+ this.Append(enqueue);
return this;
}
@@ -238,13 +227,13 @@ public VoiceResponse Gather(List input = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Hangup instance.
+ /// A Gather instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Hangup(Hangup hangup)
+ public VoiceResponse Gather(Gather gather)
{
- this.Append(hangup);
+ this.Append(gather);
return this;
}
@@ -259,13 +248,13 @@ public VoiceResponse Hangup()
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Leave instance.
+ /// A Hangup instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Leave(Leave leave)
+ public VoiceResponse Hangup(Hangup hangup)
{
- this.Append(leave);
+ this.Append(hangup);
return this;
}
@@ -280,13 +269,13 @@ public VoiceResponse Leave()
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Pause instance.
+ /// A Leave instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Pause(Pause pause)
+ public VoiceResponse Leave(Leave leave)
{
- this.Append(pause);
+ this.Append(leave);
return this;
}
@@ -302,13 +291,13 @@ public VoiceResponse Pause(int? length = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Play instance.
+ /// A Pause instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Play(Play play)
+ public VoiceResponse Pause(Pause pause)
{
- this.Append(play);
+ this.Append(pause);
return this;
}
@@ -326,13 +315,13 @@ public VoiceResponse Play(Uri url = null, int? loop = null, string digits = null
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Queue instance.
+ /// A Play instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Queue(Queue queue)
+ public VoiceResponse Play(Play play)
{
- this.Append(queue);
+ this.Append(play);
return this;
}
@@ -356,13 +345,13 @@ public VoiceResponse Queue(string name = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Record instance.
+ /// A Queue instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Record(Record record)
+ public VoiceResponse Queue(Queue queue)
{
- this.Append(record);
+ this.Append(queue);
return this;
}
@@ -413,13 +402,13 @@ public VoiceResponse Record(Uri action = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Redirect instance.
+ /// A Record instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Redirect(Redirect redirect)
+ public VoiceResponse Record(Record record)
{
- this.Append(redirect);
+ this.Append(record);
return this;
}
@@ -436,13 +425,13 @@ public VoiceResponse Redirect(Uri url = null, Twilio.Http.HttpMethod method = nu
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Reject instance.
+ /// A Redirect instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Reject(Reject reject)
+ public VoiceResponse Redirect(Redirect redirect)
{
- this.Append(reject);
+ this.Append(redirect);
return this;
}
@@ -458,13 +447,13 @@ public VoiceResponse Reject(Reject.ReasonEnum reason = null)
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Say instance.
+ /// A Reject instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Say(Say say)
+ public VoiceResponse Reject(Reject reject)
{
- this.Append(say);
+ this.Append(reject);
return this;
}
@@ -486,13 +475,13 @@ public VoiceResponse Say(string message = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Sms instance.
+ /// A Say instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Sms(Sms sms)
+ public VoiceResponse Say(Say say)
{
- this.Append(sms);
+ this.Append(say);
return this;
}
@@ -518,13 +507,13 @@ public VoiceResponse Sms(string message = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Pay instance.
+ /// A Sms instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Pay(Pay pay)
+ public VoiceResponse Sms(Sms sms)
{
- this.Append(pay);
+ this.Append(sms);
return this;
}
@@ -595,13 +584,13 @@ public VoiceResponse Pay(Pay.InputEnum input = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Prompt instance.
+ /// A Pay instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Prompt(Prompt prompt)
+ public VoiceResponse Pay(Pay pay)
{
- this.Append(prompt);
+ this.Append(pay);
return this;
}
@@ -623,13 +612,13 @@ public VoiceResponse Prompt(Prompt.ForEnum for_ = null,
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Start instance.
+ /// A Prompt instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Start(Start start)
+ public VoiceResponse Prompt(Prompt prompt)
{
- this.Append(start);
+ this.Append(prompt);
return this;
}
@@ -646,13 +635,13 @@ public VoiceResponse Start(Uri action = null, Twilio.Http.HttpMethod method = nu
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Stop instance.
+ /// A Start instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Stop(Stop stop)
+ public VoiceResponse Start(Start start)
{
- this.Append(stop);
+ this.Append(start);
return this;
}
@@ -667,13 +656,13 @@ public VoiceResponse Stop()
}
///
- /// Append a element as a child of this element
+ /// Append a element as a child of this element
///
- /// A Refer instance.
+ /// A Stop instance.
[System.Obsolete("This method is deprecated, use .Append() instead.")]
- public VoiceResponse Refer(Refer refer)
+ public VoiceResponse Stop(Stop stop)
{
- this.Append(refer);
+ this.Append(stop);
return this;
}
@@ -689,6 +678,17 @@ public VoiceResponse Refer(Uri action = null, Twilio.Http.HttpMethod method = nu
return this;
}
+ ///
+ /// Append a element as a child of this element
+ ///
+ /// A Refer instance.
+ [System.Obsolete("This method is deprecated, use .Append() instead.")]
+ public VoiceResponse Refer(Refer refer)
+ {
+ this.Append(refer);
+ return this;
+ }
+
///
/// Append a child TwiML element to this element returning this element to allow chaining.
///
diff --git a/test/Twilio.Test/TwiML/GatherTest.cs b/test/Twilio.Test/TwiML/GatherTest.cs
index f691f7266..ae3cbcea3 100644
--- a/test/Twilio.Test/TwiML/GatherTest.cs
+++ b/test/Twilio.Test/TwiML/GatherTest.cs
@@ -73,7 +73,7 @@ public void TestNestElement()
{
var elem = new Gather();
var child = new Say();
- elem.Nest(child).SsmlBreak();
+ elem.Nest(child).Break();
Assert.AreEqual(
"" + Environment.NewLine +
diff --git a/test/Twilio.Test/TwiML/PromptTest.cs b/test/Twilio.Test/TwiML/PromptTest.cs
index 821053811..23c94ff15 100644
--- a/test/Twilio.Test/TwiML/PromptTest.cs
+++ b/test/Twilio.Test/TwiML/PromptTest.cs
@@ -61,7 +61,7 @@ public void TestNestElement()
{
var elem = new Prompt();
var child = new Say();
- elem.Nest(child).SsmlBreak();
+ elem.Nest(child).Break();
Assert.AreEqual(
"" + Environment.NewLine +
diff --git a/test/Twilio.Test/TwiML/ReferTest.cs b/test/Twilio.Test/TwiML/ReferTest.cs
index c8da3d8ae..dfe6b9746 100644
--- a/test/Twilio.Test/TwiML/ReferTest.cs
+++ b/test/Twilio.Test/TwiML/ReferTest.cs
@@ -56,7 +56,7 @@ public void TestElementWithChildren()
{
var elem = new Refer();
- elem.ReferSip(new Uri("https://example.com"));
+ elem.Sip(new Uri("https://example.com"));
Assert.AreEqual(
"" + Environment.NewLine +
diff --git a/test/Twilio.Test/TwiML/SayTest.cs b/test/Twilio.Test/TwiML/SayTest.cs
index ed76d3295..e2a0d92a1 100644
--- a/test/Twilio.Test/TwiML/SayTest.cs
+++ b/test/Twilio.Test/TwiML/SayTest.cs
@@ -56,25 +56,25 @@ public void TestElementWithChildren()
{
var elem = new Say();
- elem.SsmlBreak(SsmlBreak.StrengthEnum.None, "time");
+ elem.Break(SsmlBreak.StrengthEnum.None, "time");
- elem.SsmlEmphasis("words", SsmlEmphasis.LevelEnum.Strong);
+ elem.Emphasis("words", SsmlEmphasis.LevelEnum.Strong);
- elem.SsmlLang("words", SsmlLang.XmlLangEnum.DaDk);
+ elem.Lang("words", SsmlLang.XmlLangEnum.DaDk);
- elem.SsmlP("words");
+ elem.P("words");
- elem.SsmlPhoneme("words", SsmlPhoneme.AlphabetEnum.Ipa, "ph");
+ elem.Phoneme("words", SsmlPhoneme.AlphabetEnum.Ipa, "ph");
- elem.SsmlProsody("words", "volume", "rate", "pitch");
+ elem.Prosody("words", "volume", "rate", "pitch");
- elem.SsmlS("words");
+ elem.S("words");
- elem.SsmlSayAs("words", SsmlSayAs.InterpretAsEnum.Character, SsmlSayAs.RoleEnum.Mdy);
+ elem.SayAs("words", SsmlSayAs.InterpretAsEnum.Character, SsmlSayAs.RoleEnum.Mdy);
- elem.SsmlSub("words", "alias");
+ elem.Sub("words", "alias");
- elem.SsmlW("words", "role");
+ elem.W("words", "role");
Assert.AreEqual(
"" + Environment.NewLine +