diff --git a/CHANGES.md b/CHANGES.md
index 90f11303d..bc74cfdd1 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,30 @@
twilio-csharp Changelog
=======================
+[2023-09-21] Version 6.14.0
+---------------------------
+**Library - Chore**
+- [PR #699](https://github.com/twilio/twilio-csharp/pull/699): removing override from getparams. Thanks to [@sbansla](https://github.com/sbansla)!
+
+**Library - Fix**
+- [PR #695](https://github.com/twilio/twilio-csharp/pull/695): Added contentType and removed unused abstract function GetParam. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
+
+**Library - Feature**
+- [PR #693](https://github.com/twilio/twilio-csharp/pull/693): Added Enum file for contentType. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
+
+**Conversations**
+- Enable conversation email bindings, email address configurations and email message subjects
+
+**Flex**
+- Adding `console_errors_included` to Flex Configuration field `debugger_integrations`
+- Introducing new channel status as `inactive` in modify channel endpoint for leave functionality **(breaking change)**
+- Adding `citrix_voice_vdi` to Flex Configuration
+
+**Taskrouter**
+- Add Update Queues, Workers, Workflow Real Time Statistics API to flex-rt-data-api-v2 endpoint
+- Add Update Workspace Real Time Statistics API to flex-rt-data-api-v2 endpoint
+
+
[2023-09-07] Version 6.13.0
---------------------------
**Library - Fix**
diff --git a/src/Twilio/Clients/TwilioRestClient.cs b/src/Twilio/Clients/TwilioRestClient.cs
index 9293261f7..e81b1bceb 100644
--- a/src/Twilio/Clients/TwilioRestClient.cs
+++ b/src/Twilio/Clients/TwilioRestClient.cs
@@ -215,14 +215,14 @@ public static void ValidateSslCertificate()
///
/// Test that this application can use updated SSL certificates on
- /// api.twilio.com:8443. Generally, you'll want to use the version of this
+ /// tls-test.twilio.com:443. Generally, you'll want to use the version of this
/// function that takes no parameters unless you have a reason not to.
///
///
/// HTTP Client to use for testing the request
public static void ValidateSslCertificate(HttpClient client)
{
- Request request = new Request("GET", "api", ":8443/", null);
+ Request request = new Request("GET", "tls-test", ":443/", null);
try
{
@@ -244,7 +244,7 @@ public static void ValidateSslCertificate(HttpClient client)
catch (Exception e)
{
throw new CertificateValidationException(
- "Connection to api.twilio.com:8443 failed",
+ "Connection to tls-test.twilio.com:443 failed",
e,
request
);
diff --git a/src/Twilio/Properties/AssemblyInfo.cs b/src/Twilio/Properties/AssemblyInfo.cs
index 4d8b72a17..082ff34f4 100644
--- a/src/Twilio/Properties/AssemblyInfo.cs
+++ b/src/Twilio/Properties/AssemblyInfo.cs
@@ -10,5 +10,5 @@
internal class AssemblyInfomation
{
- public const string AssemblyInformationalVersion = "6.13.0";
+ public const string AssemblyInformationalVersion = "6.14.0";
}
diff --git a/src/Twilio/Rest/Accounts/V1/AuthTokenPromotionOptions.cs b/src/Twilio/Rest/Accounts/V1/AuthTokenPromotionOptions.cs
index 7e1aa7001..06f30454b 100644
--- a/src/Twilio/Rest/Accounts/V1/AuthTokenPromotionOptions.cs
+++ b/src/Twilio/Rest/Accounts/V1/AuthTokenPromotionOptions.cs
@@ -38,6 +38,7 @@ public List> GetParams()
return p;
}
+
}
diff --git a/src/Twilio/Rest/Accounts/V1/AuthTokenPromotionResource.cs b/src/Twilio/Rest/Accounts/V1/AuthTokenPromotionResource.cs
index 4bb1079c1..2ce1b8ebe 100644
--- a/src/Twilio/Rest/Accounts/V1/AuthTokenPromotionResource.cs
+++ b/src/Twilio/Rest/Accounts/V1/AuthTokenPromotionResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -111,6 +112,22 @@ public static AuthTokenPromotionResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
diff --git a/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.cs b/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.cs
index 1415da37f..f12247307 100644
--- a/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.cs
+++ b/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.cs
@@ -65,6 +65,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -92,6 +93,7 @@ public List> GetParams()
return p;
}
+
}
@@ -121,6 +123,7 @@ public List> GetParams()
return p;
}
+
}
@@ -145,6 +148,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -180,6 +184,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Accounts/V1/Credential/AwsResource.cs b/src/Twilio/Rest/Accounts/V1/Credential/AwsResource.cs
index 45b6b9a6b..501747936 100644
--- a/src/Twilio/Rest/Accounts/V1/Credential/AwsResource.cs
+++ b/src/Twilio/Rest/Accounts/V1/Credential/AwsResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -448,6 +449,22 @@ public static AwsResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that we created to identify the AWS resource.
diff --git a/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.cs b/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.cs
index 786f77418..b48a59d4d 100644
--- a/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.cs
+++ b/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.cs
@@ -65,6 +65,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -92,6 +93,7 @@ public List> GetParams()
return p;
}
+
}
@@ -121,6 +123,7 @@ public List> GetParams()
return p;
}
+
}
@@ -145,6 +148,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -180,6 +184,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyResource.cs b/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyResource.cs
index 8f7148726..b4f4c0fa3 100644
--- a/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyResource.cs
+++ b/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -448,6 +449,22 @@ public static PublicKeyResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the PublicKey resource.
diff --git a/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenOptions.cs b/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenOptions.cs
index 6bcd38669..223dd8a98 100644
--- a/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenOptions.cs
+++ b/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenOptions.cs
@@ -38,6 +38,7 @@ public List> GetParams()
return p;
}
+
}
@@ -56,6 +57,7 @@ public List> GetParams()
return p;
}
+
}
diff --git a/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenResource.cs b/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenResource.cs
index e4bd53cde..1d10ff2d9 100644
--- a/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenResource.cs
+++ b/src/Twilio/Rest/Accounts/V1/SecondaryAuthTokenResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -175,6 +176,22 @@ public static SecondaryAuthTokenResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberOptions.cs
index b4cdd56e3..2bd50fef2 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberOptions.cs
@@ -54,6 +54,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberResource.cs b/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberResource.cs
index b2c4bbbc8..f666dcdae 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -209,6 +210,22 @@ public static DependentPhoneNumberResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the DependentPhoneNumber resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AddressOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AddressOptions.cs
index e31d05e6f..c1c30bb51 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AddressOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AddressOptions.cs
@@ -127,6 +127,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -157,6 +158,7 @@ public List> GetParams()
return p;
}
+
}
@@ -189,6 +191,7 @@ public List> GetParams()
return p;
}
+
}
@@ -237,6 +240,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -331,6 +335,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AddressResource.cs b/src/Twilio/Rest/Api/V2010/Account/AddressResource.cs
index c47bb1b8d..2bf4a4a84 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AddressResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AddressResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -547,6 +548,22 @@ public static AddressResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/ApplicationOptions.cs b/src/Twilio/Rest/Api/V2010/Account/ApplicationOptions.cs
index d967144b7..a94ff524f 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ApplicationOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ApplicationOptions.cs
@@ -153,6 +153,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -183,6 +184,7 @@ public List> GetParams()
return p;
}
+
}
@@ -215,6 +217,7 @@ public List> GetParams()
return p;
}
+
}
@@ -249,6 +252,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -392,6 +396,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/ApplicationResource.cs b/src/Twilio/Rest/Api/V2010/Account/ApplicationResource.cs
index ddafeeb72..0fba37cd6 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ApplicationResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ApplicationResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -591,6 +592,22 @@ public static ApplicationResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppOptions.cs
index 05b863309..04523e503 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -77,6 +78,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs b/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
index 27792bd18..00c511dca 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -258,6 +259,22 @@ public static AuthorizedConnectAppResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.cs
index a4b2da644..dc5df0cad 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.cs
@@ -180,6 +180,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalResource.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalResource.cs
index feb0fb8ad..2e9e104f8 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -253,6 +254,22 @@ public static LocalResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A formatted version of the phone number.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.cs
index c080ad02d..adce6a217 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.cs
@@ -180,6 +180,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineResource.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineResource.cs
index 3668e4a3b..341c1376a 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -253,6 +254,22 @@ public static MachineToMachineResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A formatted version of the phone number.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.cs
index fb5adb50f..43b7ad010 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.cs
@@ -180,6 +180,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileResource.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileResource.cs
index 745ef797d..da088a472 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -253,6 +254,22 @@ public static MobileResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A formatted version of the phone number.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.cs
index 6c4b74145..2ddc7f0d2 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.cs
@@ -180,6 +180,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalResource.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalResource.cs
index b69b26378..e6efa076c 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -253,6 +254,22 @@ public static NationalResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A formatted version of the phone number.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.cs
index ce349a13c..c823afad4 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.cs
@@ -180,6 +180,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostResource.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostResource.cs
index cbc475ae5..49ea618b3 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -253,6 +254,22 @@ public static SharedCostResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A formatted version of the phone number.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.cs
index d68889f59..b761b1390 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.cs
@@ -180,6 +180,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeResource.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeResource.cs
index ada70798a..652fe4b9d 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -253,6 +254,22 @@ public static TollFreeResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A formatted version of the phone number.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.cs
index 371ab8367..bc7bdaff0 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.cs
@@ -180,6 +180,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipResource.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipResource.cs
index 57179676b..437544cd4 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -253,6 +254,22 @@ public static VoipResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A formatted version of the phone number.
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryOptions.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryOptions.cs
index cf2feafdf..f79d25b77 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -77,6 +78,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryResource.cs b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryResource.cs
index 7d5e12b8c..ec8cd1977 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -245,6 +246,22 @@ public static AvailablePhoneNumberCountryResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country.
diff --git a/src/Twilio/Rest/Api/V2010/Account/BalanceOptions.cs b/src/Twilio/Rest/Api/V2010/Account/BalanceOptions.cs
index 6a69582c2..109338807 100644
--- a/src/Twilio/Rest/Api/V2010/Account/BalanceOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/BalanceOptions.cs
@@ -41,6 +41,7 @@ public List> GetParams()
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/BalanceResource.cs b/src/Twilio/Rest/Api/V2010/Account/BalanceResource.cs
index 62f40ad34..478805e50 100644
--- a/src/Twilio/Rest/Api/V2010/Account/BalanceResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/BalanceResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -114,6 +115,22 @@ public static BalanceResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique SID identifier of the Account.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/EventOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/EventOptions.cs
index 818550a3c..bafb6d2d9 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/EventOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/EventOptions.cs
@@ -54,6 +54,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/EventResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/EventResource.cs
index 9578c5a04..3db6cd596 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/EventResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/EventResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -181,6 +182,22 @@ public static EventResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// Contains a dictionary representing the request of the call.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs
index 31d6d6e39..cef032ef7 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -97,6 +98,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs
index a4a8ab2ac..8d51d987d 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -220,6 +221,22 @@ public static FeedbackResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.cs
index 98b703953..dfc94472e 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.cs
@@ -84,6 +84,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -114,6 +115,7 @@ public List> GetParams()
return p;
}
+
}
@@ -146,6 +148,7 @@ public List> GetParams()
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryResource.cs
index 1530c8b83..6b9693b24 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -294,6 +295,22 @@ public static FeedbackSummaryResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.cs
index 10c0da846..8f32c22e2 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.cs
@@ -55,6 +55,7 @@ public List> GetParams()
return p;
}
+
}
@@ -122,6 +123,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/NotificationResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/NotificationResource.cs
index 104afe0c1..7e4c60f8d 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/NotificationResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/NotificationResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -272,6 +273,22 @@ public static NotificationResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.cs
index a64f9bfb5..c62123781 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.cs
@@ -166,6 +166,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -233,6 +234,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/PaymentResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/PaymentResource.cs
index 6b22a568f..cd2643b45 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/PaymentResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/PaymentResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -348,6 +349,22 @@ public static PaymentResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.cs
index c04f6d6ca..134814a73 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.cs
@@ -93,6 +93,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -128,6 +129,7 @@ public List> GetParams()
return p;
}
+
}
@@ -165,6 +167,7 @@ public List> GetParams()
return p;
}
+
}
@@ -225,6 +228,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -277,6 +281,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/RecordingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/RecordingResource.cs
index b98f2bc74..e3dafbdd0 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/RecordingResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/RecordingResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -565,6 +566,22 @@ public static RecordingResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/SiprecOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/SiprecOptions.cs
index 929c529c2..3c635105e 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/SiprecOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/SiprecOptions.cs
@@ -1471,6 +1471,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -1515,6 +1516,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/SiprecResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/SiprecResource.cs
index acf2c6870..1d0304e0a 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/SiprecResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/SiprecResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -1056,6 +1057,22 @@ public static SiprecResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the Siprec resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/StreamOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/StreamOptions.cs
index e3ada0445..7d4cba77a 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/StreamOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/StreamOptions.cs
@@ -1473,6 +1473,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -1517,6 +1518,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/StreamResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/StreamResource.cs
index 595fa0e71..10be89dff 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/StreamResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/StreamResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -1056,6 +1057,22 @@ public static StreamResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the Stream resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageOptions.cs
index 6634e6e3f..a6a428fb9 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageOptions.cs
@@ -66,6 +66,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageResource.cs
index 87b21ecbc..4aa0e5752 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -131,6 +132,22 @@ public static UserDefinedMessageResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created User Defined Message.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionOptions.cs
index 955a9d7f0..c6bf7403f 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -108,6 +109,7 @@ public List> GetParams()
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionResource.cs b/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionResource.cs
index d505d7f44..1d092ab12 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscriptionResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -211,6 +212,22 @@ public static UserDefinedMessageSubscriptionResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages.
diff --git a/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs b/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs
index d886a9e30..654380e03 100644
--- a/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs
@@ -296,6 +296,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -326,6 +327,7 @@ public List> GetParams()
return p;
}
+
}
@@ -358,6 +360,7 @@ public List> GetParams()
return p;
}
+
}
@@ -461,6 +464,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -555,6 +559,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/CallResource.cs b/src/Twilio/Rest/Api/V2010/Account/CallResource.cs
index 5fc6e2dbd..c1613855c 100644
--- a/src/Twilio/Rest/Api/V2010/Account/CallResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/CallResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -706,6 +707,22 @@ public static CallResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that we created to identify this Call resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.cs
index e9dd5b263..e5ab0b798 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.cs
@@ -387,6 +387,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -422,6 +423,7 @@ public List> GetParams()
return p;
}
+
}
@@ -459,6 +461,7 @@ public List> GetParams()
return p;
}
+
}
@@ -516,6 +519,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -636,6 +640,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantResource.cs b/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantResource.cs
index d579b6a69..69baaa081 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -751,6 +752,22 @@ public static ParticipantResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.cs
index 8013ee3d9..e60135e8e 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.cs
@@ -55,6 +55,7 @@ public List> GetParams()
return p;
}
+
}
@@ -92,6 +93,7 @@ public List> GetParams()
return p;
}
+
}
@@ -152,6 +154,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -204,6 +207,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingResource.cs
index 540bcf8a2..72aea7bb1 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -467,6 +468,22 @@ public static RecordingResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/ConferenceOptions.cs b/src/Twilio/Rest/Api/V2010/Account/ConferenceOptions.cs
index d823063f1..a0ee5bfa2 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ConferenceOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ConferenceOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -139,6 +140,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -191,6 +193,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/ConferenceResource.cs b/src/Twilio/Rest/Api/V2010/Account/ConferenceResource.cs
index f467f2883..1f4a95d2c 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ConferenceResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ConferenceResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -404,6 +405,22 @@ public static ConferenceResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Conference resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/ConnectAppOptions.cs b/src/Twilio/Rest/Api/V2010/Account/ConnectAppOptions.cs
index 4838bd29b..f124373e1 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ConnectAppOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ConnectAppOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -82,6 +83,7 @@ public List> GetParams()
return p;
}
+
}
@@ -109,6 +111,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -197,6 +200,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/ConnectAppResource.cs b/src/Twilio/Rest/Api/V2010/Account/ConnectAppResource.cs
index 0b9e49ff8..2ed0e3269 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ConnectAppResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ConnectAppResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -436,6 +437,22 @@ public static ConnectAppResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionOptions.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionOptions.cs
index 2bf038af5..838042743 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionOptions.cs
@@ -60,6 +60,7 @@ public List> GetParams()
return p;
}
+
}
@@ -101,6 +102,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionResource.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionResource.cs
index 1916a675d..d5d04b2b8 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -267,6 +268,22 @@ public static AssignedAddOnExtensionResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnOptions.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnOptions.cs
index 01d7d4899..da855b63b 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnOptions.cs
@@ -59,6 +59,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -94,6 +95,7 @@ public List> GetParams()
return p;
}
+
}
@@ -131,6 +133,7 @@ public List> GetParams()
return p;
}
+
}
@@ -167,6 +170,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnResource.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnResource.cs
index c3f47167c..567a0fd68 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -410,6 +411,22 @@ public static AssignedAddOnResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.cs
index 867bc23df..b77bebdf8 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.cs
@@ -208,6 +208,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -261,6 +262,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalResource.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalResource.cs
index 1c24e4738..7f423c9db 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -409,6 +410,22 @@ public static LocalResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.cs
index 17a27bccc..e0176710d 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.cs
@@ -208,6 +208,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -261,6 +262,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileResource.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileResource.cs
index 51f29be17..3b9b57f93 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -409,6 +410,22 @@ public static MobileResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.cs
index 9378035b1..15c00d88c 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.cs
@@ -208,6 +208,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -261,6 +262,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeResource.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeResource.cs
index 3c42aee25..22d76af6c 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -409,6 +410,22 @@ public static TollFreeResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.cs
index 98a614d45..6db32b5ec 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.cs
@@ -209,6 +209,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -239,6 +240,7 @@ public List> GetParams()
return p;
}
+
}
@@ -271,6 +273,7 @@ public List> GetParams()
return p;
}
+
}
@@ -326,6 +329,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -518,6 +522,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberResource.cs b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberResource.cs
index a1186aa68..2e1d62b77 100644
--- a/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -721,6 +722,22 @@ public static IncomingPhoneNumberResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this IncomingPhoneNumber resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/KeyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/KeyOptions.cs
index 079ff8616..719098923 100644
--- a/src/Twilio/Rest/Api/V2010/Account/KeyOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/KeyOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -82,6 +83,7 @@ public List> GetParams()
return p;
}
+
}
@@ -109,6 +111,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -147,6 +150,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/KeyResource.cs b/src/Twilio/Rest/Api/V2010/Account/KeyResource.cs
index ef68c4de4..cf70b456d 100644
--- a/src/Twilio/Rest/Api/V2010/Account/KeyResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/KeyResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -395,6 +396,22 @@ public static KeyResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the Key resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.cs
index 0af1a4828..0cafe5c4a 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.cs
@@ -57,6 +57,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackResource.cs b/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackResource.cs
index 1712dd957..edef10aea 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -140,6 +141,22 @@ public static FeedbackResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this MessageFeedback resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.cs
index fe234d456..a9aa0fe46 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.cs
@@ -55,6 +55,7 @@ public List> GetParams()
return p;
}
+
}
@@ -92,6 +93,7 @@ public List> GetParams()
return p;
}
+
}
@@ -152,6 +154,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Message/MediaResource.cs b/src/Twilio/Rest/Api/V2010/Account/Message/MediaResource.cs
index 4448c3299..6d21d4e78 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Message/MediaResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Message/MediaResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -344,6 +345,22 @@ public static MediaResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this Media resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs b/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs
index e7ab298ec..c977b0597 100644
--- a/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs
@@ -88,7 +88,7 @@ public class CreateMessageOptions : IOptions
public MessageResource.RiskCheckEnum RiskCheck { get; set; }
- /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
+ /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
public Types.PhoneNumber From { get; set; }
/// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
@@ -217,6 +217,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -247,6 +248,7 @@ public List> GetParams()
return p;
}
+
}
@@ -279,6 +281,7 @@ public List> GetParams()
return p;
}
+
}
@@ -344,6 +347,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -389,6 +393,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/MessageResource.cs b/src/Twilio/Rest/Api/V2010/Account/MessageResource.cs
index 349634591..556eefcee 100644
--- a/src/Twilio/Rest/Api/V2010/Account/MessageResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/MessageResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -175,7 +176,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre
/// Send a message
/// The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource.
- /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
+ /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
/// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
/// The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
/// The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
@@ -236,7 +237,7 @@ public static MessageResource Create(
/// Send a message
/// The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource.
- /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
+ /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
/// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
/// The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
/// The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
@@ -680,6 +681,22 @@ public static MessageResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The text content of the message
diff --git a/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs
index bc2f0e587..e63790b2a 100644
--- a/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.cs
@@ -48,6 +48,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/NewKeyResource.cs b/src/Twilio/Rest/Api/V2010/Account/NewKeyResource.cs
index 854b77782..6c4059501 100644
--- a/src/Twilio/Rest/Api/V2010/Account/NewKeyResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/NewKeyResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -121,6 +122,22 @@ public static NewKeyResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
diff --git a/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.cs
index cffd008ae..2bbea89e1 100644
--- a/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.cs
@@ -48,6 +48,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyResource.cs b/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyResource.cs
index ab8cf7587..4dbab2cf9 100644
--- a/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -121,6 +122,22 @@ public static NewSigningKeyResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the NewSigningKey resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/NotificationOptions.cs b/src/Twilio/Rest/Api/V2010/Account/NotificationOptions.cs
index 2177edbb6..0c1a7ba64 100644
--- a/src/Twilio/Rest/Api/V2010/Account/NotificationOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/NotificationOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -108,6 +109,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/NotificationResource.cs b/src/Twilio/Rest/Api/V2010/Account/NotificationResource.cs
index dc68c89d8..c93f70b46 100644
--- a/src/Twilio/Rest/Api/V2010/Account/NotificationResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/NotificationResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -261,6 +262,22 @@ public static NotificationResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.cs b/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.cs
index 4481f2a17..171d66da5 100644
--- a/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -82,6 +83,7 @@ public List> GetParams()
return p;
}
+
}
@@ -123,6 +125,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -161,6 +164,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdResource.cs b/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdResource.cs
index 9afdde2fc..dce2ff463 100644
--- a/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -403,6 +404,22 @@ public static OutgoingCallerIdResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the OutgoingCallerId resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.cs
index 2eb004031..dec8bcd2c 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.cs
@@ -55,6 +55,7 @@ public List> GetParams()
return p;
}
+
}
@@ -91,6 +92,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -143,6 +145,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Queue/MemberResource.cs b/src/Twilio/Rest/Api/V2010/Account/Queue/MemberResource.cs
index 09dc6c622..08020519d 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Queue/MemberResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Queue/MemberResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -344,6 +345,22 @@ public static MemberResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Member resource is associated with.
diff --git a/src/Twilio/Rest/Api/V2010/Account/QueueOptions.cs b/src/Twilio/Rest/Api/V2010/Account/QueueOptions.cs
index dbebab763..88691e70e 100644
--- a/src/Twilio/Rest/Api/V2010/Account/QueueOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/QueueOptions.cs
@@ -61,6 +61,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -91,6 +92,7 @@ public List> GetParams()
return p;
}
+
}
@@ -123,6 +125,7 @@ public List> GetParams()
return p;
}
+
}
@@ -150,6 +153,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -195,6 +199,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/QueueResource.cs b/src/Twilio/Rest/Api/V2010/Account/QueueResource.cs
index de39dbcae..bb3afaf1c 100644
--- a/src/Twilio/Rest/Api/V2010/Account/QueueResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/QueueResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -475,6 +476,22 @@ public static QueueResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadOptions.cs
index a3e5df1b2..cfe354e83 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadOptions.cs
@@ -60,6 +60,7 @@ public List> GetParams()
return p;
}
+
}
@@ -102,6 +103,7 @@ public List> GetParams()
return p;
}
+
}
@@ -143,6 +145,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadResource.cs b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadResource.cs
index d10c353d6..ebd0b15a2 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -347,6 +348,22 @@ public static PayloadResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the Recording AddOnResult Payload resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultOptions.cs
index fe8021028..ad16a6ef5 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultOptions.cs
@@ -55,6 +55,7 @@ public List> GetParams()
return p;
}
+
}
@@ -92,6 +93,7 @@ public List> GetParams()
return p;
}
+
}
@@ -128,6 +130,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultResource.cs b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultResource.cs
index cf22ff033..11427b4c8 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -351,6 +352,22 @@ public static AddOnResultResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique string that that we created to identify the Recording AddOnResult resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionOptions.cs
index a02db2b6a..f94094695 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionOptions.cs
@@ -55,6 +55,7 @@ public List> GetParams()
return p;
}
+
}
@@ -92,6 +93,7 @@ public List> GetParams()
return p;
}
+
}
@@ -128,6 +130,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionResource.cs b/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionResource.cs
index a421e0014..6f63334a5 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -346,6 +347,22 @@ public static TranscriptionResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/RecordingOptions.cs b/src/Twilio/Rest/Api/V2010/Account/RecordingOptions.cs
index 7a2851329..11ffd13d1 100644
--- a/src/Twilio/Rest/Api/V2010/Account/RecordingOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/RecordingOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -89,6 +90,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -161,6 +163,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/RecordingResource.cs b/src/Twilio/Rest/Api/V2010/Account/RecordingResource.cs
index a4b2cafbe..d262c2a80 100644
--- a/src/Twilio/Rest/Api/V2010/Account/RecordingResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/RecordingResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -380,6 +381,22 @@ public static RecordingResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/ShortCodeOptions.cs b/src/Twilio/Rest/Api/V2010/Account/ShortCodeOptions.cs
index 20ee683d0..dc2cd8dad 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ShortCodeOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ShortCodeOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -91,6 +92,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -164,6 +166,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/ShortCodeResource.cs b/src/Twilio/Rest/Api/V2010/Account/ShortCodeResource.cs
index b37c301a5..389f6e7c1 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ShortCodeResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ShortCodeResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -351,6 +352,22 @@ public static ShortCodeResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this ShortCode resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/SigningKeyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/SigningKeyOptions.cs
index 37319220a..8ccd693e2 100644
--- a/src/Twilio/Rest/Api/V2010/Account/SigningKeyOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/SigningKeyOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -82,6 +83,7 @@ public List> GetParams()
return p;
}
+
}
@@ -109,6 +111,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -147,6 +150,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/SigningKeyResource.cs b/src/Twilio/Rest/Api/V2010/Account/SigningKeyResource.cs
index 43eb92cd7..c09350df4 100644
--- a/src/Twilio/Rest/Api/V2010/Account/SigningKeyResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/SigningKeyResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -395,6 +396,22 @@ public static SigningKeyResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The sid
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.cs
index 3e6ceebff..85500719a 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.cs
@@ -68,6 +68,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -103,6 +104,7 @@ public List> GetParams()
return p;
}
+
}
@@ -140,6 +142,7 @@ public List> GetParams()
return p;
}
+
}
@@ -176,6 +179,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -219,6 +223,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialResource.cs
index 2ff389fbe..3d4d316cb 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -498,6 +499,22 @@ public static CredentialResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A 34 character string that uniquely identifies this resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListOptions.cs
index 8a86992d9..273c199b4 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListOptions.cs
@@ -54,6 +54,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -84,6 +85,7 @@ public List> GetParams()
return p;
}
+
}
@@ -116,6 +118,7 @@ public List> GetParams()
return p;
}
+
}
@@ -143,6 +146,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -183,6 +187,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListResource.cs
index 5590a1801..60987f128 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -467,6 +468,22 @@ public static CredentialListResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) that owns this resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingOptions.cs
index e508b5d03..a1ca9ece0 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingOptions.cs
@@ -59,6 +59,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -94,6 +95,7 @@ public List> GetParams()
return p;
}
+
}
@@ -131,6 +133,7 @@ public List> GetParams()
return p;
}
+
}
@@ -167,6 +170,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingResource.cs
index 8c2d54c96..e41f1f867 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -410,6 +411,22 @@ public static AuthCallsCredentialListMappingResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingOptions.cs
index 0f71a617f..168ec8437 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingOptions.cs
@@ -59,6 +59,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -94,6 +95,7 @@ public List> GetParams()
return p;
}
+
}
@@ -131,6 +133,7 @@ public List> GetParams()
return p;
}
+
}
@@ -167,6 +170,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingResource.cs
index 6a25134a1..e8285ebaa 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -410,6 +411,22 @@ public static AuthCallsIpAccessControlListMappingResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingOptions.cs
index f96727d57..917566429 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingOptions.cs
@@ -59,6 +59,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -94,6 +95,7 @@ public List> GetParams()
return p;
}
+
}
@@ -131,6 +133,7 @@ public List> GetParams()
return p;
}
+
}
@@ -167,6 +170,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingResource.cs
index 8634f932b..97e2b0839 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -410,6 +411,22 @@ public static AuthRegistrationsCredentialListMappingResource FromJson(string jso
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingOptions.cs
index b0990653b..59066fa79 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingOptions.cs
@@ -59,6 +59,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -94,6 +95,7 @@ public List> GetParams()
return p;
}
+
}
@@ -131,6 +133,7 @@ public List> GetParams()
return p;
}
+
}
@@ -167,6 +170,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingResource.cs
index c8ebc32a7..e3c383f16 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -410,6 +411,22 @@ public static CredentialListMappingResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique id of the Account that is responsible for this resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingOptions.cs
index c54926c12..769527484 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingOptions.cs
@@ -59,6 +59,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -94,6 +95,7 @@ public List> GetParams()
return p;
}
+
}
@@ -131,6 +133,7 @@ public List> GetParams()
return p;
}
+
}
@@ -167,6 +170,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingResource.cs
index a24080390..67f1677b4 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -410,6 +411,22 @@ public static IpAccessControlListMappingResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The unique id of the Account that is responsible for this resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.cs
index fd1d0fc07..b146db705 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.cs
@@ -138,6 +138,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -168,6 +169,7 @@ public List> GetParams()
return p;
}
+
}
@@ -200,6 +202,7 @@ public List> GetParams()
return p;
}
+
}
@@ -227,6 +230,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -349,6 +353,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/DomainResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/DomainResource.cs
index 03a526397..8532b5c60 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/DomainResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/DomainResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -563,6 +564,22 @@ public static DomainResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.cs
index 7e1c5e866..b1a7e4e1f 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.cs
@@ -75,6 +75,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -110,6 +111,7 @@ public List> GetParams()
return p;
}
+
}
@@ -147,6 +149,7 @@ public List> GetParams()
return p;
}
+
}
@@ -183,6 +186,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -240,6 +244,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressResource.cs
index 59f027d88..1e6d9ddad 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -510,6 +511,22 @@ public static IpAddressResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A 34 character string that uniquely identifies this resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListOptions.cs
index 870f7ad64..0478e3996 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListOptions.cs
@@ -54,6 +54,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -84,6 +85,7 @@ public List> GetParams()
return p;
}
+
}
@@ -116,6 +118,7 @@ public List> GetParams()
return p;
}
+
}
@@ -143,6 +146,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -183,6 +187,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListResource.cs b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListResource.cs
index 206bb60eb..a8fdd17cf 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -467,6 +468,22 @@ public static IpAccessControlListResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// A 34 character string that uniquely identifies this resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/TokenOptions.cs b/src/Twilio/Rest/Api/V2010/Account/TokenOptions.cs
index c9340724c..c971f1794 100644
--- a/src/Twilio/Rest/Api/V2010/Account/TokenOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/TokenOptions.cs
@@ -48,6 +48,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/TokenResource.cs b/src/Twilio/Rest/Api/V2010/Account/TokenResource.cs
index ab50acbe6..553404925 100644
--- a/src/Twilio/Rest/Api/V2010/Account/TokenResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/TokenResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -121,6 +122,22 @@ public static TokenResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Token resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/TranscriptionOptions.cs b/src/Twilio/Rest/Api/V2010/Account/TranscriptionOptions.cs
index ba27b04cf..b932170c2 100644
--- a/src/Twilio/Rest/Api/V2010/Account/TranscriptionOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/TranscriptionOptions.cs
@@ -50,6 +50,7 @@ public List> GetParams()
return p;
}
+
}
@@ -82,6 +83,7 @@ public List> GetParams()
return p;
}
+
}
@@ -109,6 +111,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/TranscriptionResource.cs b/src/Twilio/Rest/Api/V2010/Account/TranscriptionResource.cs
index ddc1a67fc..3bf4ed04a 100644
--- a/src/Twilio/Rest/Api/V2010/Account/TranscriptionResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/TranscriptionResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -331,6 +332,22 @@ public static TranscriptionResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.cs
index 2e17a4c87..b2bd8b890 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeResource.cs
index eb6a9a3ed..24a6ea5ce 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static AllTimeResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.cs
index 146191425..dac9919e1 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyResource.cs
index 45ceb265d..a852d6a3b 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static DailyResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.cs
index 938639ce6..d03b95e7c 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthResource.cs
index 44dcdded3..ccd7e2337 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static LastMonthResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.cs
index 922cc97bd..5c1f2c132 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyResource.cs
index 2e98243f6..2bc2397b3 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static MonthlyResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.cs
index ce9dff82a..5f56f5064 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthResource.cs
index 303bbe13c..797a5a427 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static ThisMonthResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.cs
index 1af5e0c11..51a49934b 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayResource.cs
index 1485cd191..f328bb685 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static TodayResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.cs
index a60c23e00..e9205a094 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyResource.cs
index 30b1eb448..53bd6358e 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static YearlyResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.cs
index be8fc521e..98e3310bf 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayResource.cs
index 9688832e7..55de1326f 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static YesterdayResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.cs
index 7b37ced7d..93c2721ad 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.cs
@@ -73,6 +73,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/RecordResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/RecordResource.cs
index a3b4d047b..aab543f9f 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/RecordResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/RecordResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -451,6 +452,22 @@ public static RecordResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that accrued the usage.
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.cs
index d5c7386d6..b30f3a27f 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.cs
@@ -100,6 +100,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -130,6 +131,7 @@ public List> GetParams()
return p;
}
+
}
@@ -162,6 +164,7 @@ public List> GetParams()
return p;
}
+
}
@@ -210,6 +213,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -262,6 +266,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerResource.cs b/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerResource.cs
index 438fb0fd2..9f22fa9f4 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -800,6 +801,22 @@ public static TriggerResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the trigger monitors.
diff --git a/src/Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.cs b/src/Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.cs
index 3f660a922..ae4b9a501 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.cs
@@ -89,6 +89,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/ValidationRequestResource.cs b/src/Twilio/Rest/Api/V2010/Account/ValidationRequestResource.cs
index 6bd6a6f0e..053de6904 100644
--- a/src/Twilio/Rest/Api/V2010/Account/ValidationRequestResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/ValidationRequestResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -141,6 +142,22 @@ public static ValidationRequestResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the Caller ID.
diff --git a/src/Twilio/Rest/Api/V2010/AccountOptions.cs b/src/Twilio/Rest/Api/V2010/AccountOptions.cs
index 5f22844a8..5a851ab9a 100644
--- a/src/Twilio/Rest/Api/V2010/AccountOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/AccountOptions.cs
@@ -45,6 +45,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -66,6 +67,7 @@ public List> GetParams()
return p;
}
+
}
@@ -104,6 +106,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -140,6 +143,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Api/V2010/AccountResource.cs b/src/Twilio/Rest/Api/V2010/AccountResource.cs
index aaa3b3c2c..faeef7c23 100644
--- a/src/Twilio/Rest/Api/V2010/AccountResource.cs
+++ b/src/Twilio/Rest/Api/V2010/AccountResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -411,6 +412,22 @@ public static AccountResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The authorization token for this account. This token should be kept a secret, so no sharing.
diff --git a/src/Twilio/Rest/Api/V2010/SafelistOptions.cs b/src/Twilio/Rest/Api/V2010/SafelistOptions.cs
new file mode 100644
index 000000000..1d34b22dd
--- /dev/null
+++ b/src/Twilio/Rest/Api/V2010/SafelistOptions.cs
@@ -0,0 +1,115 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+using System;
+using System.Collections.Generic;
+using Twilio.Base;
+using Twilio.Converters;
+
+
+
+
+namespace Twilio.Rest.Api.V2010
+{
+
+ /// Add a new phone number to SafeList.
+ public class CreateSafelistOptions : IOptions
+ {
+
+ /// The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ public string PhoneNumber { get; }
+
+
+ /// Construct a new CreateSafelistOptions
+ /// The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ public CreateSafelistOptions(string phoneNumber)
+ {
+ PhoneNumber = phoneNumber;
+ }
+
+
+ /// Generate the necessary parameters
+ public List> GetParams()
+ {
+ var p = new List>();
+
+ if (PhoneNumber != null)
+ {
+ p.Add(new KeyValuePair("PhoneNumber", PhoneNumber));
+ }
+ return p;
+ }
+
+
+
+ }
+ /// Remove a phone number from SafeList.
+ public class DeleteSafelistOptions : IOptions
+ {
+
+ /// The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ public string PhoneNumber { get; set; }
+
+
+
+
+
+ /// Generate the necessary parameters
+ public List> GetParams()
+ {
+ var p = new List>();
+
+ if (PhoneNumber != null)
+ {
+ p.Add(new KeyValuePair("PhoneNumber", PhoneNumber));
+ }
+ return p;
+ }
+
+
+
+ }
+
+
+ /// Check if a phone number exists in SafeList.
+ public class FetchSafelistOptions : IOptions
+ {
+
+ /// The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ public string PhoneNumber { get; set; }
+
+
+
+
+
+ /// Generate the necessary parameters
+ public List> GetParams()
+ {
+ var p = new List>();
+
+ if (PhoneNumber != null)
+ {
+ p.Add(new KeyValuePair("PhoneNumber", PhoneNumber));
+ }
+ return p;
+ }
+
+
+
+ }
+
+
+}
+
diff --git a/src/Twilio/Rest/Api/V2010/SafelistResource.cs b/src/Twilio/Rest/Api/V2010/SafelistResource.cs
new file mode 100644
index 000000000..bea380a45
--- /dev/null
+++ b/src/Twilio/Rest/Api/V2010/SafelistResource.cs
@@ -0,0 +1,279 @@
+/*
+ * This code was generated by
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using Twilio.Base;
+using Twilio.Clients;
+using Twilio.Constant;
+using Twilio.Converters;
+using Twilio.Exceptions;
+using Twilio.Http;
+
+
+
+namespace Twilio.Rest.Api.V2010
+{
+ public class SafelistResource : Resource
+ {
+
+
+
+
+
+ private static Request BuildCreateRequest(CreateSafelistOptions options, ITwilioRestClient client)
+ {
+
+ string path = "/2010-04-01/SafeList/Numbers.json";
+
+
+ return new Request(
+ HttpMethod.Post,
+ Rest.Domain.Api,
+ path,
+ postParams: options.GetParams(),
+ headerParams: null
+ );
+ }
+
+ /// Add a new phone number to SafeList.
+ /// Create Safelist parameters
+ /// Client to make requests to Twilio
+ /// A single instance of Safelist
+ public static SafelistResource Create(CreateSafelistOptions options, ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = client.Request(BuildCreateRequest(options, client));
+ return FromJson(response.Content);
+ }
+
+ #if !NET35
+ /// Add a new phone number to SafeList.
+ /// Create Safelist parameters
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of Safelist
+ public static async System.Threading.Tasks.Task CreateAsync(CreateSafelistOptions options,
+ ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = await client.RequestAsync(BuildCreateRequest(options, client));
+ return FromJson(response.Content);
+ }
+ #endif
+
+ /// Add a new phone number to SafeList.
+ /// The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ /// Client to make requests to Twilio
+ /// A single instance of Safelist
+ public static SafelistResource Create(
+ string phoneNumber,
+ ITwilioRestClient client = null)
+ {
+ var options = new CreateSafelistOptions(phoneNumber){ };
+ return Create(options, client);
+ }
+
+ #if !NET35
+ /// Add a new phone number to SafeList.
+ /// The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of Safelist
+ public static async System.Threading.Tasks.Task CreateAsync(
+ string phoneNumber,
+ ITwilioRestClient client = null)
+ {
+ var options = new CreateSafelistOptions(phoneNumber){ };
+ return await CreateAsync(options, client);
+ }
+ #endif
+
+ /// Remove a phone number from SafeList.
+ /// Delete Safelist parameters
+ /// Client to make requests to Twilio
+ /// A single instance of Safelist
+ private static Request BuildDeleteRequest(DeleteSafelistOptions options, ITwilioRestClient client)
+ {
+
+ string path = "/2010-04-01/SafeList/Numbers.json";
+
+
+ return new Request(
+ HttpMethod.Delete,
+ Rest.Domain.Api,
+ path,
+ queryParams: options.GetParams(),
+ headerParams: null
+ );
+ }
+
+ /// Remove a phone number from SafeList.
+ /// Delete Safelist parameters
+ /// Client to make requests to Twilio
+ /// A single instance of Safelist
+ public static bool Delete(DeleteSafelistOptions options, ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = client.Request(BuildDeleteRequest(options, client));
+ return response.StatusCode == System.Net.HttpStatusCode.NoContent;
+ }
+
+ #if !NET35
+ /// Remove a phone number from SafeList.
+ /// Delete Safelist parameters
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of Safelist
+ public static async System.Threading.Tasks.Task DeleteAsync(DeleteSafelistOptions options,
+ ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = await client.RequestAsync(BuildDeleteRequest(options, client));
+ return response.StatusCode == System.Net.HttpStatusCode.NoContent;
+ }
+ #endif
+
+ /// Remove a phone number from SafeList.
+ /// Client to make requests to Twilio
+ /// A single instance of Safelist
+ public static bool Delete(ITwilioRestClient client = null)
+ {
+ var options = new DeleteSafelistOptions() ;
+ return Delete(options, client);
+ }
+
+ #if !NET35
+ /// Remove a phone number from SafeList.
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of Safelist
+ public static async System.Threading.Tasks.Task DeleteAsync(ITwilioRestClient client = null)
+ {
+ var options = new DeleteSafelistOptions() ;
+ return await DeleteAsync(options, client);
+ }
+ #endif
+
+ private static Request BuildFetchRequest(FetchSafelistOptions options, ITwilioRestClient client)
+ {
+
+ string path = "/2010-04-01/SafeList/Numbers.json";
+
+
+ return new Request(
+ HttpMethod.Get,
+ Rest.Domain.Api,
+ path,
+ queryParams: options.GetParams(),
+ headerParams: null
+ );
+ }
+
+ /// Check if a phone number exists in SafeList.
+ /// Fetch Safelist parameters
+ /// Client to make requests to Twilio
+ /// A single instance of Safelist
+ public static SafelistResource Fetch(FetchSafelistOptions options, ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = client.Request(BuildFetchRequest(options, client));
+ return FromJson(response.Content);
+ }
+
+ #if !NET35
+ /// Check if a phone number exists in SafeList.
+ /// Fetch Safelist parameters
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of Safelist
+ public static async System.Threading.Tasks.Task FetchAsync(FetchSafelistOptions options,
+ ITwilioRestClient client = null)
+ {
+ client = client ?? TwilioClient.GetRestClient();
+ var response = await client.RequestAsync(BuildFetchRequest(options, client));
+ return FromJson(response.Content);
+ }
+ #endif
+ /// Check if a phone number exists in SafeList.
+ /// The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ /// Client to make requests to Twilio
+ /// A single instance of Safelist
+ public static SafelistResource Fetch(
+ string phoneNumber = null,
+ ITwilioRestClient client = null)
+ {
+ var options = new FetchSafelistOptions(){ PhoneNumber = phoneNumber };
+ return Fetch(options, client);
+ }
+
+ #if !NET35
+ /// Check if a phone number exists in SafeList.
+ /// The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ /// Client to make requests to Twilio
+ /// Task that resolves to A single instance of Safelist
+ public static async System.Threading.Tasks.Task FetchAsync(string phoneNumber = null, ITwilioRestClient client = null)
+ {
+ var options = new FetchSafelistOptions(){ PhoneNumber = phoneNumber };
+ return await FetchAsync(options, client);
+ }
+ #endif
+
+ ///
+ /// Converts a JSON string into a SafelistResource object
+ ///
+ /// Raw JSON string
+ /// SafelistResource object represented by the provided JSON
+ public static SafelistResource FromJson(string json)
+ {
+ try
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
+
+
+ /// The unique string that we created to identify the SafeList resource.
+ [JsonProperty("sid")]
+ public string Sid { get; private set; }
+
+ /// The phone number in SafeList.
+ [JsonProperty("phone_number")]
+ public string PhoneNumber { get; private set; }
+
+
+
+ private SafelistResource() {
+
+ }
+ }
+}
+
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.cs
index ec3b56f5b..f9363ca0a 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.cs
@@ -47,6 +47,7 @@ public List> GetParams()
return p;
}
+
}
@@ -83,6 +84,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsResource.cs
index d8d845dc5..3420b0167 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsResource.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -186,6 +187,22 @@ public static DefaultsResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Defaults resource.
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueOptions.cs
index a37fe202b..7aa41e47f 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueOptions.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueOptions.cs
@@ -52,6 +52,7 @@ public List> GetParams()
return p;
}
+
}
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueResource.cs
index 997a10e03..fea7f9fba 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueResource.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -119,6 +120,22 @@ public static DialogueResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Dialogue resource.
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.cs
index b774262cf..6b05f9f7d 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.cs
@@ -77,6 +77,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -114,6 +115,7 @@ public List> GetParams()
return p;
}
+
}
@@ -153,6 +155,7 @@ public List> GetParams()
return p;
}
+
}
@@ -198,6 +201,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueResource.cs
index 8b871a95d..e46031b52 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueResource.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -422,6 +423,22 @@ public static FieldValueResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the FieldValue resource.
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.cs
index ec1ad3f76..99cdd13ee 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.cs
@@ -63,6 +63,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -95,6 +96,7 @@ public List> GetParams()
return p;
}
+
}
@@ -129,6 +131,7 @@ public List> GetParams()
return p;
}
+
}
@@ -162,6 +165,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -209,6 +213,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeResource.cs
index f1f4b3154..b3eb8b84f 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeResource.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -475,6 +476,22 @@ public static FieldTypeResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the FieldType resource.
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.cs
index e289828ac..bf5f521fe 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.cs
@@ -61,6 +61,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -93,6 +94,7 @@ public List> GetParams()
return p;
}
+
}
@@ -127,6 +129,7 @@ public List> GetParams()
return p;
}
+
}
@@ -160,6 +163,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -200,6 +204,7 @@ public List> GetParams()
}
return p;
}
+
}
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildResource.cs
index fdb6441c6..9d5e156c0 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildResource.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildResource.cs
@@ -18,6 +18,7 @@
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Clients;
+using Twilio.Constant;
using Twilio.Converters;
using Twilio.Exceptions;
using Twilio.Http;
@@ -487,6 +488,22 @@ public static ModelBuildResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
+ ///
+ /// Converts an object into a json string
+ ///
+ /// C# model
+ /// JSON string
+ public static string ToJson(object model)
+ {
+ try
+ {
+ return JsonConvert.SerializeObject(model);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiException(e.Message, e);
+ }
+ }
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ModelBuild resource.
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.cs
index 202935c7a..28bf950f2 100644
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.cs
+++ b/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.cs
@@ -79,6 +79,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -111,6 +112,7 @@ public List> GetParams()
return p;
}
+
}
@@ -145,6 +147,7 @@ public List> GetParams()
return p;
}
+
}
@@ -206,6 +209,7 @@ public List> GetParams()
}
return p;
}
+
}
@@ -253,6 +257,7 @@ public List