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> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/QueryResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/QueryResource.cs index e6f46c728..10ac07dd6 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/QueryResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/QueryResource.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; @@ -499,6 +500,22 @@ public static QueryResource 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 Query resource. diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.cs index aac18349d..022a1c5f2 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.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/StyleSheetResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetResource.cs index 8c9e8d56b..f219cf26b 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetResource.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 StyleSheetResource 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 StyleSheet resource. diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldOptions.cs index 7181674d7..4ef6f7e68 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldOptions.cs @@ -70,6 +70,7 @@ public List> GetParams() } return p; } + } @@ -107,6 +108,7 @@ public List> GetParams() return p; } + } @@ -146,6 +148,7 @@ public List> GetParams() return p; } + } @@ -184,6 +187,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldResource.cs index 3f6e05db9..7b5d5b4da 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldResource.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; @@ -414,6 +415,22 @@ public static FieldResource 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 Field resource. diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleOptions.cs index 917328e64..81acfa8a1 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleOptions.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; } + } @@ -257,6 +261,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleResource.cs index d4704877f..5805ff4c6 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleResource.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; @@ -514,6 +515,22 @@ public static SampleResource 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 Sample resource. diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsOptions.cs index 20965a779..0ee4d04d6 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -93,6 +94,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsResource.cs index c18763cc8..7a9c074c0 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsResource.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; @@ -197,6 +198,22 @@ public static TaskActionsResource 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 TaskActions resource. diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsOptions.cs index 13db969a5..a1eadef0f 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsResource.cs index 4b36059a3..8e302c095 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsResource.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 TaskStatisticsResource 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 TaskStatistics resource. diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/TaskOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/TaskOptions.cs index f5ea9d6b4..60afb8517 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/TaskOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/TaskOptions.cs @@ -77,6 +77,7 @@ public List> GetParams() } return p; } + } @@ -109,6 +110,7 @@ public List> GetParams() return p; } + } @@ -143,6 +145,7 @@ public List> GetParams() return p; } + } @@ -176,6 +179,7 @@ public List> GetParams() } return p; } + } @@ -237,6 +241,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/TaskResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/TaskResource.cs index 0e5ef0bf0..625ad7cda 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/TaskResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/TaskResource.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; @@ -491,6 +492,22 @@ public static TaskResource 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 Task resource. diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookOptions.cs index c9a53d0c1..2f193f078 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookOptions.cs @@ -81,6 +81,7 @@ public List> GetParams() } return p; } + } @@ -113,6 +114,7 @@ public List> GetParams() return p; } + } @@ -147,6 +149,7 @@ public List> GetParams() return p; } + } @@ -180,6 +183,7 @@ public List> GetParams() } return p; } + } @@ -241,6 +245,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookResource.cs index 93c545846..b5e1b158e 100644 --- a/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookResource.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; @@ -491,6 +492,22 @@ public static WebhookResource 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 absolute URL of the Webhook resource. diff --git a/src/Twilio/Rest/Autopilot/V1/AssistantOptions.cs b/src/Twilio/Rest/Autopilot/V1/AssistantOptions.cs index 0e60982f8..4aaea3ebd 100644 --- a/src/Twilio/Rest/Autopilot/V1/AssistantOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/AssistantOptions.cs @@ -87,6 +87,7 @@ public List> GetParams() } return p; } + } @@ -114,6 +115,7 @@ public List> GetParams() return p; } + } @@ -143,6 +145,7 @@ public List> GetParams() return p; } + } @@ -167,6 +170,7 @@ public List> GetParams() } return p; } + } @@ -251,6 +255,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/AssistantResource.cs b/src/Twilio/Rest/Autopilot/V1/AssistantResource.cs index ff9ae5a0e..832e1f01c 100644 --- a/src/Twilio/Rest/Autopilot/V1/AssistantResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/AssistantResource.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; @@ -492,6 +493,22 @@ public static AssistantResource 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 Assistant resource. diff --git a/src/Twilio/Rest/Autopilot/V1/RestoreAssistantOptions.cs b/src/Twilio/Rest/Autopilot/V1/RestoreAssistantOptions.cs index 58240c716..6896b2c29 100644 --- a/src/Twilio/Rest/Autopilot/V1/RestoreAssistantOptions.cs +++ b/src/Twilio/Rest/Autopilot/V1/RestoreAssistantOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Autopilot/V1/RestoreAssistantResource.cs b/src/Twilio/Rest/Autopilot/V1/RestoreAssistantResource.cs index ded14a59c..b1df917f8 100644 --- a/src/Twilio/Rest/Autopilot/V1/RestoreAssistantResource.cs +++ b/src/Twilio/Rest/Autopilot/V1/RestoreAssistantResource.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; @@ -115,6 +116,22 @@ public static RestoreAssistantResource 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 Assistant resource. diff --git a/src/Twilio/Rest/Bulkexports/V1/Export/DayOptions.cs b/src/Twilio/Rest/Bulkexports/V1/Export/DayOptions.cs index e0eb1420f..e1b522c54 100644 --- a/src/Twilio/Rest/Bulkexports/V1/Export/DayOptions.cs +++ b/src/Twilio/Rest/Bulkexports/V1/Export/DayOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Bulkexports/V1/Export/DayResource.cs b/src/Twilio/Rest/Bulkexports/V1/Export/DayResource.cs index a8da5b3d8..fa2e64a44 100644 --- a/src/Twilio/Rest/Bulkexports/V1/Export/DayResource.cs +++ b/src/Twilio/Rest/Bulkexports/V1/Export/DayResource.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 DayResource 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 redirect_to diff --git a/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobOptions.cs b/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobOptions.cs index 33fa8e4be..6d8ebfe1b 100644 --- a/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobOptions.cs +++ b/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobOptions.cs @@ -95,6 +95,7 @@ public List> GetParams() } return p; } + } @@ -126,6 +127,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobResource.cs b/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobResource.cs index d26839cdf..ed88adcc7 100644 --- a/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobResource.cs +++ b/src/Twilio/Rest/Bulkexports/V1/Export/ExportCustomJobResource.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 ExportCustomJobResource 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 friendly name specified when creating the job diff --git a/src/Twilio/Rest/Bulkexports/V1/Export/JobOptions.cs b/src/Twilio/Rest/Bulkexports/V1/Export/JobOptions.cs index 8eeaa575f..ace8ba686 100644 --- a/src/Twilio/Rest/Bulkexports/V1/Export/JobOptions.cs +++ b/src/Twilio/Rest/Bulkexports/V1/Export/JobOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -76,6 +77,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Bulkexports/V1/Export/JobResource.cs b/src/Twilio/Rest/Bulkexports/V1/Export/JobResource.cs index a0df3dc0f..5216b450a 100644 --- a/src/Twilio/Rest/Bulkexports/V1/Export/JobResource.cs +++ b/src/Twilio/Rest/Bulkexports/V1/Export/JobResource.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; @@ -182,6 +183,22 @@ public static JobResource 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 type of communication – Messages, Calls, Conferences, and Participants diff --git a/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationOptions.cs b/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationOptions.cs index ef61a8f9c..a7131db45 100644 --- a/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationOptions.cs +++ b/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -97,6 +98,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationResource.cs b/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationResource.cs index ad69978ec..cb2f18ca6 100644 --- a/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationResource.cs +++ b/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationResource.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; @@ -194,6 +195,22 @@ public static ExportConfigurationResource 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); + } + } /// If true, Twilio will automatically generate every day's file when the day is over. diff --git a/src/Twilio/Rest/Bulkexports/V1/ExportOptions.cs b/src/Twilio/Rest/Bulkexports/V1/ExportOptions.cs index 0783d6974..d6e99c8f2 100644 --- a/src/Twilio/Rest/Bulkexports/V1/ExportOptions.cs +++ b/src/Twilio/Rest/Bulkexports/V1/ExportOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Bulkexports/V1/ExportResource.cs b/src/Twilio/Rest/Bulkexports/V1/ExportResource.cs index a7537854f..ae307c2b9 100644 --- a/src/Twilio/Rest/Bulkexports/V1/ExportResource.cs +++ b/src/Twilio/Rest/Bulkexports/V1/ExportResource.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 ExportResource 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 type of communication – Messages, Calls, Conferences, and Participants diff --git a/src/Twilio/Rest/Chat/V1/CredentialOptions.cs b/src/Twilio/Rest/Chat/V1/CredentialOptions.cs index e6ca1563b..57ec7cc9c 100644 --- a/src/Twilio/Rest/Chat/V1/CredentialOptions.cs +++ b/src/Twilio/Rest/Chat/V1/CredentialOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -243,6 +247,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/CredentialResource.cs b/src/Twilio/Rest/Chat/V1/CredentialResource.cs index 8e7fd9167..eb41fa341 100644 --- a/src/Twilio/Rest/Chat/V1/CredentialResource.cs +++ b/src/Twilio/Rest/Chat/V1/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); + } + } /// The unique string that we created to identify the Credential resource. diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.cs index 0a6fa4436..ad45eda56 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() return p; } + } @@ -144,6 +146,7 @@ public List> GetParams() return p; } + } @@ -190,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/InviteResource.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/InviteResource.cs index 2d012341e..b264f6e51 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/InviteResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/InviteResource.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; @@ -418,6 +419,22 @@ public static InviteResource 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 Invite resource. diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.cs index 01142ed2a..f2ce4fe9d 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() return p; } + } @@ -144,6 +146,7 @@ public List> GetParams() return p; } + } @@ -190,6 +193,7 @@ public List> GetParams() } return p; } + } @@ -242,6 +246,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/MemberResource.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/MemberResource.cs index 4282d1e88..6bae7ee46 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/MemberResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/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; @@ -506,6 +507,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 unique string that we created to identify the Member resource. diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.cs index 3d4fc3193..97cde729e 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.cs @@ -75,6 +75,7 @@ public List> GetParams() } return p; } + } @@ -112,6 +113,7 @@ public List> GetParams() return p; } + } @@ -151,6 +153,7 @@ public List> GetParams() return p; } + } @@ -196,6 +199,7 @@ public List> GetParams() } return p; } + } @@ -248,6 +252,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/Service/Channel/MessageResource.cs b/src/Twilio/Rest/Chat/V1/Service/Channel/MessageResource.cs index f8e95ce20..5243a48be 100644 --- a/src/Twilio/Rest/Chat/V1/Service/Channel/MessageResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/Channel/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; @@ -522,6 +523,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 unique string that we created to identify the Message resource. diff --git a/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.cs b/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.cs index 6aa777c79..9aced79e6 100644 --- a/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.cs @@ -75,6 +75,7 @@ public List> GetParams() } return p; } + } @@ -107,6 +108,7 @@ public List> GetParams() return p; } + } @@ -141,6 +143,7 @@ public List> GetParams() return p; } + } @@ -182,6 +185,7 @@ public List> GetParams() } return p; } + } @@ -236,6 +240,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/Service/ChannelResource.cs b/src/Twilio/Rest/Chat/V1/Service/ChannelResource.cs index cda23a744..65c34285f 100644 --- a/src/Twilio/Rest/Chat/V1/Service/ChannelResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/ChannelResource.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; @@ -504,6 +505,22 @@ public static ChannelResource 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 Channel resource. diff --git a/src/Twilio/Rest/Chat/V1/Service/RoleOptions.cs b/src/Twilio/Rest/Chat/V1/Service/RoleOptions.cs index 6686851d9..169993395 100644 --- a/src/Twilio/Rest/Chat/V1/Service/RoleOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/RoleOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -106,6 +107,7 @@ public List> GetParams() return p; } + } @@ -140,6 +142,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -215,6 +219,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/Service/RoleResource.cs b/src/Twilio/Rest/Chat/V1/Service/RoleResource.cs index 61d2402cd..a318ea444 100644 --- a/src/Twilio/Rest/Chat/V1/Service/RoleResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/RoleResource.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; @@ -488,6 +489,22 @@ public static RoleResource 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 Role resource. diff --git a/src/Twilio/Rest/Chat/V1/Service/User/UserChannelOptions.cs b/src/Twilio/Rest/Chat/V1/Service/User/UserChannelOptions.cs index a591db257..ca31eb6b4 100644 --- a/src/Twilio/Rest/Chat/V1/Service/User/UserChannelOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/User/UserChannelOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/Service/User/UserChannelResource.cs b/src/Twilio/Rest/Chat/V1/Service/User/UserChannelResource.cs index acdb06de7..2f083bde4 100644 --- a/src/Twilio/Rest/Chat/V1/Service/User/UserChannelResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/User/UserChannelResource.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; @@ -195,6 +196,22 @@ public static UserChannelResource 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/api/rest/account) that created the User Channel resource. diff --git a/src/Twilio/Rest/Chat/V1/Service/UserOptions.cs b/src/Twilio/Rest/Chat/V1/Service/UserOptions.cs index f6ae4a8e5..30dfb4d1e 100644 --- a/src/Twilio/Rest/Chat/V1/Service/UserOptions.cs +++ b/src/Twilio/Rest/Chat/V1/Service/UserOptions.cs @@ -77,6 +77,7 @@ public List> GetParams() } return p; } + } @@ -109,6 +110,7 @@ public List> GetParams() return p; } + } @@ -143,6 +145,7 @@ public List> GetParams() return p; } + } @@ -176,6 +179,7 @@ public List> GetParams() } return p; } + } @@ -230,6 +234,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/Service/UserResource.cs b/src/Twilio/Rest/Chat/V1/Service/UserResource.cs index 1542360ce..1b0c3fdd8 100644 --- a/src/Twilio/Rest/Chat/V1/Service/UserResource.cs +++ b/src/Twilio/Rest/Chat/V1/Service/UserResource.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 UserResource 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 User resource. diff --git a/src/Twilio/Rest/Chat/V1/ServiceOptions.cs b/src/Twilio/Rest/Chat/V1/ServiceOptions.cs index c0df9d989..b29d1af04 100644 --- a/src/Twilio/Rest/Chat/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/Chat/V1/ServiceOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } @@ -78,6 +79,7 @@ public List> GetParams() return p; } + } @@ -107,6 +109,7 @@ public List> GetParams() return p; } + } @@ -131,6 +134,7 @@ public List> GetParams() } return p; } + } @@ -538,6 +542,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V1/ServiceResource.cs b/src/Twilio/Rest/Chat/V1/ServiceResource.cs index 0b547fa9b..2b5ecebd4 100644 --- a/src/Twilio/Rest/Chat/V1/ServiceResource.cs +++ b/src/Twilio/Rest/Chat/V1/ServiceResource.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; @@ -652,6 +653,22 @@ public static ServiceResource 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 Service resource. diff --git a/src/Twilio/Rest/Chat/V2/CredentialOptions.cs b/src/Twilio/Rest/Chat/V2/CredentialOptions.cs index fae2af98b..4b38ea651 100644 --- a/src/Twilio/Rest/Chat/V2/CredentialOptions.cs +++ b/src/Twilio/Rest/Chat/V2/CredentialOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -243,6 +247,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V2/CredentialResource.cs b/src/Twilio/Rest/Chat/V2/CredentialResource.cs index af186316c..c70006f9e 100644 --- a/src/Twilio/Rest/Chat/V2/CredentialResource.cs +++ b/src/Twilio/Rest/Chat/V2/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); + } + } /// The unique string that we created to identify the Credential resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/BindingOptions.cs b/src/Twilio/Rest/Chat/V2/Service/BindingOptions.cs index 476b18244..ce544042f 100644 --- a/src/Twilio/Rest/Chat/V2/Service/BindingOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/BindingOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -86,6 +87,7 @@ public List> GetParams() return p; } + } @@ -135,6 +137,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V2/Service/BindingResource.cs b/src/Twilio/Rest/Chat/V2/Service/BindingResource.cs index 7c49e9c73..074efaa0e 100644 --- a/src/Twilio/Rest/Chat/V2/Service/BindingResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/BindingResource.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; @@ -339,6 +340,22 @@ public static BindingResource 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 Binding resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.cs index f78f36627..ef980bd9b 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() return p; } + } @@ -144,6 +146,7 @@ public List> GetParams() return p; } + } @@ -190,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/InviteResource.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/InviteResource.cs index ba12e1d79..8254f36f1 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/InviteResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/InviteResource.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; @@ -418,6 +419,22 @@ public static InviteResource 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 Invite resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.cs index 06a79ecca..d233ffd2e 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.cs @@ -106,6 +106,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -156,6 +157,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -205,6 +207,7 @@ public List> GetParams() return p; } + } @@ -251,6 +254,7 @@ public List> GetParams() } return p; } + } @@ -334,6 +338,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/MemberResource.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/MemberResource.cs index 6c5f0a38c..8ac2f2b9e 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/MemberResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/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; @@ -564,6 +565,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 unique string that we created to identify the Member resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.cs index 90a59cfb3..8e1a61802 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.cs @@ -104,6 +104,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -154,6 +155,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -203,6 +205,7 @@ public List> GetParams() return p; } + } @@ -248,6 +251,7 @@ public List> GetParams() } return p; } + } @@ -331,6 +335,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/MessageResource.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/MessageResource.cs index 2a44e7c64..b1be361d9 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/MessageResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/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; @@ -576,6 +577,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 unique string that we created to identify the Message resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.cs index 449c07c64..f9f850352 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.cs @@ -105,6 +105,7 @@ public List> GetParams() } return p; } + } @@ -142,6 +143,7 @@ public List> GetParams() return p; } + } @@ -181,6 +183,7 @@ public List> GetParams() return p; } + } @@ -219,6 +222,7 @@ public List> GetParams() } return p; } + } @@ -301,6 +305,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookResource.cs b/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookResource.cs index 7abc75de3..e2d659c06 100644 --- a/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookResource.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 WebhookResource 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 Channel Webhook resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.cs b/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.cs index 85b3f61fa..7aefeacc7 100644 --- a/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.cs @@ -99,6 +99,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -144,6 +145,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -188,6 +190,7 @@ public List> GetParams() return p; } + } @@ -229,6 +232,7 @@ public List> GetParams() } return p; } + } @@ -307,6 +311,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Chat/V2/Service/ChannelResource.cs b/src/Twilio/Rest/Chat/V2/Service/ChannelResource.cs index b03fdc5bd..47d1b3c7a 100644 --- a/src/Twilio/Rest/Chat/V2/Service/ChannelResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/ChannelResource.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; @@ -550,6 +551,22 @@ public static ChannelResource 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 Channel resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/RoleOptions.cs b/src/Twilio/Rest/Chat/V2/Service/RoleOptions.cs index 9e8fadef2..0d461a01d 100644 --- a/src/Twilio/Rest/Chat/V2/Service/RoleOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/RoleOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -106,6 +107,7 @@ public List> GetParams() return p; } + } @@ -140,6 +142,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -215,6 +219,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V2/Service/RoleResource.cs b/src/Twilio/Rest/Chat/V2/Service/RoleResource.cs index d243a07e3..3460a39ba 100644 --- a/src/Twilio/Rest/Chat/V2/Service/RoleResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/RoleResource.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; @@ -488,6 +489,22 @@ public static RoleResource 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 Role resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.cs b/src/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.cs index 3238b69a8..db2c29d48 100644 --- a/src/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -142,6 +144,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V2/Service/User/UserBindingResource.cs b/src/Twilio/Rest/Chat/V2/Service/User/UserBindingResource.cs index 6b53cbcbc..8bae30387 100644 --- a/src/Twilio/Rest/Chat/V2/Service/User/UserBindingResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/User/UserBindingResource.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; @@ -350,6 +351,22 @@ public static UserBindingResource 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 User Binding resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.cs b/src/Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.cs index c7c459850..cbe5f1c92 100644 --- a/src/Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.cs @@ -60,6 +60,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -109,6 +110,7 @@ public List> GetParams() return p; } + } @@ -147,6 +149,7 @@ public List> GetParams() } return p; } + } @@ -206,6 +209,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V2/Service/User/UserChannelResource.cs b/src/Twilio/Rest/Chat/V2/Service/User/UserChannelResource.cs index 39026a823..ab2b4d7f9 100644 --- a/src/Twilio/Rest/Chat/V2/Service/User/UserChannelResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/User/UserChannelResource.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; @@ -465,6 +466,22 @@ public static UserChannelResource 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 User Channel resource. diff --git a/src/Twilio/Rest/Chat/V2/Service/UserOptions.cs b/src/Twilio/Rest/Chat/V2/Service/UserOptions.cs index 16227563d..fbead2ba2 100644 --- a/src/Twilio/Rest/Chat/V2/Service/UserOptions.cs +++ b/src/Twilio/Rest/Chat/V2/Service/UserOptions.cs @@ -80,6 +80,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -122,6 +123,7 @@ public List> GetParams() return p; } + } @@ -156,6 +158,7 @@ public List> GetParams() return p; } + } @@ -189,6 +192,7 @@ public List> GetParams() } return p; } + } @@ -246,6 +250,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Chat/V2/Service/UserResource.cs b/src/Twilio/Rest/Chat/V2/Service/UserResource.cs index 857765400..3b0338de6 100644 --- a/src/Twilio/Rest/Chat/V2/Service/UserResource.cs +++ b/src/Twilio/Rest/Chat/V2/Service/UserResource.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; @@ -507,6 +508,22 @@ public static UserResource 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 User resource. diff --git a/src/Twilio/Rest/Chat/V2/ServiceOptions.cs b/src/Twilio/Rest/Chat/V2/ServiceOptions.cs index 6a1e07058..1a4bd6837 100644 --- a/src/Twilio/Rest/Chat/V2/ServiceOptions.cs +++ b/src/Twilio/Rest/Chat/V2/ServiceOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } @@ -78,6 +79,7 @@ public List> GetParams() return p; } + } @@ -107,6 +109,7 @@ public List> GetParams() return p; } + } @@ -131,6 +134,7 @@ public List> GetParams() } return p; } + } @@ -377,6 +381,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Chat/V2/ServiceResource.cs b/src/Twilio/Rest/Chat/V2/ServiceResource.cs index 23c3235a0..b339ff3f3 100644 --- a/src/Twilio/Rest/Chat/V2/ServiceResource.cs +++ b/src/Twilio/Rest/Chat/V2/ServiceResource.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; @@ -560,6 +561,22 @@ public static ServiceResource 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 Service resource. diff --git a/src/Twilio/Rest/Chat/V3/ChannelOptions.cs b/src/Twilio/Rest/Chat/V3/ChannelOptions.cs index a4f7f039e..23584e9e7 100644 --- a/src/Twilio/Rest/Chat/V3/ChannelOptions.cs +++ b/src/Twilio/Rest/Chat/V3/ChannelOptions.cs @@ -39,7 +39,7 @@ public class UpdateChannelOptions : IOptions public ChannelResource.ChannelTypeEnum Type { get; set; } - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to. public string MessagingServiceSid { get; set; } @@ -69,6 +69,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Chat/V3/ChannelResource.cs b/src/Twilio/Rest/Chat/V3/ChannelResource.cs index b5de15a1f..dfc6c5443 100644 --- a/src/Twilio/Rest/Chat/V3/ChannelResource.cs +++ b/src/Twilio/Rest/Chat/V3/ChannelResource.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; @@ -106,7 +107,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The unique SID identifier of the Service. /// A 34 character string that uniquely identifies this Channel. /// - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Channel @@ -127,7 +128,7 @@ public static ChannelResource Update( /// The unique SID identifier of the Service. /// A 34 character string that uniquely identifies this Channel. /// - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Channel @@ -160,6 +161,22 @@ public static ChannelResource 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 Channel resource. @@ -210,7 +227,7 @@ public static ChannelResource FromJson(string json) [JsonProperty("messages_count")] public int? MessagesCount { get; private set; } - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to. [JsonProperty("messaging_service_sid")] public string MessagingServiceSid { get; private set; } diff --git a/src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs b/src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs index 773c7c804..3653c6286 100644 --- a/src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs +++ b/src/Twilio/Rest/Content/V1/Content/ApprovalFetchOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Content/V1/Content/ApprovalFetchResource.cs b/src/Twilio/Rest/Content/V1/Content/ApprovalFetchResource.cs index b7145b25f..1c1025432 100644 --- a/src/Twilio/Rest/Content/V1/Content/ApprovalFetchResource.cs +++ b/src/Twilio/Rest/Content/V1/Content/ApprovalFetchResource.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 ApprovalFetchResource 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 Content resource. diff --git a/src/Twilio/Rest/Content/V1/ContentAndApprovalsOptions.cs b/src/Twilio/Rest/Content/V1/ContentAndApprovalsOptions.cs index 27bc7c789..5fddc7587 100644 --- a/src/Twilio/Rest/Content/V1/ContentAndApprovalsOptions.cs +++ b/src/Twilio/Rest/Content/V1/ContentAndApprovalsOptions.cs @@ -42,6 +42,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Content/V1/ContentAndApprovalsResource.cs b/src/Twilio/Rest/Content/V1/ContentAndApprovalsResource.cs index dc9fd843c..659d0af8e 100644 --- a/src/Twilio/Rest/Content/V1/ContentAndApprovalsResource.cs +++ b/src/Twilio/Rest/Content/V1/ContentAndApprovalsResource.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; @@ -169,6 +170,22 @@ public static ContentAndApprovalsResource 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 the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. diff --git a/src/Twilio/Rest/Content/V1/ContentOptions.cs b/src/Twilio/Rest/Content/V1/ContentOptions.cs index b1993f871..628b22f41 100644 --- a/src/Twilio/Rest/Content/V1/ContentOptions.cs +++ b/src/Twilio/Rest/Content/V1/ContentOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -76,6 +77,7 @@ public List> GetParams() return p; } + } @@ -100,6 +102,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Content/V1/ContentResource.cs b/src/Twilio/Rest/Content/V1/ContentResource.cs index 06b1922e7..290bbe11b 100644 --- a/src/Twilio/Rest/Content/V1/ContentResource.cs +++ b/src/Twilio/Rest/Content/V1/ContentResource.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; @@ -302,6 +303,22 @@ public static ContentResource 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 the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. diff --git a/src/Twilio/Rest/Content/V1/LegacyContentOptions.cs b/src/Twilio/Rest/Content/V1/LegacyContentOptions.cs index f97752294..782e7483b 100644 --- a/src/Twilio/Rest/Content/V1/LegacyContentOptions.cs +++ b/src/Twilio/Rest/Content/V1/LegacyContentOptions.cs @@ -42,6 +42,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Content/V1/LegacyContentResource.cs b/src/Twilio/Rest/Content/V1/LegacyContentResource.cs index 7ce732109..2655b5a9f 100644 --- a/src/Twilio/Rest/Content/V1/LegacyContentResource.cs +++ b/src/Twilio/Rest/Content/V1/LegacyContentResource.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; @@ -169,6 +170,22 @@ public static LegacyContentResource 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 the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. diff --git a/src/Twilio/Rest/Conversations/V1/AddressConfigurationOptions.cs b/src/Twilio/Rest/Conversations/V1/AddressConfigurationOptions.cs index 43f940ad2..53b092ee8 100644 --- a/src/Twilio/Rest/Conversations/V1/AddressConfigurationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/AddressConfigurationOptions.cs @@ -131,6 +131,7 @@ public List> GetParams() } return p; } + } @@ -158,6 +159,7 @@ public List> GetParams() return p; } + } @@ -187,6 +189,7 @@ public List> GetParams() return p; } + } @@ -218,6 +221,7 @@ public List> GetParams() } return p; } + } @@ -310,6 +314,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/AddressConfigurationResource.cs b/src/Twilio/Rest/Conversations/V1/AddressConfigurationResource.cs index f0817d165..1b6daafa4 100644 --- a/src/Twilio/Rest/Conversations/V1/AddressConfigurationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/AddressConfigurationResource.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; @@ -55,6 +56,7 @@ public static implicit operator TypeEnum(string value) public static readonly TypeEnum Whatsapp = new TypeEnum("whatsapp"); public static readonly TypeEnum Messenger = new TypeEnum("messenger"); public static readonly TypeEnum Gbm = new TypeEnum("gbm"); + public static readonly TypeEnum Email = new TypeEnum("email"); } public sealed class AutoCreationTypeEnum : StringEnum @@ -559,6 +561,22 @@ public static AddressConfigurationResource 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/Conversations/V1/Configuration/WebhookOptions.cs b/src/Twilio/Rest/Conversations/V1/Configuration/WebhookOptions.cs index c6fa659fe..79c832f52 100644 --- a/src/Twilio/Rest/Conversations/V1/Configuration/WebhookOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Configuration/WebhookOptions.cs @@ -38,6 +38,7 @@ public List> GetParams() return p; } + } @@ -93,6 +94,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Configuration/WebhookResource.cs b/src/Twilio/Rest/Conversations/V1/Configuration/WebhookResource.cs index e21a24ae7..c21f7e389 100644 --- a/src/Twilio/Rest/Conversations/V1/Configuration/WebhookResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Configuration/WebhookResource.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; @@ -217,6 +218,22 @@ public static WebhookResource 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 conversation. diff --git a/src/Twilio/Rest/Conversations/V1/ConfigurationOptions.cs b/src/Twilio/Rest/Conversations/V1/ConfigurationOptions.cs index 49e8961f5..191e64a86 100644 --- a/src/Twilio/Rest/Conversations/V1/ConfigurationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/ConfigurationOptions.cs @@ -38,6 +38,7 @@ public List> GetParams() return p; } + } @@ -50,7 +51,7 @@ public class UpdateConfigurationOptions : IOptions /// The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. public string DefaultChatServiceSid { get; set; } - /// The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to use when creating a conversation. + /// The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to use when creating a conversation. public string DefaultMessagingServiceSid { get; set; } /// Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. @@ -86,6 +87,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/ConfigurationResource.cs b/src/Twilio/Rest/Conversations/V1/ConfigurationResource.cs index 0d2b0ae27..2236a7dcd 100644 --- a/src/Twilio/Rest/Conversations/V1/ConfigurationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/ConfigurationResource.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; @@ -135,7 +136,7 @@ public static async System.Threading.Tasks.Task UpdateAsy /// Update the global configuration of conversations on your account /// The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. - /// The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to use when creating a conversation. + /// The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to use when creating a conversation. /// Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// Default ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. /// Client to make requests to Twilio @@ -154,7 +155,7 @@ public static ConfigurationResource Update( #if !NET35 /// Update the global configuration of conversations on your account /// The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. - /// The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to use when creating a conversation. + /// The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to use when creating a conversation. /// Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// Default ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. /// Client to make requests to Twilio @@ -187,6 +188,22 @@ public static ConfigurationResource 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 this configuration. @@ -197,7 +214,7 @@ public static ConfigurationResource FromJson(string json) [JsonProperty("default_chat_service_sid")] public string DefaultChatServiceSid { get; private set; } - /// The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/services/api) used when creating a conversation. + /// The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) used when creating a conversation. [JsonProperty("default_messaging_service_sid")] public string DefaultMessagingServiceSid { get; private set; } diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptOptions.cs b/src/Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptOptions.cs index 0d41dc3c8..0dcb65da8 100644 --- a/src/Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptResource.cs b/src/Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptResource.cs index 5dab9159c..12b4055b3 100644 --- a/src/Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceiptResource.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 DeliveryReceiptResource 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 participant. diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.cs b/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.cs index 9f7e13b65..300c3b617 100644 --- a/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.cs @@ -58,6 +58,9 @@ public class CreateMessageOptions : IOptions /// A structurally valid JSON string that contains values to resolve Rich Content template variables. public string ContentVariables { get; set; } + /// The subject of the message, can be up to 256 characters long. + public string Subject { get; set; } + /// Construct a new CreateConversationMessageOptions /// The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. @@ -104,8 +107,13 @@ public List> GetParams() { p.Add(new KeyValuePair("ContentVariables", ContentVariables)); } + if (Subject != null) + { + p.Add(new KeyValuePair("Subject", Subject)); + } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -151,6 +159,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -195,6 +204,7 @@ public List> GetParams() return p; } + } @@ -235,6 +245,7 @@ public List> GetParams() } return p; } + } @@ -267,6 +278,9 @@ public class UpdateMessageOptions : IOptions /// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. public string Attributes { get; set; } + /// The subject of the message, can be up to 256 characters long. + public string Subject { get; set; } + /// Construct a new UpdateConversationMessageOptions @@ -304,8 +318,13 @@ public List> GetParams() { p.Add(new KeyValuePair("Attributes", Attributes)); } + if (Subject != null) + { + p.Add(new KeyValuePair("Subject", Subject)); + } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/MessageResource.cs b/src/Twilio/Rest/Conversations/V1/Conversation/MessageResource.cs index f908e34a1..c2bf2d2b0 100644 --- a/src/Twilio/Rest/Conversations/V1/Conversation/MessageResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Conversation/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; @@ -109,6 +110,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// The Media SID to be attached to the new Message. /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. /// A structurally valid JSON string that contains values to resolve Rich Content template variables. + /// The subject of the message, can be up to 256 characters long. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Message @@ -122,10 +124,11 @@ public static MessageResource Create( string mediaSid = null, string contentSid = null, string contentVariables = null, + string subject = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new CreateMessageOptions(pathConversationSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MediaSid = mediaSid, ContentSid = contentSid, ContentVariables = contentVariables, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new CreateMessageOptions(pathConversationSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MediaSid = mediaSid, ContentSid = contentSid, ContentVariables = contentVariables, Subject = subject, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return Create(options, client); } @@ -140,6 +143,7 @@ public static MessageResource Create( /// The Media SID to be attached to the new Message. /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. /// A structurally valid JSON string that contains values to resolve Rich Content template variables. + /// The subject of the message, can be up to 256 characters long. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Message @@ -153,10 +157,11 @@ public static async System.Threading.Tasks.Task CreateAsync( string mediaSid = null, string contentSid = null, string contentVariables = null, + string subject = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new CreateMessageOptions(pathConversationSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MediaSid = mediaSid, ContentSid = contentSid, ContentVariables = contentVariables, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new CreateMessageOptions(pathConversationSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MediaSid = mediaSid, ContentSid = contentSid, ContentVariables = contentVariables, Subject = subject, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return await CreateAsync(options, client); } #endif @@ -487,6 +492,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The date that this resource was created. /// The date that this resource was last updated. `null` if the message has not been edited. /// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + /// The subject of the message, can be up to 256 characters long. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Message @@ -498,10 +504,11 @@ public static MessageResource Update( DateTime? dateCreated = null, DateTime? dateUpdated = null, string attributes = null, + string subject = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new UpdateMessageOptions(pathConversationSid, pathSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new UpdateMessageOptions(pathConversationSid, pathSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, Subject = subject, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return Update(options, client); } @@ -514,6 +521,7 @@ public static MessageResource Update( /// The date that this resource was created. /// The date that this resource was last updated. `null` if the message has not been edited. /// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + /// The subject of the message, can be up to 256 characters long. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Message @@ -525,10 +533,11 @@ public static async System.Threading.Tasks.Task UpdateAsync( DateTime? dateCreated = null, DateTime? dateUpdated = null, string attributes = null, + string subject = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new UpdateMessageOptions(pathConversationSid, pathSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new UpdateMessageOptions(pathConversationSid, pathSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, Subject = subject, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return await UpdateAsync(options, client); } #endif @@ -549,6 +558,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 unique ID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this message. diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.cs b/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.cs index fc32d1c63..3b2e19c7d 100644 --- a/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.cs @@ -106,6 +106,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -151,6 +152,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -195,6 +197,7 @@ public List> GetParams() return p; } + } @@ -228,6 +231,7 @@ public List> GetParams() } return p; } + } @@ -327,6 +331,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantResource.cs b/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantResource.cs index 94d43384d..abac796d1 100644 --- a/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Conversation/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; @@ -549,6 +550,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 unique ID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this participant. diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.cs b/src/Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.cs index 0ff0bcf72..7d29c41e2 100644 --- a/src/Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.cs @@ -100,6 +100,7 @@ public List> GetParams() } return p; } + } @@ -132,6 +133,7 @@ public List> GetParams() return p; } + } @@ -166,6 +168,7 @@ public List> GetParams() return p; } + } @@ -199,6 +202,7 @@ public List> GetParams() } return p; } + } @@ -269,6 +273,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Conversation/WebhookResource.cs b/src/Twilio/Rest/Conversations/V1/Conversation/WebhookResource.cs index a34f37f0d..7811b2073 100644 --- a/src/Twilio/Rest/Conversations/V1/Conversation/WebhookResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Conversation/WebhookResource.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; @@ -532,6 +533,22 @@ public static WebhookResource 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/Conversations/V1/ConversationOptions.cs b/src/Twilio/Rest/Conversations/V1/ConversationOptions.cs index 9dda2d26c..ccbd20a33 100644 --- a/src/Twilio/Rest/Conversations/V1/ConversationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/ConversationOptions.cs @@ -43,7 +43,7 @@ public class CreateConversationOptions : IOptions /// The date that this resource was last updated. public DateTime? DateUpdated { get; set; } - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. public string MessagingServiceSid { get; set; } /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. @@ -58,6 +58,12 @@ public class CreateConversationOptions : IOptions /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. public string TimersClosed { get; set; } + /// The default email address that will be used when sending outbound emails in this conversation. + public string BindingsEmailAddress { get; set; } + + /// The default name that will be used when sending outbound emails in this conversation. + public string BindingsEmailName { get; set; } + @@ -102,8 +108,17 @@ public List> GetParams() { p.Add(new KeyValuePair("Timers.Closed", TimersClosed)); } + if (BindingsEmailAddress != null) + { + p.Add(new KeyValuePair("Bindings.Email.Address", BindingsEmailAddress)); + } + if (BindingsEmailName != null) + { + p.Add(new KeyValuePair("Bindings.Email.Name", BindingsEmailName)); + } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -144,6 +159,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -183,6 +199,7 @@ public List> GetParams() return p; } + } @@ -228,6 +245,7 @@ public List> GetParams() } return p; } + } @@ -254,7 +272,7 @@ public class UpdateConversationOptions : IOptions /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. public string Attributes { get; set; } - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. public string MessagingServiceSid { get; set; } @@ -269,6 +287,12 @@ public class UpdateConversationOptions : IOptions /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. public string UniqueName { get; set; } + /// The default email address that will be used when sending outbound emails in this conversation. + public string BindingsEmailAddress { get; set; } + + /// The default name that will be used when sending outbound emails in this conversation. + public string BindingsEmailName { get; set; } + /// Construct a new UpdateConversationOptions @@ -320,8 +344,17 @@ public List> GetParams() { p.Add(new KeyValuePair("UniqueName", UniqueName)); } + if (BindingsEmailAddress != null) + { + p.Add(new KeyValuePair("Bindings.Email.Address", BindingsEmailAddress)); + } + if (BindingsEmailName != null) + { + p.Add(new KeyValuePair("Bindings.Email.Name", BindingsEmailName)); + } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Conversations/V1/ConversationResource.cs b/src/Twilio/Rest/Conversations/V1/ConversationResource.cs index 031cf2c55..faed6f399 100644 --- a/src/Twilio/Rest/Conversations/V1/ConversationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/ConversationResource.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; @@ -104,11 +105,13 @@ public static async System.Threading.Tasks.Task CreateAsyn /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. /// The date that this resource was created. /// The date that this resource was last updated. - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. /// /// ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + /// The default email address that will be used when sending outbound emails in this conversation. + /// The default name that will be used when sending outbound emails in this conversation. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Conversation @@ -122,10 +125,12 @@ public static ConversationResource Create( ConversationResource.StateEnum state = null, string timersInactive = null, string timersClosed = null, + string bindingsEmailAddress = null, + string bindingsEmailName = null, ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new CreateConversationOptions(){ FriendlyName = friendlyName, UniqueName = uniqueName, DateCreated = dateCreated, DateUpdated = dateUpdated, MessagingServiceSid = messagingServiceSid, Attributes = attributes, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new CreateConversationOptions(){ FriendlyName = friendlyName, UniqueName = uniqueName, DateCreated = dateCreated, DateUpdated = dateUpdated, MessagingServiceSid = messagingServiceSid, Attributes = attributes, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, BindingsEmailAddress = bindingsEmailAddress, BindingsEmailName = bindingsEmailName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return Create(options, client); } @@ -135,11 +140,13 @@ public static ConversationResource Create( /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. /// The date that this resource was created. /// The date that this resource was last updated. - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. /// /// ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + /// The default email address that will be used when sending outbound emails in this conversation. + /// The default name that will be used when sending outbound emails in this conversation. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Conversation @@ -153,10 +160,12 @@ public static async System.Threading.Tasks.Task CreateAsyn ConversationResource.StateEnum state = null, string timersInactive = null, string timersClosed = null, + string bindingsEmailAddress = null, + string bindingsEmailName = null, ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new CreateConversationOptions(){ FriendlyName = friendlyName, UniqueName = uniqueName, DateCreated = dateCreated, DateUpdated = dateUpdated, MessagingServiceSid = messagingServiceSid, Attributes = attributes, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new CreateConversationOptions(){ FriendlyName = friendlyName, UniqueName = uniqueName, DateCreated = dateCreated, DateUpdated = dateUpdated, MessagingServiceSid = messagingServiceSid, Attributes = attributes, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, BindingsEmailAddress = bindingsEmailAddress, BindingsEmailName = bindingsEmailName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return await CreateAsync(options, client); } #endif @@ -476,11 +485,13 @@ public static async System.Threading.Tasks.Task UpdateAsyn /// The date that this resource was created. /// The date that this resource was last updated. /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. /// /// ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. + /// The default email address that will be used when sending outbound emails in this conversation. + /// The default name that will be used when sending outbound emails in this conversation. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Conversation @@ -495,10 +506,12 @@ public static ConversationResource Update( string timersInactive = null, string timersClosed = null, string uniqueName = null, + string bindingsEmailAddress = null, + string bindingsEmailName = null, ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new UpdateConversationOptions(pathSid){ FriendlyName = friendlyName, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingServiceSid = messagingServiceSid, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, UniqueName = uniqueName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new UpdateConversationOptions(pathSid){ FriendlyName = friendlyName, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingServiceSid = messagingServiceSid, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, UniqueName = uniqueName, BindingsEmailAddress = bindingsEmailAddress, BindingsEmailName = bindingsEmailName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return Update(options, client); } @@ -509,11 +522,13 @@ public static ConversationResource Update( /// The date that this resource was created. /// The date that this resource was last updated. /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. /// /// ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. + /// The default email address that will be used when sending outbound emails in this conversation. + /// The default name that will be used when sending outbound emails in this conversation. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Conversation @@ -528,10 +543,12 @@ public static async System.Threading.Tasks.Task UpdateAsyn string timersInactive = null, string timersClosed = null, string uniqueName = null, + string bindingsEmailAddress = null, + string bindingsEmailName = null, ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new UpdateConversationOptions(pathSid){ FriendlyName = friendlyName, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingServiceSid = messagingServiceSid, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, UniqueName = uniqueName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new UpdateConversationOptions(pathSid){ FriendlyName = friendlyName, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingServiceSid = messagingServiceSid, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, UniqueName = uniqueName, BindingsEmailAddress = bindingsEmailAddress, BindingsEmailName = bindingsEmailName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return await UpdateAsync(options, client); } #endif @@ -552,6 +569,22 @@ public static ConversationResource 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 conversation. @@ -562,7 +595,7 @@ public static ConversationResource FromJson(string json) [JsonProperty("chat_service_sid")] public string ChatServiceSid { get; private set; } - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. [JsonProperty("messaging_service_sid")] public string MessagingServiceSid { get; private set; } diff --git a/src/Twilio/Rest/Conversations/V1/CredentialOptions.cs b/src/Twilio/Rest/Conversations/V1/CredentialOptions.cs index 8a770b73d..a3ef26fbb 100644 --- a/src/Twilio/Rest/Conversations/V1/CredentialOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/CredentialOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -250,6 +254,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/CredentialResource.cs b/src/Twilio/Rest/Conversations/V1/CredentialResource.cs index 4a813fed3..6d1cf98c9 100644 --- a/src/Twilio/Rest/Conversations/V1/CredentialResource.cs +++ b/src/Twilio/Rest/Conversations/V1/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; @@ -502,6 +503,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/Conversations/V1/ParticipantConversationOptions.cs b/src/Twilio/Rest/Conversations/V1/ParticipantConversationOptions.cs index de21b70ae..429919e4b 100644 --- a/src/Twilio/Rest/Conversations/V1/ParticipantConversationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/ParticipantConversationOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/ParticipantConversationResource.cs b/src/Twilio/Rest/Conversations/V1/ParticipantConversationResource.cs index 0b797bd75..8aff40c50 100644 --- a/src/Twilio/Rest/Conversations/V1/ParticipantConversationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/ParticipantConversationResource.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; @@ -191,6 +192,22 @@ public static ParticipantConversationResource 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 conversation. diff --git a/src/Twilio/Rest/Conversations/V1/RoleOptions.cs b/src/Twilio/Rest/Conversations/V1/RoleOptions.cs index 440a2ba5c..006c7df2e 100644 --- a/src/Twilio/Rest/Conversations/V1/RoleOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/RoleOptions.cs @@ -69,6 +69,7 @@ public List> GetParams() } return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -125,6 +127,7 @@ public List> GetParams() return p; } + } @@ -149,6 +152,7 @@ public List> GetParams() } return p; } + } @@ -186,6 +190,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/RoleResource.cs b/src/Twilio/Rest/Conversations/V1/RoleResource.cs index 616f070cd..9f0e288a0 100644 --- a/src/Twilio/Rest/Conversations/V1/RoleResource.cs +++ b/src/Twilio/Rest/Conversations/V1/RoleResource.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; @@ -461,6 +462,22 @@ public static RoleResource 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 Role resource. diff --git a/src/Twilio/Rest/Conversations/V1/Service/BindingOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/BindingOptions.cs index bdd103285..c143e5a3b 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/BindingOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/BindingOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -86,6 +87,7 @@ public List> GetParams() return p; } + } @@ -135,6 +137,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/BindingResource.cs b/src/Twilio/Rest/Conversations/V1/Service/BindingResource.cs index ab136892a..0dc88aff2 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/BindingResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/BindingResource.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; @@ -339,6 +340,22 @@ public static BindingResource 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/Conversations/V1/Service/Configuration/NotificationOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/Configuration/NotificationOptions.cs index 72e9ee70d..3bf7ca473 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Configuration/NotificationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Configuration/NotificationOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -167,6 +168,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/Configuration/NotificationResource.cs b/src/Twilio/Rest/Conversations/V1/Service/Configuration/NotificationResource.cs index 2cdde8958..6ae8a53a8 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Configuration/NotificationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Configuration/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; @@ -234,6 +235,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 unique ID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this configuration. diff --git a/src/Twilio/Rest/Conversations/V1/Service/Configuration/WebhookOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/Configuration/WebhookOptions.cs index 5d64da2af..90f20d4b7 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Configuration/WebhookOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Configuration/WebhookOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/Configuration/WebhookResource.cs b/src/Twilio/Rest/Conversations/V1/Service/Configuration/WebhookResource.cs index cd8ff18bd..58145e4b1 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Configuration/WebhookResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Configuration/WebhookResource.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 WebhookResource 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 service. diff --git a/src/Twilio/Rest/Conversations/V1/Service/ConfigurationOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/ConfigurationOptions.cs index 6e8451906..327821654 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/ConfigurationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/ConfigurationOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/ConfigurationResource.cs b/src/Twilio/Rest/Conversations/V1/Service/ConfigurationResource.cs index 6f67accbc..397535a78 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/ConfigurationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/ConfigurationResource.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; @@ -198,6 +199,22 @@ public static ConfigurationResource 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 Service configuration resource. diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptOptions.cs index 83765507e..eedd8a47a 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptOptions.cs @@ -62,6 +62,7 @@ public List> GetParams() return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptResource.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptResource.cs index d7f05a822..91d642b1c 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/Message/DeliveryReceiptResource.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; @@ -283,6 +284,22 @@ public static DeliveryReceiptResource 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 participant. diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.cs index cb1a9b7c5..8b8210868 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageOptions.cs @@ -61,6 +61,9 @@ public class CreateMessageOptions : IOptions /// A structurally valid JSON string that contains values to resolve Rich Content template variables. public string ContentVariables { get; set; } + /// The subject of the message, can be up to 256 characters long. + public string Subject { get; set; } + /// Construct a new CreateServiceConversationMessageOptions /// The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. @@ -109,8 +112,13 @@ public List> GetParams() { p.Add(new KeyValuePair("ContentVariables", ContentVariables)); } + if (Subject != null) + { + p.Add(new KeyValuePair("Subject", Subject)); + } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -161,6 +169,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -210,6 +219,7 @@ public List> GetParams() return p; } + } @@ -255,6 +265,7 @@ public List> GetParams() } return p; } + } @@ -290,6 +301,9 @@ public class UpdateMessageOptions : IOptions /// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. public string Attributes { get; set; } + /// The subject of the message, can be up to 256 characters long. + public string Subject { get; set; } + /// Construct a new UpdateServiceConversationMessageOptions @@ -329,8 +343,13 @@ public List> GetParams() { p.Add(new KeyValuePair("Attributes", Attributes)); } + if (Subject != null) + { + p.Add(new KeyValuePair("Subject", Subject)); + } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageResource.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageResource.cs index d60a5f483..6d16a3508 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/MessageResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/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; @@ -112,6 +113,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// The Media SID to be attached to the new Message. /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. /// A structurally valid JSON string that contains values to resolve Rich Content template variables. + /// The subject of the message, can be up to 256 characters long. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Message @@ -126,10 +128,11 @@ public static MessageResource Create( string mediaSid = null, string contentSid = null, string contentVariables = null, + string subject = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new CreateMessageOptions(pathChatServiceSid, pathConversationSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MediaSid = mediaSid, ContentSid = contentSid, ContentVariables = contentVariables, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new CreateMessageOptions(pathChatServiceSid, pathConversationSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MediaSid = mediaSid, ContentSid = contentSid, ContentVariables = contentVariables, Subject = subject, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return Create(options, client); } @@ -145,6 +148,7 @@ public static MessageResource Create( /// The Media SID to be attached to the new Message. /// The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. /// A structurally valid JSON string that contains values to resolve Rich Content template variables. + /// The subject of the message, can be up to 256 characters long. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Message @@ -159,10 +163,11 @@ public static async System.Threading.Tasks.Task CreateAsync( string mediaSid = null, string contentSid = null, string contentVariables = null, + string subject = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new CreateMessageOptions(pathChatServiceSid, pathConversationSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MediaSid = mediaSid, ContentSid = contentSid, ContentVariables = contentVariables, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new CreateMessageOptions(pathChatServiceSid, pathConversationSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MediaSid = mediaSid, ContentSid = contentSid, ContentVariables = contentVariables, Subject = subject, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return await CreateAsync(options, client); } #endif @@ -511,6 +516,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// The date that this resource was created. /// The date that this resource was last updated. `null` if the message has not been edited. /// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + /// The subject of the message, can be up to 256 characters long. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Message @@ -523,10 +529,11 @@ public static MessageResource Update( DateTime? dateCreated = null, DateTime? dateUpdated = null, string attributes = null, + string subject = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new UpdateMessageOptions(pathChatServiceSid, pathConversationSid, pathSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new UpdateMessageOptions(pathChatServiceSid, pathConversationSid, pathSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, Subject = subject, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return Update(options, client); } @@ -540,6 +547,7 @@ public static MessageResource Update( /// The date that this resource was created. /// The date that this resource was last updated. `null` if the message has not been edited. /// A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + /// The subject of the message, can be up to 256 characters long. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Message @@ -552,10 +560,11 @@ public static async System.Threading.Tasks.Task UpdateAsync( DateTime? dateCreated = null, DateTime? dateUpdated = null, string attributes = null, + string subject = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new UpdateMessageOptions(pathChatServiceSid, pathConversationSid, pathSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new UpdateMessageOptions(pathChatServiceSid, pathConversationSid, pathSid){ Author = author, Body = body, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, Subject = subject, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return await UpdateAsync(options, client); } #endif @@ -576,6 +585,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 unique ID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this message. diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/ParticipantOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/ParticipantOptions.cs index b58bae770..ee0b2aa5a 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/ParticipantOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/ParticipantOptions.cs @@ -111,6 +111,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -161,6 +162,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -210,6 +212,7 @@ public List> GetParams() return p; } + } @@ -248,6 +251,7 @@ public List> GetParams() } return p; } + } @@ -352,6 +356,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/ParticipantResource.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/ParticipantResource.cs index 326e36489..1554ab3bb 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/ParticipantResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/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; @@ -576,6 +577,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 unique ID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this participant. diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/WebhookOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/WebhookOptions.cs index 9bd207121..0774d1202 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/WebhookOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/WebhookOptions.cs @@ -105,6 +105,7 @@ public List> GetParams() } return p; } + } @@ -142,6 +143,7 @@ public List> GetParams() return p; } + } @@ -181,6 +183,7 @@ public List> GetParams() return p; } + } @@ -219,6 +222,7 @@ public List> GetParams() } return p; } + } @@ -294,6 +298,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/Conversation/WebhookResource.cs b/src/Twilio/Rest/Conversations/V1/Service/Conversation/WebhookResource.cs index 7ebea499e..7a1d7fff6 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/Conversation/WebhookResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/Conversation/WebhookResource.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; @@ -559,6 +560,22 @@ public static WebhookResource 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/Conversations/V1/Service/ConversationOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/ConversationOptions.cs index 4351d335a..246d32146 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/ConversationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/ConversationOptions.cs @@ -43,7 +43,7 @@ public class CreateConversationOptions : IOptions /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. public string Attributes { get; set; } - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. public string MessagingServiceSid { get; set; } /// The date that this resource was created. @@ -61,6 +61,12 @@ public class CreateConversationOptions : IOptions /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. public string TimersClosed { get; set; } + /// The default email address that will be used when sending outbound emails in this conversation. + public string BindingsEmailAddress { get; set; } + + /// The default name that will be used when sending outbound emails in this conversation. + public string BindingsEmailName { get; set; } + /// Construct a new CreateServiceConversationOptions /// The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. @@ -111,8 +117,17 @@ public List> GetParams() { p.Add(new KeyValuePair("Timers.Closed", TimersClosed)); } + if (BindingsEmailAddress != null) + { + p.Add(new KeyValuePair("Bindings.Email.Address", BindingsEmailAddress)); + } + if (BindingsEmailName != null) + { + p.Add(new KeyValuePair("Bindings.Email.Name", BindingsEmailName)); + } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -158,6 +173,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -202,6 +218,7 @@ public List> GetParams() return p; } + } @@ -256,6 +273,7 @@ public List> GetParams() } return p; } + } @@ -285,7 +303,7 @@ public class UpdateConversationOptions : IOptions /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. public string Attributes { get; set; } - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. public string MessagingServiceSid { get; set; } @@ -300,6 +318,12 @@ public class UpdateConversationOptions : IOptions /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. public string UniqueName { get; set; } + /// The default email address that will be used when sending outbound emails in this conversation. + public string BindingsEmailAddress { get; set; } + + /// The default name that will be used when sending outbound emails in this conversation. + public string BindingsEmailName { get; set; } + /// Construct a new UpdateServiceConversationOptions @@ -353,8 +377,17 @@ public List> GetParams() { p.Add(new KeyValuePair("UniqueName", UniqueName)); } + if (BindingsEmailAddress != null) + { + p.Add(new KeyValuePair("Bindings.Email.Address", BindingsEmailAddress)); + } + if (BindingsEmailName != null) + { + p.Add(new KeyValuePair("Bindings.Email.Name", BindingsEmailName)); + } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Conversations/V1/Service/ConversationResource.cs b/src/Twilio/Rest/Conversations/V1/Service/ConversationResource.cs index 793265ffb..84b943910 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/ConversationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/ConversationResource.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; @@ -106,12 +107,14 @@ public static async System.Threading.Tasks.Task CreateAsyn /// The human-readable name of this conversation, limited to 256 characters. Optional. /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. /// The date that this resource was created. /// The date that this resource was last updated. /// /// ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + /// The default email address that will be used when sending outbound emails in this conversation. + /// The default name that will be used when sending outbound emails in this conversation. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Conversation @@ -126,10 +129,12 @@ public static ConversationResource Create( ConversationResource.StateEnum state = null, string timersInactive = null, string timersClosed = null, + string bindingsEmailAddress = null, + string bindingsEmailName = null, ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new CreateConversationOptions(pathChatServiceSid){ FriendlyName = friendlyName, UniqueName = uniqueName, Attributes = attributes, MessagingServiceSid = messagingServiceSid, DateCreated = dateCreated, DateUpdated = dateUpdated, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new CreateConversationOptions(pathChatServiceSid){ FriendlyName = friendlyName, UniqueName = uniqueName, Attributes = attributes, MessagingServiceSid = messagingServiceSid, DateCreated = dateCreated, DateUpdated = dateUpdated, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, BindingsEmailAddress = bindingsEmailAddress, BindingsEmailName = bindingsEmailName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return Create(options, client); } @@ -139,12 +144,14 @@ public static ConversationResource Create( /// The human-readable name of this conversation, limited to 256 characters. Optional. /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. /// The date that this resource was created. /// The date that this resource was last updated. /// /// ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + /// The default email address that will be used when sending outbound emails in this conversation. + /// The default name that will be used when sending outbound emails in this conversation. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Conversation @@ -159,10 +166,12 @@ public static async System.Threading.Tasks.Task CreateAsyn ConversationResource.StateEnum state = null, string timersInactive = null, string timersClosed = null, + string bindingsEmailAddress = null, + string bindingsEmailName = null, ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new CreateConversationOptions(pathChatServiceSid){ FriendlyName = friendlyName, UniqueName = uniqueName, Attributes = attributes, MessagingServiceSid = messagingServiceSid, DateCreated = dateCreated, DateUpdated = dateUpdated, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new CreateConversationOptions(pathChatServiceSid){ FriendlyName = friendlyName, UniqueName = uniqueName, Attributes = attributes, MessagingServiceSid = messagingServiceSid, DateCreated = dateCreated, DateUpdated = dateUpdated, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, BindingsEmailAddress = bindingsEmailAddress, BindingsEmailName = bindingsEmailName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return await CreateAsync(options, client); } #endif @@ -500,11 +509,13 @@ public static async System.Threading.Tasks.Task UpdateAsyn /// The date that this resource was created. /// The date that this resource was last updated. /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. /// /// ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. + /// The default email address that will be used when sending outbound emails in this conversation. + /// The default name that will be used when sending outbound emails in this conversation. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// A single instance of Conversation @@ -520,10 +531,12 @@ public static ConversationResource Update( string timersInactive = null, string timersClosed = null, string uniqueName = null, + string bindingsEmailAddress = null, + string bindingsEmailName = null, ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new UpdateConversationOptions(pathChatServiceSid, pathSid){ FriendlyName = friendlyName, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingServiceSid = messagingServiceSid, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, UniqueName = uniqueName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new UpdateConversationOptions(pathChatServiceSid, pathSid){ FriendlyName = friendlyName, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingServiceSid = messagingServiceSid, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, UniqueName = uniqueName, BindingsEmailAddress = bindingsEmailAddress, BindingsEmailName = bindingsEmailName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return Update(options, client); } @@ -535,11 +548,13 @@ public static ConversationResource Update( /// The date that this resource was created. /// The date that this resource was last updated. /// An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. /// /// ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. /// ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. /// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. + /// The default email address that will be used when sending outbound emails in this conversation. + /// The default name that will be used when sending outbound emails in this conversation. /// The X-Twilio-Webhook-Enabled HTTP request header /// Client to make requests to Twilio /// Task that resolves to A single instance of Conversation @@ -555,10 +570,12 @@ public static async System.Threading.Tasks.Task UpdateAsyn string timersInactive = null, string timersClosed = null, string uniqueName = null, + string bindingsEmailAddress = null, + string bindingsEmailName = null, ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { - var options = new UpdateConversationOptions(pathChatServiceSid, pathSid){ FriendlyName = friendlyName, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingServiceSid = messagingServiceSid, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, UniqueName = uniqueName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; + var options = new UpdateConversationOptions(pathChatServiceSid, pathSid){ FriendlyName = friendlyName, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingServiceSid = messagingServiceSid, State = state, TimersInactive = timersInactive, TimersClosed = timersClosed, UniqueName = uniqueName, BindingsEmailAddress = bindingsEmailAddress, BindingsEmailName = bindingsEmailName, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return await UpdateAsync(options, client); } #endif @@ -579,6 +596,22 @@ public static ConversationResource 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 conversation. @@ -589,7 +622,7 @@ public static ConversationResource FromJson(string json) [JsonProperty("chat_service_sid")] public string ChatServiceSid { get; private set; } - /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this conversation belongs to. + /// The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. [JsonProperty("messaging_service_sid")] public string MessagingServiceSid { get; private set; } diff --git a/src/Twilio/Rest/Conversations/V1/Service/ParticipantConversationOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/ParticipantConversationOptions.cs index 1b73ba231..da504ca4f 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/ParticipantConversationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/ParticipantConversationOptions.cs @@ -65,6 +65,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/ParticipantConversationResource.cs b/src/Twilio/Rest/Conversations/V1/Service/ParticipantConversationResource.cs index b2db3329c..3a8baa254 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/ParticipantConversationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/ParticipantConversationResource.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; @@ -197,6 +198,22 @@ public static ParticipantConversationResource 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 conversation. diff --git a/src/Twilio/Rest/Conversations/V1/Service/RoleOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/RoleOptions.cs index fa7eae161..201d066db 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/RoleOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/RoleOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -106,6 +107,7 @@ public List> GetParams() return p; } + } @@ -140,6 +142,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -215,6 +219,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/RoleResource.cs b/src/Twilio/Rest/Conversations/V1/Service/RoleResource.cs index c8975a418..f15370260 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/RoleResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/RoleResource.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; @@ -488,6 +489,22 @@ public static RoleResource 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 Role resource. diff --git a/src/Twilio/Rest/Conversations/V1/Service/User/UserConversationOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/User/UserConversationOptions.cs index 9242e642c..9a5387187 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/User/UserConversationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/User/UserConversationOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -193,6 +196,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/Service/User/UserConversationResource.cs b/src/Twilio/Rest/Conversations/V1/Service/User/UserConversationResource.cs index 061bb3d96..9d43f4584 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/User/UserConversationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/User/UserConversationResource.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 UserConversationResource 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 conversation. diff --git a/src/Twilio/Rest/Conversations/V1/Service/UserOptions.cs b/src/Twilio/Rest/Conversations/V1/Service/UserOptions.cs index 8e26c3f9e..28531f492 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/UserOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/UserOptions.cs @@ -80,6 +80,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -125,6 +126,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -169,6 +171,7 @@ public List> GetParams() return p; } + } @@ -202,6 +205,7 @@ public List> GetParams() } return p; } + } @@ -259,6 +263,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Conversations/V1/Service/UserResource.cs b/src/Twilio/Rest/Conversations/V1/Service/UserResource.cs index 4a355e496..30624aed5 100644 --- a/src/Twilio/Rest/Conversations/V1/Service/UserResource.cs +++ b/src/Twilio/Rest/Conversations/V1/Service/UserResource.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; @@ -509,6 +510,22 @@ public static UserResource 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 User resource. diff --git a/src/Twilio/Rest/Conversations/V1/ServiceOptions.cs b/src/Twilio/Rest/Conversations/V1/ServiceOptions.cs index 0a47847c2..5b2c8a7e2 100644 --- a/src/Twilio/Rest/Conversations/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/ServiceOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } @@ -78,6 +79,7 @@ public List> GetParams() return p; } + } @@ -107,6 +109,7 @@ public List> GetParams() return p; } + } @@ -131,6 +134,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/ServiceResource.cs b/src/Twilio/Rest/Conversations/V1/ServiceResource.cs index 382cee45c..e9447c815 100644 --- a/src/Twilio/Rest/Conversations/V1/ServiceResource.cs +++ b/src/Twilio/Rest/Conversations/V1/ServiceResource.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; @@ -368,6 +369,22 @@ public static ServiceResource 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 service. diff --git a/src/Twilio/Rest/Conversations/V1/User/UserConversationOptions.cs b/src/Twilio/Rest/Conversations/V1/User/UserConversationOptions.cs index 90edb3f32..95103eadf 100644 --- a/src/Twilio/Rest/Conversations/V1/User/UserConversationOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/User/UserConversationOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -86,6 +87,7 @@ public List> GetParams() return p; } + } @@ -119,6 +121,7 @@ public List> GetParams() } return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Conversations/V1/User/UserConversationResource.cs b/src/Twilio/Rest/Conversations/V1/User/UserConversationResource.cs index d833f73f9..6df7e8e89 100644 --- a/src/Twilio/Rest/Conversations/V1/User/UserConversationResource.cs +++ b/src/Twilio/Rest/Conversations/V1/User/UserConversationResource.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; @@ -430,6 +431,22 @@ public static UserConversationResource 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 conversation. diff --git a/src/Twilio/Rest/Conversations/V1/UserOptions.cs b/src/Twilio/Rest/Conversations/V1/UserOptions.cs index a2d142a03..6ce707c27 100644 --- a/src/Twilio/Rest/Conversations/V1/UserOptions.cs +++ b/src/Twilio/Rest/Conversations/V1/UserOptions.cs @@ -75,6 +75,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -115,6 +116,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -154,6 +156,7 @@ public List> GetParams() return p; } + } @@ -178,6 +181,7 @@ public List> GetParams() } return p; } + } @@ -230,6 +234,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Conversations/V1/UserResource.cs b/src/Twilio/Rest/Conversations/V1/UserResource.cs index 205c2f133..b73b6ca6d 100644 --- a/src/Twilio/Rest/Conversations/V1/UserResource.cs +++ b/src/Twilio/Rest/Conversations/V1/UserResource.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; @@ -482,6 +483,22 @@ public static UserResource 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 User resource. diff --git a/src/Twilio/Rest/Events/V1/EventTypeOptions.cs b/src/Twilio/Rest/Events/V1/EventTypeOptions.cs index 64503653a..2d56dd789 100644 --- a/src/Twilio/Rest/Events/V1/EventTypeOptions.cs +++ b/src/Twilio/Rest/Events/V1/EventTypeOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -78,6 +79,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Events/V1/EventTypeResource.cs b/src/Twilio/Rest/Events/V1/EventTypeResource.cs index cbe2d1434..cd63a247b 100644 --- a/src/Twilio/Rest/Events/V1/EventTypeResource.cs +++ b/src/Twilio/Rest/Events/V1/EventTypeResource.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; @@ -238,6 +239,22 @@ public static EventTypeResource 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 string that uniquely identifies this Event Type. diff --git a/src/Twilio/Rest/Events/V1/Schema/SchemaVersionOptions.cs b/src/Twilio/Rest/Events/V1/Schema/SchemaVersionOptions.cs index 1af8983dd..3c76bd2f0 100644 --- a/src/Twilio/Rest/Events/V1/Schema/SchemaVersionOptions.cs +++ b/src/Twilio/Rest/Events/V1/Schema/SchemaVersionOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Events/V1/Schema/SchemaVersionResource.cs b/src/Twilio/Rest/Events/V1/Schema/SchemaVersionResource.cs index 769801382..13e903117 100644 --- a/src/Twilio/Rest/Events/V1/Schema/SchemaVersionResource.cs +++ b/src/Twilio/Rest/Events/V1/Schema/SchemaVersionResource.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 SchemaVersionResource 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 identifier of the schema. Each schema can have multiple versions, that share the same id. diff --git a/src/Twilio/Rest/Events/V1/SchemaOptions.cs b/src/Twilio/Rest/Events/V1/SchemaOptions.cs index d460c2776..bb305dc07 100644 --- a/src/Twilio/Rest/Events/V1/SchemaOptions.cs +++ b/src/Twilio/Rest/Events/V1/SchemaOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Events/V1/SchemaResource.cs b/src/Twilio/Rest/Events/V1/SchemaResource.cs index 758c2fc48..825f01652 100644 --- a/src/Twilio/Rest/Events/V1/SchemaResource.cs +++ b/src/Twilio/Rest/Events/V1/SchemaResource.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 SchemaResource 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 identifier of the schema. Each schema can have multiple versions, that share the same id. diff --git a/src/Twilio/Rest/Events/V1/Sink/SinkTestOptions.cs b/src/Twilio/Rest/Events/V1/Sink/SinkTestOptions.cs index 005222943..2ba9ff9da 100644 --- a/src/Twilio/Rest/Events/V1/Sink/SinkTestOptions.cs +++ b/src/Twilio/Rest/Events/V1/Sink/SinkTestOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Events/V1/Sink/SinkTestResource.cs b/src/Twilio/Rest/Events/V1/Sink/SinkTestResource.cs index 98a292a00..a10430e54 100644 --- a/src/Twilio/Rest/Events/V1/Sink/SinkTestResource.cs +++ b/src/Twilio/Rest/Events/V1/Sink/SinkTestResource.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; @@ -117,6 +118,22 @@ public static SinkTestResource 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); + } + } /// Feedback indicating whether the test event was generated. diff --git a/src/Twilio/Rest/Events/V1/Sink/SinkValidateOptions.cs b/src/Twilio/Rest/Events/V1/Sink/SinkValidateOptions.cs index 97ba904fd..7a1b77296 100644 --- a/src/Twilio/Rest/Events/V1/Sink/SinkValidateOptions.cs +++ b/src/Twilio/Rest/Events/V1/Sink/SinkValidateOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Events/V1/Sink/SinkValidateResource.cs b/src/Twilio/Rest/Events/V1/Sink/SinkValidateResource.cs index 0185daa0d..889b5ffb7 100644 --- a/src/Twilio/Rest/Events/V1/Sink/SinkValidateResource.cs +++ b/src/Twilio/Rest/Events/V1/Sink/SinkValidateResource.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 SinkValidateResource 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); + } + } /// Feedback indicating whether the given Sink was validated. diff --git a/src/Twilio/Rest/Events/V1/SinkOptions.cs b/src/Twilio/Rest/Events/V1/SinkOptions.cs index 6abc574c8..ce07a6f19 100644 --- a/src/Twilio/Rest/Events/V1/SinkOptions.cs +++ b/src/Twilio/Rest/Events/V1/SinkOptions.cs @@ -69,6 +69,7 @@ public List> GetParams() } return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -125,6 +127,7 @@ public List> GetParams() return p; } + } @@ -163,6 +166,7 @@ public List> GetParams() } return p; } + } @@ -200,6 +204,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Events/V1/SinkResource.cs b/src/Twilio/Rest/Events/V1/SinkResource.cs index 48f49b112..8a21596e1 100644 --- a/src/Twilio/Rest/Events/V1/SinkResource.cs +++ b/src/Twilio/Rest/Events/V1/SinkResource.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; @@ -485,6 +486,22 @@ public static SinkResource 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 that this Sink was created, given in ISO 8601 format. diff --git a/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.cs b/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.cs index 4fd5d47c6..ebdbea56f 100644 --- a/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.cs +++ b/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventOptions.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; } + } @@ -202,6 +206,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventResource.cs b/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventResource.cs index 42eb8dc3c..a496ac9c3 100644 --- a/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventResource.cs +++ b/src/Twilio/Rest/Events/V1/Subscription/SubscribedEventResource.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; @@ -471,6 +472,22 @@ public static SubscribedEventResource 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/Events/V1/SubscriptionOptions.cs b/src/Twilio/Rest/Events/V1/SubscriptionOptions.cs index 9f173c297..bd2a91e0c 100644 --- a/src/Twilio/Rest/Events/V1/SubscriptionOptions.cs +++ b/src/Twilio/Rest/Events/V1/SubscriptionOptions.cs @@ -69,6 +69,7 @@ public List> GetParams() } return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -125,6 +127,7 @@ public List> GetParams() return p; } + } @@ -156,6 +159,7 @@ public List> GetParams() } return p; } + } @@ -198,6 +202,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Events/V1/SubscriptionResource.cs b/src/Twilio/Rest/Events/V1/SubscriptionResource.cs index c3313b86f..a17b55e35 100644 --- a/src/Twilio/Rest/Events/V1/SubscriptionResource.cs +++ b/src/Twilio/Rest/Events/V1/SubscriptionResource.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; @@ -456,6 +457,22 @@ public static SubscriptionResource 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/FlexApi/V1/AssessmentsOptions.cs b/src/Twilio/Rest/FlexApi/V1/AssessmentsOptions.cs index 9c803ae5d..ff562a770 100644 --- a/src/Twilio/Rest/FlexApi/V1/AssessmentsOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/AssessmentsOptions.cs @@ -135,6 +135,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -177,6 +178,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -245,6 +247,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/AssessmentsResource.cs b/src/Twilio/Rest/FlexApi/V1/AssessmentsResource.cs index 25fe229fe..2899be7bf 100644 --- a/src/Twilio/Rest/FlexApi/V1/AssessmentsResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/AssessmentsResource.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; @@ -367,6 +368,22 @@ public static AssessmentsResource 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/FlexApi/V1/ChannelOptions.cs b/src/Twilio/Rest/FlexApi/V1/ChannelOptions.cs index bbf1f14a7..0edaf9a0a 100644 --- a/src/Twilio/Rest/FlexApi/V1/ChannelOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/ChannelOptions.cs @@ -120,6 +120,7 @@ public List> GetParams() } return p; } + } @@ -147,6 +148,7 @@ public List> GetParams() return p; } + } @@ -176,6 +178,7 @@ public List> GetParams() return p; } + } @@ -200,6 +203,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V1/ChannelResource.cs b/src/Twilio/Rest/FlexApi/V1/ChannelResource.cs index 935ca1f7e..88dd3ef0e 100644 --- a/src/Twilio/Rest/FlexApi/V1/ChannelResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/ChannelResource.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 ChannelResource 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 Channel resource and owns this Workflow. diff --git a/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs b/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs index 350100e84..4acc1fa1a 100644 --- a/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.cs @@ -45,6 +45,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V1/ConfigurationResource.cs b/src/Twilio/Rest/FlexApi/V1/ConfigurationResource.cs index 98d39b850..0555e08d3 100644 --- a/src/Twilio/Rest/FlexApi/V1/ConfigurationResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/ConfigurationResource.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; @@ -126,6 +127,22 @@ public static ConfigurationResource 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 Configuration resource. @@ -312,6 +329,10 @@ public static ConfigurationResource FromJson(string json) [JsonProperty("agent_conv_end_methods")] public object AgentConvEndMethods { get; private set; } + /// Citrix voice vdi configuration and settings. + [JsonProperty("citrix_voice_vdi")] + public object CitrixVoiceVdi { get; private set; } + private ConfigurationResource() { diff --git a/src/Twilio/Rest/FlexApi/V1/FlexFlowOptions.cs b/src/Twilio/Rest/FlexApi/V1/FlexFlowOptions.cs index a7b3cc441..21bb43c94 100644 --- a/src/Twilio/Rest/FlexApi/V1/FlexFlowOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/FlexFlowOptions.cs @@ -167,6 +167,7 @@ public List> GetParams() } return p; } + } @@ -194,6 +195,7 @@ public List> GetParams() return p; } + } @@ -223,6 +225,7 @@ public List> GetParams() return p; } + } @@ -254,6 +257,7 @@ public List> GetParams() } return p; } + } @@ -401,6 +405,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V1/FlexFlowResource.cs b/src/Twilio/Rest/FlexApi/V1/FlexFlowResource.cs index 13701a390..0b00b627f 100644 --- a/src/Twilio/Rest/FlexApi/V1/FlexFlowResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/FlexFlowResource.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; @@ -603,6 +604,22 @@ public static FlexFlowResource 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 Flex Flow resource and owns this Workflow. diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.cs index 3ece0bd87..44cff99b9 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentOptions.cs @@ -99,6 +99,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -148,6 +149,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentResource.cs index 94b17ce4f..4a88cfd22 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsAssessmentsCommentResource.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; @@ -271,6 +272,22 @@ public static InsightsAssessmentsCommentResource 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 Flex Insights resource and owns this resource. diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsConversationsOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsConversationsOptions.cs index 913fa7628..aa7cd154e 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsConversationsOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsConversationsOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsConversationsResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsConversationsResource.cs index 155dfd373..a250d724a 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsConversationsResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsConversationsResource.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; @@ -177,6 +178,22 @@ public static InsightsConversationsResource 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 id of the account. diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.cs index 37a7587a4..11507edf2 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -94,6 +95,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -131,6 +133,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -181,6 +184,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryResource.cs index 168b8088b..808ff0f93 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesCategoryResource.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; @@ -389,6 +390,22 @@ public static InsightsQuestionnairesCategoryResource 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 Flex Insights resource and owns this resource. diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.cs index 3b5438541..29f8246c0 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesOptions.cs @@ -76,6 +76,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -116,6 +117,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -158,6 +160,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -202,6 +205,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -274,6 +278,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.cs index b64e5f876..bd8aee0ce 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionOptions.cs @@ -88,6 +88,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -128,6 +129,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -172,6 +174,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -250,6 +253,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionResource.cs index dcde54627..0531ade87 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesQuestionResource.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; @@ -425,6 +426,22 @@ public static InsightsQuestionnairesQuestionResource 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 Flex Insights resource and owns this resource. diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesResource.cs index b572428d6..2664afb46 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsQuestionnairesResource.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; @@ -485,6 +486,22 @@ public static InsightsQuestionnairesResource 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 Flex Insights resource and owns this resource. diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsOptions.cs index e17f4d3cf..37876237d 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsOptions.cs @@ -59,6 +59,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsResource.cs index d514bbb8a..41ab7b025 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsSegmentsResource.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 InsightsSegmentsResource 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); + } + } /// To unique id of the segment diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsSessionOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsSessionOptions.cs index bc4f472c3..57fcd5064 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsSessionOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsSessionOptions.cs @@ -41,6 +41,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsSessionResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsSessionResource.cs index b08ad0795..86debd1b7 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsSessionResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsSessionResource.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; @@ -115,6 +116,22 @@ public static InsightsSessionResource 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); + } + } /// Unique ID to identify the user's workspace diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsOptions.cs index 7bd3d50c0..35800d465 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsOptions.cs @@ -41,6 +41,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsResource.cs index 3a29cdc99..8bf51ed6d 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsSettingsAnswerSetsResource.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; @@ -112,6 +113,22 @@ public static InsightsSettingsAnswerSetsResource 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 Flex Insights resource and owns this resource. diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentOptions.cs index 59d61ae83..d9d9661d7 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentOptions.cs @@ -41,6 +41,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentResource.cs index 874a595d7..1072c6c9a 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsSettingsCommentResource.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; @@ -112,6 +113,22 @@ public static InsightsSettingsCommentResource 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 Flex Insights resource and owns this resource. diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesOptions.cs b/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesOptions.cs index 9861a8783..7de262073 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesOptions.cs @@ -41,6 +41,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesResource.cs b/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesResource.cs index d6937bb15..37b5e4fb0 100644 --- a/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InsightsUserRolesResource.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; @@ -112,6 +113,22 @@ public static InsightsUserRolesResource 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); + } + } /// Flex Insights roles for the user diff --git a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteOptions.cs b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteOptions.cs index 5b3cc79fb..5250e404e 100644 --- a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteOptions.cs @@ -61,6 +61,7 @@ public List> GetParams() } return p; } + } @@ -97,6 +98,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteResource.cs b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteResource.cs index bff8c1122..ce88a7125 100644 --- a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInviteResource.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; @@ -259,6 +260,22 @@ public static InteractionChannelInviteResource 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 created by Twilio to identify an Interaction Channel Invite resource. diff --git a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantOptions.cs b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantOptions.cs index b77244725..49c727aa1 100644 --- a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantOptions.cs @@ -70,6 +70,7 @@ public List> GetParams() } return p; } + } @@ -106,6 +107,7 @@ public List> GetParams() } return p; } + } @@ -153,6 +155,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantResource.cs b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantResource.cs index 655aa7c94..05b9d038f 100644 --- a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipantResource.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; @@ -375,6 +376,22 @@ public static InteractionChannelParticipantResource 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 created by Twilio to identify an Interaction Channel Participant resource. diff --git a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelOptions.cs b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelOptions.cs index 25066d400..418c6340a 100644 --- a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } @@ -100,9 +102,9 @@ public class UpdateInteractionChannelOptions : IOptions Optional. The state of associated tasks. If not specified, all tasks will be set to `wrapping`. + /// It changes the state of associated tasks. Routing status is required, When the channel status is set to `inactive`. Allowed Value for routing status is `closed`. Otherwise Optional, if not specified, all tasks will be set to `wrapping`. public object Routing { get; set; } @@ -111,7 +113,7 @@ public class UpdateInteractionChannelOptions : IOptions The unique string created by Twilio to identify an Interaction resource, prefixed with KD. /// The unique string created by Twilio to identify an Interaction Channel resource, prefixed with UO. /// - public UpdateInteractionChannelOptions(string pathInteractionSid, string pathSid, InteractionChannelResource.StatusEnum status) + public UpdateInteractionChannelOptions(string pathInteractionSid, string pathSid, InteractionChannelResource.UpdateChannelStatusEnum status) { PathInteractionSid = pathInteractionSid; PathSid = pathSid; @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelResource.cs b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelResource.cs index 150e39a59..8f629d330 100644 --- a/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/Interaction/InteractionChannelResource.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; @@ -31,18 +32,6 @@ public class InteractionChannelResource : Resource - public sealed class StatusEnum : StringEnum - { - private StatusEnum(string value) : base(value) {} - public StatusEnum() {} - public static implicit operator StatusEnum(string value) - { - return new StatusEnum(value); - } - public static readonly StatusEnum Closed = new StatusEnum("closed"); - public static readonly StatusEnum Wrapup = new StatusEnum("wrapup"); - - } [JsonConverter(typeof(StringEnumConverter))] public sealed class TypeEnum : StringEnum { @@ -61,6 +50,18 @@ public static implicit operator TypeEnum(string value) public static readonly TypeEnum Messenger = new TypeEnum("messenger"); public static readonly TypeEnum Gbm = new TypeEnum("gbm"); + } + public sealed class UpdateChannelStatusEnum : StringEnum + { + private UpdateChannelStatusEnum(string value) : base(value) {} + public UpdateChannelStatusEnum() {} + public static implicit operator UpdateChannelStatusEnum(string value) + { + return new UpdateChannelStatusEnum(value); + } + public static readonly UpdateChannelStatusEnum Closed = new UpdateChannelStatusEnum("closed"); + public static readonly UpdateChannelStatusEnum Inactive = new UpdateChannelStatusEnum("inactive"); + } [JsonConverter(typeof(StringEnumConverter))] public sealed class ChannelStatusEnum : StringEnum @@ -75,6 +76,7 @@ public static implicit operator ChannelStatusEnum(string value) public static readonly ChannelStatusEnum Active = new ChannelStatusEnum("active"); public static readonly ChannelStatusEnum Failed = new ChannelStatusEnum("failed"); public static readonly ChannelStatusEnum Closed = new ChannelStatusEnum("closed"); + public static readonly ChannelStatusEnum Inactive = new ChannelStatusEnum("inactive"); } @@ -323,13 +325,13 @@ public static async System.Threading.Tasks.Task Upda /// The unique string created by Twilio to identify an Interaction resource, prefixed with KD. /// The unique string created by Twilio to identify an Interaction Channel resource, prefixed with UO. /// - /// Optional. The state of associated tasks. If not specified, all tasks will be set to `wrapping`. + /// It changes the state of associated tasks. Routing status is required, When the channel status is set to `inactive`. Allowed Value for routing status is `closed`. Otherwise Optional, if not specified, all tasks will be set to `wrapping`. /// Client to make requests to Twilio /// A single instance of InteractionChannel public static InteractionChannelResource Update( string pathInteractionSid, string pathSid, - InteractionChannelResource.StatusEnum status, + InteractionChannelResource.UpdateChannelStatusEnum status, object routing = null, ITwilioRestClient client = null) { @@ -342,13 +344,13 @@ public static InteractionChannelResource Update( /// The unique string created by Twilio to identify an Interaction resource, prefixed with KD. /// The unique string created by Twilio to identify an Interaction Channel resource, prefixed with UO. /// - /// Optional. The state of associated tasks. If not specified, all tasks will be set to `wrapping`. + /// It changes the state of associated tasks. Routing status is required, When the channel status is set to `inactive`. Allowed Value for routing status is `closed`. Otherwise Optional, if not specified, all tasks will be set to `wrapping`. /// Client to make requests to Twilio /// Task that resolves to A single instance of InteractionChannel public static async System.Threading.Tasks.Task UpdateAsync( string pathInteractionSid, string pathSid, - InteractionChannelResource.StatusEnum status, + InteractionChannelResource.UpdateChannelStatusEnum status, object routing = null, ITwilioRestClient client = null) { @@ -373,6 +375,22 @@ public static InteractionChannelResource 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 created by Twilio to identify an Interaction Channel resource, prefixed with UO. diff --git a/src/Twilio/Rest/FlexApi/V1/InteractionOptions.cs b/src/Twilio/Rest/FlexApi/V1/InteractionOptions.cs index 342ea8e70..3281bc43e 100644 --- a/src/Twilio/Rest/FlexApi/V1/InteractionOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/InteractionOptions.cs @@ -67,6 +67,7 @@ public List> GetParams() } return p; } + } @@ -94,6 +95,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V1/InteractionResource.cs b/src/Twilio/Rest/FlexApi/V1/InteractionResource.cs index 3d1027f03..c3497b46c 100644 --- a/src/Twilio/Rest/FlexApi/V1/InteractionResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/InteractionResource.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; @@ -188,6 +189,22 @@ public static InteractionResource 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 created by Twilio to identify an Interaction resource, prefixed with KD. diff --git a/src/Twilio/Rest/FlexApi/V1/WebChannelOptions.cs b/src/Twilio/Rest/FlexApi/V1/WebChannelOptions.cs index 3b1255c66..6c09c6fc9 100644 --- a/src/Twilio/Rest/FlexApi/V1/WebChannelOptions.cs +++ b/src/Twilio/Rest/FlexApi/V1/WebChannelOptions.cs @@ -92,6 +92,7 @@ public List> GetParams() } return p; } + } @@ -119,6 +120,7 @@ public List> GetParams() return p; } + } @@ -148,6 +150,7 @@ public List> GetParams() return p; } + } @@ -172,6 +175,7 @@ public List> GetParams() } return p; } + } @@ -214,6 +218,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V1/WebChannelResource.cs b/src/Twilio/Rest/FlexApi/V1/WebChannelResource.cs index cc6361247..bbda492e0 100644 --- a/src/Twilio/Rest/FlexApi/V1/WebChannelResource.cs +++ b/src/Twilio/Rest/FlexApi/V1/WebChannelResource.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 WebChannelResource 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 WebChannel resource and owns this Workflow. diff --git a/src/Twilio/Rest/FlexApi/V2/WebChannelsOptions.cs b/src/Twilio/Rest/FlexApi/V2/WebChannelsOptions.cs index e67f38bea..5e88b0c1c 100644 --- a/src/Twilio/Rest/FlexApi/V2/WebChannelsOptions.cs +++ b/src/Twilio/Rest/FlexApi/V2/WebChannelsOptions.cs @@ -72,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FlexApi/V2/WebChannelsResource.cs b/src/Twilio/Rest/FlexApi/V2/WebChannelsResource.cs index 302867c60..db149b0f0 100644 --- a/src/Twilio/Rest/FlexApi/V2/WebChannelsResource.cs +++ b/src/Twilio/Rest/FlexApi/V2/WebChannelsResource.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; @@ -127,6 +128,22 @@ public static WebChannelsResource 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 representing the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) created. diff --git a/src/Twilio/Rest/FrontlineApi/V1/UserOptions.cs b/src/Twilio/Rest/FrontlineApi/V1/UserOptions.cs index a502d3759..80ae1602d 100644 --- a/src/Twilio/Rest/FrontlineApi/V1/UserOptions.cs +++ b/src/Twilio/Rest/FrontlineApi/V1/UserOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/FrontlineApi/V1/UserResource.cs b/src/Twilio/Rest/FrontlineApi/V1/UserResource.cs index cbabdd45e..7be037e7b 100644 --- a/src/Twilio/Rest/FrontlineApi/V1/UserResource.cs +++ b/src/Twilio/Rest/FrontlineApi/V1/UserResource.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 UserResource 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 User resource. diff --git a/src/Twilio/Rest/Insights/V1/Call/AnnotationOptions.cs b/src/Twilio/Rest/Insights/V1/Call/AnnotationOptions.cs index f5dbf4591..66187863b 100644 --- a/src/Twilio/Rest/Insights/V1/Call/AnnotationOptions.cs +++ b/src/Twilio/Rest/Insights/V1/Call/AnnotationOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -125,6 +126,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/Call/AnnotationResource.cs b/src/Twilio/Rest/Insights/V1/Call/AnnotationResource.cs index 24cc18f8a..a56f5752e 100644 --- a/src/Twilio/Rest/Insights/V1/Call/AnnotationResource.cs +++ b/src/Twilio/Rest/Insights/V1/Call/AnnotationResource.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; @@ -241,6 +242,22 @@ public static AnnotationResource 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 Call. diff --git a/src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.cs b/src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.cs index 930fc343e..0f2f1ac9d 100644 --- a/src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.cs +++ b/src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/Call/CallSummaryResource.cs b/src/Twilio/Rest/Insights/V1/Call/CallSummaryResource.cs index 997e146f9..9469843b5 100644 --- a/src/Twilio/Rest/Insights/V1/Call/CallSummaryResource.cs +++ b/src/Twilio/Rest/Insights/V1/Call/CallSummaryResource.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; @@ -182,6 +183,22 @@ public static CallSummaryResource 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/Insights/V1/Call/EventOptions.cs b/src/Twilio/Rest/Insights/V1/Call/EventOptions.cs index b5cf3468c..8e45c2219 100644 --- a/src/Twilio/Rest/Insights/V1/Call/EventOptions.cs +++ b/src/Twilio/Rest/Insights/V1/Call/EventOptions.cs @@ -58,6 +58,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/Call/EventResource.cs b/src/Twilio/Rest/Insights/V1/Call/EventResource.cs index 74df5cf27..54afa281a 100644 --- a/src/Twilio/Rest/Insights/V1/Call/EventResource.cs +++ b/src/Twilio/Rest/Insights/V1/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; @@ -211,6 +212,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); + } + } /// Event time. diff --git a/src/Twilio/Rest/Insights/V1/Call/MetricOptions.cs b/src/Twilio/Rest/Insights/V1/Call/MetricOptions.cs index 9c3fcbd8e..86cc9e75b 100644 --- a/src/Twilio/Rest/Insights/V1/Call/MetricOptions.cs +++ b/src/Twilio/Rest/Insights/V1/Call/MetricOptions.cs @@ -65,6 +65,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/Call/MetricResource.cs b/src/Twilio/Rest/Insights/V1/Call/MetricResource.cs index 3c302b2a8..c788bf841 100644 --- a/src/Twilio/Rest/Insights/V1/Call/MetricResource.cs +++ b/src/Twilio/Rest/Insights/V1/Call/MetricResource.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; @@ -214,6 +215,22 @@ public static MetricResource 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); + } + } /// Timestamp of metric sample. Samples are taken every 10 seconds and contain the metrics for the previous 10 seconds. diff --git a/src/Twilio/Rest/Insights/V1/CallOptions.cs b/src/Twilio/Rest/Insights/V1/CallOptions.cs index f81c19c5c..8095d99d4 100644 --- a/src/Twilio/Rest/Insights/V1/CallOptions.cs +++ b/src/Twilio/Rest/Insights/V1/CallOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/CallResource.cs b/src/Twilio/Rest/Insights/V1/CallResource.cs index 3d96bc6dd..bae0df894 100644 --- a/src/Twilio/Rest/Insights/V1/CallResource.cs +++ b/src/Twilio/Rest/Insights/V1/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; @@ -114,6 +115,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 sid diff --git a/src/Twilio/Rest/Insights/V1/CallSummariesOptions.cs b/src/Twilio/Rest/Insights/V1/CallSummariesOptions.cs index 2b061c21d..f8496c520 100644 --- a/src/Twilio/Rest/Insights/V1/CallSummariesOptions.cs +++ b/src/Twilio/Rest/Insights/V1/CallSummariesOptions.cs @@ -210,6 +210,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/CallSummariesResource.cs b/src/Twilio/Rest/Insights/V1/CallSummariesResource.cs index e3b4f6c9d..e12d42f96 100644 --- a/src/Twilio/Rest/Insights/V1/CallSummariesResource.cs +++ b/src/Twilio/Rest/Insights/V1/CallSummariesResource.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; @@ -356,6 +357,22 @@ public static CallSummariesResource 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/Insights/V1/Conference/ConferenceParticipantOptions.cs b/src/Twilio/Rest/Insights/V1/Conference/ConferenceParticipantOptions.cs index 06cc27912..9c2c59fde 100644 --- a/src/Twilio/Rest/Insights/V1/Conference/ConferenceParticipantOptions.cs +++ b/src/Twilio/Rest/Insights/V1/Conference/ConferenceParticipantOptions.cs @@ -66,6 +66,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/Conference/ConferenceParticipantResource.cs b/src/Twilio/Rest/Insights/V1/Conference/ConferenceParticipantResource.cs index 15b64364b..a488cd572 100644 --- a/src/Twilio/Rest/Insights/V1/Conference/ConferenceParticipantResource.cs +++ b/src/Twilio/Rest/Insights/V1/Conference/ConferenceParticipantResource.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; @@ -356,6 +357,22 @@ public static ConferenceParticipantResource 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); + } + } /// SID for this participant. diff --git a/src/Twilio/Rest/Insights/V1/ConferenceOptions.cs b/src/Twilio/Rest/Insights/V1/ConferenceOptions.cs index af515a514..7c3755f54 100644 --- a/src/Twilio/Rest/Insights/V1/ConferenceOptions.cs +++ b/src/Twilio/Rest/Insights/V1/ConferenceOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -141,6 +142,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/ConferenceResource.cs b/src/Twilio/Rest/Insights/V1/ConferenceResource.cs index cdb232d84..96de9cddf 100644 --- a/src/Twilio/Rest/Insights/V1/ConferenceResource.cs +++ b/src/Twilio/Rest/Insights/V1/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; @@ -359,6 +360,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 unique SID identifier of the Conference. diff --git a/src/Twilio/Rest/Insights/V1/Room/ParticipantOptions.cs b/src/Twilio/Rest/Insights/V1/Room/ParticipantOptions.cs index dffa1b31e..42ccd96a9 100644 --- a/src/Twilio/Rest/Insights/V1/Room/ParticipantOptions.cs +++ b/src/Twilio/Rest/Insights/V1/Room/ParticipantOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/Room/ParticipantResource.cs b/src/Twilio/Rest/Insights/V1/Room/ParticipantResource.cs index a21e64038..4949ae053 100644 --- a/src/Twilio/Rest/Insights/V1/Room/ParticipantResource.cs +++ b/src/Twilio/Rest/Insights/V1/Room/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; @@ -313,6 +314,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); + } + } /// Unique identifier for the participant. diff --git a/src/Twilio/Rest/Insights/V1/RoomOptions.cs b/src/Twilio/Rest/Insights/V1/RoomOptions.cs index 7ef63686f..92e5dad95 100644 --- a/src/Twilio/Rest/Insights/V1/RoomOptions.cs +++ b/src/Twilio/Rest/Insights/V1/RoomOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -106,6 +107,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/RoomResource.cs b/src/Twilio/Rest/Insights/V1/RoomResource.cs index f9faf0433..33504d22f 100644 --- a/src/Twilio/Rest/Insights/V1/RoomResource.cs +++ b/src/Twilio/Rest/Insights/V1/RoomResource.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; @@ -377,6 +378,22 @@ public static RoomResource 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); + } + } /// Account SID associated with this room. diff --git a/src/Twilio/Rest/Insights/V1/SettingOptions.cs b/src/Twilio/Rest/Insights/V1/SettingOptions.cs index dcce27f09..e73a8365f 100644 --- a/src/Twilio/Rest/Insights/V1/SettingOptions.cs +++ b/src/Twilio/Rest/Insights/V1/SettingOptions.cs @@ -45,6 +45,7 @@ public List> GetParams() } return p; } + } @@ -86,6 +87,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Insights/V1/SettingResource.cs b/src/Twilio/Rest/Insights/V1/SettingResource.cs index ecf9e3e1c..b7395f93f 100644 --- a/src/Twilio/Rest/Insights/V1/SettingResource.cs +++ b/src/Twilio/Rest/Insights/V1/SettingResource.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 SettingResource 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/Intelligence/V2/ServiceOptions.cs b/src/Twilio/Rest/Intelligence/V2/ServiceOptions.cs index deca451a6..5e4675b54 100644 --- a/src/Twilio/Rest/Intelligence/V2/ServiceOptions.cs +++ b/src/Twilio/Rest/Intelligence/V2/ServiceOptions.cs @@ -107,6 +107,7 @@ public List> GetParams() } return p; } + } @@ -134,6 +135,7 @@ public List> GetParams() return p; } + } @@ -163,6 +165,7 @@ public List> GetParams() return p; } + } @@ -187,6 +190,7 @@ public List> GetParams() } return p; } + } @@ -281,6 +285,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Intelligence/V2/ServiceResource.cs b/src/Twilio/Rest/Intelligence/V2/ServiceResource.cs index cd05d10f2..5fd1d7552 100644 --- a/src/Twilio/Rest/Intelligence/V2/ServiceResource.cs +++ b/src/Twilio/Rest/Intelligence/V2/ServiceResource.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; @@ -522,6 +523,22 @@ public static ServiceResource 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 the Service belongs to. diff --git a/src/Twilio/Rest/Intelligence/V2/Transcript/MediaOptions.cs b/src/Twilio/Rest/Intelligence/V2/Transcript/MediaOptions.cs index f37728c8b..6eac9ca33 100644 --- a/src/Twilio/Rest/Intelligence/V2/Transcript/MediaOptions.cs +++ b/src/Twilio/Rest/Intelligence/V2/Transcript/MediaOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Intelligence/V2/Transcript/MediaResource.cs b/src/Twilio/Rest/Intelligence/V2/Transcript/MediaResource.cs index 7f665d59b..073059b08 100644 --- a/src/Twilio/Rest/Intelligence/V2/Transcript/MediaResource.cs +++ b/src/Twilio/Rest/Intelligence/V2/Transcript/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; @@ -117,6 +118,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 unique SID identifier of the Account. diff --git a/src/Twilio/Rest/Intelligence/V2/Transcript/OperatorResultOptions.cs b/src/Twilio/Rest/Intelligence/V2/Transcript/OperatorResultOptions.cs index 3fd7dad48..f486519cc 100644 --- a/src/Twilio/Rest/Intelligence/V2/Transcript/OperatorResultOptions.cs +++ b/src/Twilio/Rest/Intelligence/V2/Transcript/OperatorResultOptions.cs @@ -59,6 +59,7 @@ public List> GetParams() } return p; } + } @@ -99,6 +100,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Intelligence/V2/Transcript/OperatorResultResource.cs b/src/Twilio/Rest/Intelligence/V2/Transcript/OperatorResultResource.cs index f7f35dc7c..216af26bf 100644 --- a/src/Twilio/Rest/Intelligence/V2/Transcript/OperatorResultResource.cs +++ b/src/Twilio/Rest/Intelligence/V2/Transcript/OperatorResultResource.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; @@ -268,6 +269,22 @@ public static OperatorResultResource 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); + } + } diff --git a/src/Twilio/Rest/Intelligence/V2/Transcript/SentenceOptions.cs b/src/Twilio/Rest/Intelligence/V2/Transcript/SentenceOptions.cs index cd5326f64..1e640fb87 100644 --- a/src/Twilio/Rest/Intelligence/V2/Transcript/SentenceOptions.cs +++ b/src/Twilio/Rest/Intelligence/V2/Transcript/SentenceOptions.cs @@ -58,6 +58,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Intelligence/V2/Transcript/SentenceResource.cs b/src/Twilio/Rest/Intelligence/V2/Transcript/SentenceResource.cs index cff9f92e3..40c77f332 100644 --- a/src/Twilio/Rest/Intelligence/V2/Transcript/SentenceResource.cs +++ b/src/Twilio/Rest/Intelligence/V2/Transcript/SentenceResource.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; @@ -179,6 +180,22 @@ public static SentenceResource 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 channel number. diff --git a/src/Twilio/Rest/Intelligence/V2/TranscriptOptions.cs b/src/Twilio/Rest/Intelligence/V2/TranscriptOptions.cs index 95616b29e..70995b653 100644 --- a/src/Twilio/Rest/Intelligence/V2/TranscriptOptions.cs +++ b/src/Twilio/Rest/Intelligence/V2/TranscriptOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -101,6 +102,7 @@ public List> GetParams() return p; } + } @@ -137,6 +139,7 @@ public List> GetParams() } return p; } + } @@ -217,6 +220,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Intelligence/V2/TranscriptResource.cs b/src/Twilio/Rest/Intelligence/V2/TranscriptResource.cs index c9b95cfc3..d475f5a80 100644 --- a/src/Twilio/Rest/Intelligence/V2/TranscriptResource.cs +++ b/src/Twilio/Rest/Intelligence/V2/TranscriptResource.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; @@ -431,6 +432,22 @@ public static TranscriptResource 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/IpMessaging/V1/CredentialOptions.cs b/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.cs index 2715c7274..2f568f3cf 100644 --- a/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -243,6 +247,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/CredentialResource.cs b/src/Twilio/Rest/IpMessaging/V1/CredentialResource.cs index 664ae8c34..ab47645c0 100644 --- a/src/Twilio/Rest/IpMessaging/V1/CredentialResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/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); + } + } /// The sid diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.cs index c2a32c574..68e74d93a 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() return p; } + } @@ -144,6 +146,7 @@ public List> GetParams() return p; } + } @@ -190,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteResource.cs index 3bac23d12..2b21bd6fb 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteResource.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; @@ -418,6 +419,22 @@ public static InviteResource 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/IpMessaging/V1/Service/Channel/MemberOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.cs index 6753e5236..7c6b326d5 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() return p; } + } @@ -144,6 +146,7 @@ public List> GetParams() return p; } + } @@ -190,6 +193,7 @@ public List> GetParams() } return p; } + } @@ -242,6 +246,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberResource.cs index c865013b8..a621ef27c 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/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; @@ -506,6 +507,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 diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.cs index c02fc3fe4..06cf2766c 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.cs @@ -75,6 +75,7 @@ public List> GetParams() } return p; } + } @@ -112,6 +113,7 @@ public List> GetParams() return p; } + } @@ -151,6 +153,7 @@ public List> GetParams() return p; } + } @@ -196,6 +199,7 @@ public List> GetParams() } return p; } + } @@ -248,6 +252,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageResource.cs index 03f9c40d6..b230de28c 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/Channel/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; @@ -522,6 +523,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 sid diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.cs index 463a905c0..8dccaa27f 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.cs @@ -75,6 +75,7 @@ public List> GetParams() } return p; } + } @@ -107,6 +108,7 @@ public List> GetParams() return p; } + } @@ -141,6 +143,7 @@ public List> GetParams() return p; } + } @@ -182,6 +185,7 @@ public List> GetParams() } return p; } + } @@ -236,6 +240,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/ChannelResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/ChannelResource.cs index 19ffbe92f..76d46c66a 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/ChannelResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/ChannelResource.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; @@ -504,6 +505,22 @@ public static ChannelResource 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/IpMessaging/V1/Service/RoleOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/RoleOptions.cs index 6c2c4a45c..af09cabf2 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/RoleOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/RoleOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -106,6 +107,7 @@ public List> GetParams() return p; } + } @@ -140,6 +142,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -215,6 +219,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/RoleResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/RoleResource.cs index 8ff67e137..86ab5a7f3 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/RoleResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/RoleResource.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; @@ -488,6 +489,22 @@ public static RoleResource 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/IpMessaging/V1/Service/User/UserChannelOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelOptions.cs index 8258433d4..c50c1a4ee 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelResource.cs index c41dfc811..4546c4f80 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelResource.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; @@ -195,6 +196,22 @@ public static UserChannelResource 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 account_sid diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.cs b/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.cs index bb064fccf..4bba3ec20 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.cs @@ -77,6 +77,7 @@ public List> GetParams() } return p; } + } @@ -109,6 +110,7 @@ public List> GetParams() return p; } + } @@ -143,6 +145,7 @@ public List> GetParams() return p; } + } @@ -176,6 +179,7 @@ public List> GetParams() } return p; } + } @@ -230,6 +234,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/Service/UserResource.cs b/src/Twilio/Rest/IpMessaging/V1/Service/UserResource.cs index d10557ec5..a99ed3e97 100644 --- a/src/Twilio/Rest/IpMessaging/V1/Service/UserResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/Service/UserResource.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 UserResource 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/IpMessaging/V1/ServiceOptions.cs b/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.cs index 6ec23bfad..a05a096f7 100644 --- a/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } @@ -78,6 +79,7 @@ public List> GetParams() return p; } + } @@ -107,6 +109,7 @@ public List> GetParams() return p; } + } @@ -131,6 +134,7 @@ public List> GetParams() } return p; } + } @@ -538,6 +542,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V1/ServiceResource.cs b/src/Twilio/Rest/IpMessaging/V1/ServiceResource.cs index e8bd67048..ca121d6ed 100644 --- a/src/Twilio/Rest/IpMessaging/V1/ServiceResource.cs +++ b/src/Twilio/Rest/IpMessaging/V1/ServiceResource.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; @@ -652,6 +653,22 @@ public static ServiceResource 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/IpMessaging/V2/CredentialOptions.cs b/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.cs index 1ce043394..198762832 100644 --- a/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -243,6 +247,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V2/CredentialResource.cs b/src/Twilio/Rest/IpMessaging/V2/CredentialResource.cs index ca472d0bd..136b19d99 100644 --- a/src/Twilio/Rest/IpMessaging/V2/CredentialResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/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); + } + } /// The sid diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/BindingOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/BindingOptions.cs index 836bf89ef..e768fa184 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/BindingOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/BindingOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -86,6 +87,7 @@ public List> GetParams() return p; } + } @@ -135,6 +137,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/BindingResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/BindingResource.cs index 31495aea8..7039b6c48 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/BindingResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/BindingResource.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; @@ -339,6 +340,22 @@ public static BindingResource 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/IpMessaging/V2/Service/Channel/InviteOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.cs index ec40930f9..3a309e680 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() return p; } + } @@ -144,6 +146,7 @@ public List> GetParams() return p; } + } @@ -190,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteResource.cs index 088412884..07b5ac57e 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteResource.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; @@ -418,6 +419,22 @@ public static InviteResource 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/IpMessaging/V2/Service/Channel/MemberOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.cs index 8fce78d0b..4d05ccca5 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.cs @@ -106,6 +106,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -156,6 +157,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -205,6 +207,7 @@ public List> GetParams() return p; } + } @@ -251,6 +254,7 @@ public List> GetParams() } return p; } + } @@ -334,6 +338,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberResource.cs index 876d68eaf..68bd040e4 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/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; @@ -564,6 +565,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 diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.cs index 8fe58f2aa..76c44252c 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.cs @@ -104,6 +104,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -154,6 +155,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -203,6 +205,7 @@ public List> GetParams() return p; } + } @@ -248,6 +251,7 @@ public List> GetParams() } return p; } + } @@ -331,6 +335,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageResource.cs index e05db5d5e..ac6d55e7f 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/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; @@ -576,6 +577,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 sid diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.cs index 5be164dbd..75098b33d 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.cs @@ -105,6 +105,7 @@ public List> GetParams() } return p; } + } @@ -142,6 +143,7 @@ public List> GetParams() return p; } + } @@ -181,6 +183,7 @@ public List> GetParams() return p; } + } @@ -219,6 +222,7 @@ public List> GetParams() } return p; } + } @@ -301,6 +305,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookResource.cs index 7dd5f643c..c9d6beb38 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookResource.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 WebhookResource 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/IpMessaging/V2/Service/ChannelOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.cs index ecc5f0f94..feab1342e 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.cs @@ -99,6 +99,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -144,6 +145,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -188,6 +190,7 @@ public List> GetParams() return p; } + } @@ -229,6 +232,7 @@ public List> GetParams() } return p; } + } @@ -307,6 +311,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/ChannelResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/ChannelResource.cs index 169588fab..9ab46753f 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/ChannelResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/ChannelResource.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; @@ -550,6 +551,22 @@ public static ChannelResource 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/IpMessaging/V2/Service/RoleOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/RoleOptions.cs index c9f59e0a8..3764a5588 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/RoleOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/RoleOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -106,6 +107,7 @@ public List> GetParams() return p; } + } @@ -140,6 +142,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -215,6 +219,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/RoleResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/RoleResource.cs index 17e8a77de..17b7ca6af 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/RoleResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/RoleResource.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; @@ -488,6 +489,22 @@ public static RoleResource 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/IpMessaging/V2/Service/User/UserBindingOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingOptions.cs index ec2e515f4..f19d1ae2c 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -142,6 +144,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingResource.cs index c3bb793b5..f36b12cf6 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingResource.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; @@ -350,6 +351,22 @@ public static UserBindingResource 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/IpMessaging/V2/Service/User/UserChannelOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelOptions.cs index c9b6cf297..32c143c60 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -193,6 +196,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelResource.cs index d64d23482..0ed721277 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelResource.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 UserChannelResource 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 account_sid diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.cs b/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.cs index bd73f21cc..f1ad2003b 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.cs @@ -80,6 +80,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -122,6 +123,7 @@ public List> GetParams() return p; } + } @@ -156,6 +158,7 @@ public List> GetParams() return p; } + } @@ -189,6 +192,7 @@ public List> GetParams() } return p; } + } @@ -246,6 +250,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/IpMessaging/V2/Service/UserResource.cs b/src/Twilio/Rest/IpMessaging/V2/Service/UserResource.cs index 5d264e047..fd5459cf5 100644 --- a/src/Twilio/Rest/IpMessaging/V2/Service/UserResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/Service/UserResource.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; @@ -507,6 +508,22 @@ public static UserResource 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/IpMessaging/V2/ServiceOptions.cs b/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.cs index 207c3f440..4dc528888 100644 --- a/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.cs +++ b/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } @@ -78,6 +79,7 @@ public List> GetParams() return p; } + } @@ -107,6 +109,7 @@ public List> GetParams() return p; } + } @@ -131,6 +134,7 @@ public List> GetParams() } return p; } + } @@ -377,6 +381,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/IpMessaging/V2/ServiceResource.cs b/src/Twilio/Rest/IpMessaging/V2/ServiceResource.cs index 82dcd5928..d2fc0a15f 100644 --- a/src/Twilio/Rest/IpMessaging/V2/ServiceResource.cs +++ b/src/Twilio/Rest/IpMessaging/V2/ServiceResource.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; @@ -560,6 +561,22 @@ public static ServiceResource 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/Lookups/V1/PhoneNumberOptions.cs b/src/Twilio/Rest/Lookups/V1/PhoneNumberOptions.cs index 5a4f0baae..dd2db44a6 100644 --- a/src/Twilio/Rest/Lookups/V1/PhoneNumberOptions.cs +++ b/src/Twilio/Rest/Lookups/V1/PhoneNumberOptions.cs @@ -77,6 +77,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Lookups/V1/PhoneNumberResource.cs b/src/Twilio/Rest/Lookups/V1/PhoneNumberResource.cs index acee38b01..15ef3adfb 100644 --- a/src/Twilio/Rest/Lookups/V1/PhoneNumberResource.cs +++ b/src/Twilio/Rest/Lookups/V1/PhoneNumberResource.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; @@ -126,6 +127,22 @@ public static PhoneNumberResource 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 name of the phone number's owner. If `null`, that information was not available. diff --git a/src/Twilio/Rest/Lookups/V2/PhoneNumberOptions.cs b/src/Twilio/Rest/Lookups/V2/PhoneNumberOptions.cs index ec088a7e4..ff50cd7d8 100644 --- a/src/Twilio/Rest/Lookups/V2/PhoneNumberOptions.cs +++ b/src/Twilio/Rest/Lookups/V2/PhoneNumberOptions.cs @@ -138,6 +138,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Lookups/V2/PhoneNumberResource.cs b/src/Twilio/Rest/Lookups/V2/PhoneNumberResource.cs index c03994117..491628c7f 100644 --- a/src/Twilio/Rest/Lookups/V2/PhoneNumberResource.cs +++ b/src/Twilio/Rest/Lookups/V2/PhoneNumberResource.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; @@ -170,6 +171,22 @@ public static PhoneNumberResource 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); + } + } /// International dialing prefix of the phone number defined in the E.164 standard. diff --git a/src/Twilio/Rest/Media/V1/MediaProcessorOptions.cs b/src/Twilio/Rest/Media/V1/MediaProcessorOptions.cs index b73f44f64..b3d1ae0ba 100644 --- a/src/Twilio/Rest/Media/V1/MediaProcessorOptions.cs +++ b/src/Twilio/Rest/Media/V1/MediaProcessorOptions.cs @@ -88,6 +88,7 @@ public List> GetParams() } return p; } + } @@ -115,6 +116,7 @@ public List> GetParams() return p; } + } @@ -153,6 +155,7 @@ public List> GetParams() } return p; } + } @@ -190,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Media/V1/MediaProcessorResource.cs b/src/Twilio/Rest/Media/V1/MediaProcessorResource.cs index 708bef0c6..c826e486f 100644 --- a/src/Twilio/Rest/Media/V1/MediaProcessorResource.cs +++ b/src/Twilio/Rest/Media/V1/MediaProcessorResource.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; @@ -437,6 +438,22 @@ public static MediaProcessorResource 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 MediaProcessor resource. diff --git a/src/Twilio/Rest/Media/V1/MediaRecordingOptions.cs b/src/Twilio/Rest/Media/V1/MediaRecordingOptions.cs index 9ac42564f..a4638d6fa 100644 --- a/src/Twilio/Rest/Media/V1/MediaRecordingOptions.cs +++ b/src/Twilio/Rest/Media/V1/MediaRecordingOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -76,6 +77,7 @@ public List> GetParams() return p; } + } @@ -128,6 +130,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Media/V1/MediaRecordingResource.cs b/src/Twilio/Rest/Media/V1/MediaRecordingResource.cs index 524985515..858c18d40 100644 --- a/src/Twilio/Rest/Media/V1/MediaRecordingResource.cs +++ b/src/Twilio/Rest/Media/V1/MediaRecordingResource.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; @@ -358,6 +359,22 @@ public static MediaRecordingResource 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 MediaRecording resource. diff --git a/src/Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantOptions.cs b/src/Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantOptions.cs index 728f1a004..abbe415a0 100644 --- a/src/Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantOptions.cs +++ b/src/Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantOptions.cs @@ -61,6 +61,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantResource.cs b/src/Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantResource.cs index dae6c91a1..c80eaf7ac 100644 --- a/src/Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantResource.cs +++ b/src/Twilio/Rest/Media/V1/PlayerStreamer/PlaybackGrantResource.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; @@ -190,6 +191,22 @@ public static PlaybackGrantResource 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 generated to identify the PlayerStreamer resource that this PlaybackGrant authorizes views for. diff --git a/src/Twilio/Rest/Media/V1/PlayerStreamerOptions.cs b/src/Twilio/Rest/Media/V1/PlayerStreamerOptions.cs index 656106092..76b0e7f19 100644 --- a/src/Twilio/Rest/Media/V1/PlayerStreamerOptions.cs +++ b/src/Twilio/Rest/Media/V1/PlayerStreamerOptions.cs @@ -66,6 +66,7 @@ public List> GetParams() } return p; } + } @@ -93,6 +94,7 @@ public List> GetParams() return p; } + } @@ -131,6 +133,7 @@ public List> GetParams() } return p; } + } @@ -168,6 +171,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Media/V1/PlayerStreamerResource.cs b/src/Twilio/Rest/Media/V1/PlayerStreamerResource.cs index e3b8382b7..d8bfe0591 100644 --- a/src/Twilio/Rest/Media/V1/PlayerStreamerResource.cs +++ b/src/Twilio/Rest/Media/V1/PlayerStreamerResource.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; @@ -445,6 +446,22 @@ public static PlayerStreamerResource 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 PlayerStreamer resource. diff --git a/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpOptions.cs b/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpOptions.cs index 8c301e824..9ad79eb75 100644 --- a/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpResource.cs b/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpResource.cs index 639708389..18ce9c904 100644 --- a/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpResource.cs +++ b/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandRegistrationOtpResource.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; @@ -117,6 +118,22 @@ public static BrandRegistrationOtpResource 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 Brand Registration resource. diff --git a/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingOptions.cs b/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingOptions.cs index 9e8009c44..8e8daf3d2 100644 --- a/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingOptions.cs @@ -63,6 +63,7 @@ public List> GetParams() } return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() return p; } + } @@ -135,6 +137,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingResource.cs b/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingResource.cs index 3d8b558b7..f44ebcadf 100644 --- a/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingResource.cs +++ b/src/Twilio/Rest/Messaging/V1/BrandRegistration/BrandVettingResource.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; @@ -337,6 +338,22 @@ public static BrandVettingResource 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 vetting record. diff --git a/src/Twilio/Rest/Messaging/V1/BrandRegistrationOptions.cs b/src/Twilio/Rest/Messaging/V1/BrandRegistrationOptions.cs index d5bd49e6e..e5099e3f4 100644 --- a/src/Twilio/Rest/Messaging/V1/BrandRegistrationOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/BrandRegistrationOptions.cs @@ -81,6 +81,7 @@ public List> GetParams() } return p; } + } @@ -108,6 +109,7 @@ public List> GetParams() return p; } + } @@ -132,6 +134,7 @@ public List> GetParams() } return p; } + } @@ -160,6 +163,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/BrandRegistrationResource.cs b/src/Twilio/Rest/Messaging/V1/BrandRegistrationResource.cs index fd871821b..f4df493ff 100644 --- a/src/Twilio/Rest/Messaging/V1/BrandRegistrationResource.cs +++ b/src/Twilio/Rest/Messaging/V1/BrandRegistrationResource.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; @@ -431,6 +432,22 @@ public static BrandRegistrationResource 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 to identify Brand Registration. diff --git a/src/Twilio/Rest/Messaging/V1/DeactivationsOptions.cs b/src/Twilio/Rest/Messaging/V1/DeactivationsOptions.cs index d6f084b7f..870775869 100644 --- a/src/Twilio/Rest/Messaging/V1/DeactivationsOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/DeactivationsOptions.cs @@ -45,6 +45,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/DeactivationsResource.cs b/src/Twilio/Rest/Messaging/V1/DeactivationsResource.cs index 9fb5ff82a..336f586b4 100644 --- a/src/Twilio/Rest/Messaging/V1/DeactivationsResource.cs +++ b/src/Twilio/Rest/Messaging/V1/DeactivationsResource.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; @@ -112,6 +113,22 @@ public static DeactivationsResource 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); + } + } /// Returns an authenticated url that redirects to a file containing the deactivated numbers for the requested day. This url is valid for up to two minutes. diff --git a/src/Twilio/Rest/Messaging/V1/DomainCertsOptions.cs b/src/Twilio/Rest/Messaging/V1/DomainCertsOptions.cs index 6a92da388..3d6f19dc2 100644 --- a/src/Twilio/Rest/Messaging/V1/DomainCertsOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/DomainCertsOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -76,6 +77,7 @@ public List> GetParams() return p; } + } @@ -114,6 +116,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/DomainCertsResource.cs b/src/Twilio/Rest/Messaging/V1/DomainCertsResource.cs index e3eeae06d..3907cd563 100644 --- a/src/Twilio/Rest/Messaging/V1/DomainCertsResource.cs +++ b/src/Twilio/Rest/Messaging/V1/DomainCertsResource.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; @@ -254,6 +255,22 @@ public static DomainCertsResource 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 Domain resource. diff --git a/src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceOptions.cs b/src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceOptions.cs index bfc7b3d5b..155e64bc1 100644 --- a/src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceResource.cs b/src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceResource.cs index ff5da02e6..5080c066e 100644 --- a/src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceResource.cs +++ b/src/Twilio/Rest/Messaging/V1/DomainConfigMessagingServiceResource.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 DomainConfigMessagingServiceResource 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 Domain resource. diff --git a/src/Twilio/Rest/Messaging/V1/DomainConfigOptions.cs b/src/Twilio/Rest/Messaging/V1/DomainConfigOptions.cs index c0ff7d80a..12eac0616 100644 --- a/src/Twilio/Rest/Messaging/V1/DomainConfigOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/DomainConfigOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/DomainConfigResource.cs b/src/Twilio/Rest/Messaging/V1/DomainConfigResource.cs index d9f5b0680..7e5dac4c9 100644 --- a/src/Twilio/Rest/Messaging/V1/DomainConfigResource.cs +++ b/src/Twilio/Rest/Messaging/V1/DomainConfigResource.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; @@ -198,6 +199,22 @@ public static DomainConfigResource 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 Domain resource. diff --git a/src/Twilio/Rest/Messaging/V1/ExternalCampaignOptions.cs b/src/Twilio/Rest/Messaging/V1/ExternalCampaignOptions.cs index ae1897e2f..dadf77b8c 100644 --- a/src/Twilio/Rest/Messaging/V1/ExternalCampaignOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/ExternalCampaignOptions.cs @@ -31,13 +31,13 @@ public class CreateExternalCampaignOptions : IOptions /// ID of the preregistered campaign. public string CampaignId { get; } - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) that the resource is associated with. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) that the resource is associated with. public string MessagingServiceSid { get; } /// Construct a new CreateExternalCampaignOptions /// ID of the preregistered campaign. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) that the resource is associated with. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) that the resource is associated with. public CreateExternalCampaignOptions(string campaignId, string messagingServiceSid) { CampaignId = campaignId; @@ -60,6 +60,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/ExternalCampaignResource.cs b/src/Twilio/Rest/Messaging/V1/ExternalCampaignResource.cs index b35e32109..7db0612f6 100644 --- a/src/Twilio/Rest/Messaging/V1/ExternalCampaignResource.cs +++ b/src/Twilio/Rest/Messaging/V1/ExternalCampaignResource.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; @@ -75,7 +76,7 @@ public static async System.Threading.Tasks.Task Create /// create /// ID of the preregistered campaign. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) that the resource is associated with. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) that the resource is associated with. /// Client to make requests to Twilio /// A single instance of ExternalCampaign public static ExternalCampaignResource Create( @@ -90,7 +91,7 @@ public static ExternalCampaignResource Create( #if !NET35 /// create /// ID of the preregistered campaign. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) that the resource is associated with. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) that the resource is associated with. /// Client to make requests to Twilio /// Task that resolves to A single instance of ExternalCampaign public static async System.Threading.Tasks.Task CreateAsync( @@ -119,6 +120,22 @@ public static ExternalCampaignResource 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 identifies a US A2P Compliance resource `QE2c6890da8086d771620e9b13fadeba0b`. @@ -133,7 +150,7 @@ public static ExternalCampaignResource FromJson(string json) [JsonProperty("campaign_id")] public string CampaignId { get; private set; } - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) that the resource is associated with. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) that the resource is associated with. [JsonProperty("messaging_service_sid")] public string MessagingServiceSid { get; private set; } diff --git a/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationOptions.cs b/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationOptions.cs index 3fe8e6de3..74fe2cb24 100644 --- a/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationResource.cs b/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationResource.cs index 1662e3450..f067c8a03 100644 --- a/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationResource.cs +++ b/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociationResource.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 LinkshorteningMessagingServiceDomainAssociationResource FromJson(s 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 Domain resource. diff --git a/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceOptions.cs b/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceOptions.cs index 8cf19c8db..b3ce0fc7a 100644 --- a/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -84,6 +85,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceResource.cs b/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceResource.cs index c0074f10b..30af37e00 100644 --- a/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceResource.cs +++ b/src/Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceResource.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; @@ -195,6 +196,22 @@ public static LinkshorteningMessagingServiceResource 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 identifies the domain resource diff --git a/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderOptions.cs b/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderOptions.cs index 059a2f800..db01585dd 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderResource.cs b/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderResource.cs index fdea4ff62..908ef664e 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderResource.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderResource.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; @@ -389,6 +390,22 @@ public static AlphaSenderResource 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 AlphaSender resource. diff --git a/src/Twilio/Rest/Messaging/V1/Service/ChannelSenderOptions.cs b/src/Twilio/Rest/Messaging/V1/Service/ChannelSenderOptions.cs index 9d9dcbd38..c3f26ada5 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/ChannelSenderOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/ChannelSenderOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/Service/ChannelSenderResource.cs b/src/Twilio/Rest/Messaging/V1/Service/ChannelSenderResource.cs index 629289e39..dbf9470b7 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/ChannelSenderResource.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/ChannelSenderResource.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 ChannelSenderResource 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 ChannelSender resource. diff --git a/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberOptions.cs b/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberOptions.cs index c231186e9..394f0e086 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberResource.cs b/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberResource.cs index 96f70d773..c274fe956 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberResource.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberResource.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; @@ -389,6 +390,22 @@ public static PhoneNumberResource 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 PhoneNumber resource. diff --git a/src/Twilio/Rest/Messaging/V1/Service/ShortCodeOptions.cs b/src/Twilio/Rest/Messaging/V1/Service/ShortCodeOptions.cs index 861f5d884..b9196dacd 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/ShortCodeOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/ShortCodeOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/Service/ShortCodeResource.cs b/src/Twilio/Rest/Messaging/V1/Service/ShortCodeResource.cs index 5554015bc..0f5784cbd 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/ShortCodeResource.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/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; @@ -389,6 +390,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 unique string that we created to identify the ShortCode resource. diff --git a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.cs b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.cs index 1f3061a33..b70226900 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonOptions.cs @@ -28,7 +28,7 @@ namespace Twilio.Rest.Messaging.V1.Service public class CreateUsAppToPersonOptions : IOptions { - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to create the resources from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to create the resources from. public string PathMessagingServiceSid { get; } /// A2P Brand Registration SID @@ -72,7 +72,7 @@ public class CreateUsAppToPersonOptions : IOptions /// Construct a new CreateUsAppToPersonOptions - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to create the resources from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to create the resources from. /// A2P Brand Registration SID /// A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters. /// Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum. @@ -155,6 +155,7 @@ public List> GetParams() } return p; } + } @@ -162,7 +163,7 @@ public List> GetParams() public class DeleteUsAppToPersonOptions : IOptions { - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to delete the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to delete the resource from. public string PathMessagingServiceSid { get; } /// The SID of the US A2P Compliance resource to delete `QE2c6890da8086d771620e9b13fadeba0b`. @@ -171,7 +172,7 @@ public class DeleteUsAppToPersonOptions : IOptions /// Construct a new DeleteUsAppToPersonOptions - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to delete the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to delete the resource from. /// The SID of the US A2P Compliance resource to delete `QE2c6890da8086d771620e9b13fadeba0b`. public DeleteUsAppToPersonOptions(string pathMessagingServiceSid, string pathSid) { @@ -187,6 +188,7 @@ public List> GetParams() return p; } + } @@ -196,7 +198,7 @@ public List> GetParams() public class FetchUsAppToPersonOptions : IOptions { - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. public string PathMessagingServiceSid { get; } /// The SID of the US A2P Compliance resource to fetch `QE2c6890da8086d771620e9b13fadeba0b`. @@ -205,7 +207,7 @@ public class FetchUsAppToPersonOptions : IOptions /// Construct a new FetchUsAppToPersonOptions - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. /// The SID of the US A2P Compliance resource to fetch `QE2c6890da8086d771620e9b13fadeba0b`. public FetchUsAppToPersonOptions(string pathMessagingServiceSid, string pathSid) { @@ -221,6 +223,7 @@ public List> GetParams() return p; } + } @@ -230,13 +233,13 @@ public List> GetParams() public class ReadUsAppToPersonOptions : ReadOptions { - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. public string PathMessagingServiceSid { get; } /// Construct a new ListUsAppToPersonOptions - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. public ReadUsAppToPersonOptions(string pathMessagingServiceSid) { PathMessagingServiceSid = pathMessagingServiceSid; @@ -254,6 +257,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonResource.cs b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonResource.cs index 536591fc9..dfaef6028 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonResource.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonResource.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; @@ -76,7 +77,7 @@ public static async System.Threading.Tasks.Task CreateAsy #endif /// create - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to create the resources from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to create the resources from. /// A2P Brand Registration SID /// A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters. /// Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum. @@ -115,7 +116,7 @@ public static UsAppToPersonResource Create( #if !NET35 /// create - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to create the resources from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to create the resources from. /// A2P Brand Registration SID /// A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters. /// Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum. @@ -202,7 +203,7 @@ public static async System.Threading.Tasks.Task DeleteAsync(DeleteUsAppToP #endif /// delete - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to delete the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to delete the resource from. /// The SID of the US A2P Compliance resource to delete `QE2c6890da8086d771620e9b13fadeba0b`. /// Client to make requests to Twilio /// A single instance of UsAppToPerson @@ -214,7 +215,7 @@ public static bool Delete(string pathMessagingServiceSid, string pathSid, ITwili #if !NET35 /// delete - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to delete the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to delete the resource from. /// The SID of the US A2P Compliance resource to delete `QE2c6890da8086d771620e9b13fadeba0b`. /// Client to make requests to Twilio /// Task that resolves to A single instance of UsAppToPerson @@ -269,7 +270,7 @@ public static async System.Threading.Tasks.Task FetchAsyn } #endif /// fetch - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. /// The SID of the US A2P Compliance resource to fetch `QE2c6890da8086d771620e9b13fadeba0b`. /// Client to make requests to Twilio /// A single instance of UsAppToPerson @@ -284,7 +285,7 @@ public static UsAppToPersonResource Fetch( #if !NET35 /// fetch - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. /// The SID of the US A2P Compliance resource to fetch `QE2c6890da8086d771620e9b13fadeba0b`. /// Client to make requests to Twilio /// Task that resolves to A single instance of UsAppToPerson @@ -339,7 +340,7 @@ public static async System.Threading.Tasks.Task read - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. /// How many resources to return in each list page. The default is 50, and the maximum is 1000. /// Record limit /// Client to make requests to Twilio @@ -356,7 +357,7 @@ public static ResourceSet Read( #if !NET35 /// read - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. /// How many resources to return in each list page. The default is 50, and the maximum is 1000. /// Record limit /// Client to make requests to Twilio @@ -437,6 +438,22 @@ public static UsAppToPersonResource 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 identifies a US A2P Compliance resource `QE2c6890da8086d771620e9b13fadeba0b`. @@ -451,7 +468,7 @@ public static UsAppToPersonResource FromJson(string json) [JsonProperty("brand_registration_sid")] public string BrandRegistrationSid { get; private set; } - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) that the resource is associated with. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) that the resource is associated with. [JsonProperty("messaging_service_sid")] public string MessagingServiceSid { get; private set; } diff --git a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseOptions.cs b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseOptions.cs index fc6dbf608..873d4178b 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseOptions.cs @@ -27,7 +27,7 @@ namespace Twilio.Rest.Messaging.V1.Service public class FetchUsAppToPersonUsecaseOptions : IOptions { - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. public string PathMessagingServiceSid { get; } /// The unique string to identify the A2P brand. @@ -36,7 +36,7 @@ public class FetchUsAppToPersonUsecaseOptions : IOptions Construct a new FetchUsAppToPersonUsecaseOptions - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. public FetchUsAppToPersonUsecaseOptions(string pathMessagingServiceSid) { PathMessagingServiceSid = pathMessagingServiceSid; @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseResource.cs b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseResource.cs index e7b640987..7ec8d9707 100644 --- a/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseResource.cs +++ b/src/Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecaseResource.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; @@ -75,7 +76,7 @@ public static async System.Threading.Tasks.Task Fe } #endif /// fetch - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. /// The unique string to identify the A2P brand. /// Client to make requests to Twilio /// A single instance of UsAppToPersonUsecase @@ -90,7 +91,7 @@ public static UsAppToPersonUsecaseResource Fetch( #if !NET35 /// fetch - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to fetch the resource from. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to fetch the resource from. /// The unique string to identify the A2P brand. /// Client to make requests to Twilio /// Task that resolves to A single instance of UsAppToPersonUsecase @@ -117,6 +118,22 @@ public static UsAppToPersonUsecaseResource 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); + } + } /// Human readable name, code, description and post_approval_required (indicates whether or not post approval is required for this Use Case) of A2P Campaign Use Cases. diff --git a/src/Twilio/Rest/Messaging/V1/ServiceOptions.cs b/src/Twilio/Rest/Messaging/V1/ServiceOptions.cs index 1f23db302..4c899de59 100644 --- a/src/Twilio/Rest/Messaging/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/ServiceOptions.cs @@ -70,7 +70,7 @@ public class CreateServiceOptions : IOptions /// Reserved. public bool? SynchronousValidation { get; set; } - /// A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..]. + /// A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. public string Usecase { get; set; } /// A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. @@ -156,6 +156,7 @@ public List> GetParams() } return p; } + } @@ -183,6 +184,7 @@ public List> GetParams() return p; } + } @@ -212,6 +214,7 @@ public List> GetParams() return p; } + } @@ -236,6 +239,7 @@ public List> GetParams() } return p; } + } @@ -289,7 +293,7 @@ public class UpdateServiceOptions : IOptions /// Reserved. public bool? SynchronousValidation { get; set; } - /// A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..] + /// A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. public string Usecase { get; set; } /// A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. @@ -376,6 +380,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/ServiceResource.cs b/src/Twilio/Rest/Messaging/V1/ServiceResource.cs index 404f0658a..c80d688a5 100644 --- a/src/Twilio/Rest/Messaging/V1/ServiceResource.cs +++ b/src/Twilio/Rest/Messaging/V1/ServiceResource.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; @@ -102,7 +103,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. /// How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. /// Reserved. - /// A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..]. + /// A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. /// A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. /// Client to make requests to Twilio /// A single instance of Service @@ -145,7 +146,7 @@ public static ServiceResource Create( /// Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. /// How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. /// Reserved. - /// A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..]. + /// A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. /// A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. /// Client to make requests to Twilio /// Task that resolves to A single instance of Service @@ -484,7 +485,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. /// How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. /// Reserved. - /// A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..] + /// A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. /// A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. /// Client to make requests to Twilio /// A single instance of Service @@ -529,7 +530,7 @@ public static ServiceResource Update( /// Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance. /// How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. /// Reserved. - /// A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..] + /// A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. /// A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service. /// Client to make requests to Twilio /// Task that resolves to A single instance of Service @@ -574,6 +575,22 @@ public static ServiceResource 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 Service resource. @@ -656,7 +673,7 @@ public static ServiceResource FromJson(string json) [JsonProperty("links")] public Dictionary Links { get; private set; } - /// A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..] + /// A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`. [JsonProperty("usecase")] public string Usecase { get; private set; } diff --git a/src/Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.cs b/src/Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.cs index 892b425a9..178e76559 100644 --- a/src/Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/TollfreeVerificationOptions.cs @@ -223,6 +223,7 @@ public List> GetParams() } return p; } + } @@ -250,6 +251,7 @@ public List> GetParams() return p; } + } @@ -288,6 +290,7 @@ public List> GetParams() } return p; } + } @@ -458,6 +461,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/TollfreeVerificationResource.cs b/src/Twilio/Rest/Messaging/V1/TollfreeVerificationResource.cs index 75d7b014e..cab77367d 100644 --- a/src/Twilio/Rest/Messaging/V1/TollfreeVerificationResource.cs +++ b/src/Twilio/Rest/Messaging/V1/TollfreeVerificationResource.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; @@ -575,6 +576,22 @@ public static TollfreeVerificationResource 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 to identify Tollfree Verification. diff --git a/src/Twilio/Rest/Messaging/V1/UsecaseOptions.cs b/src/Twilio/Rest/Messaging/V1/UsecaseOptions.cs index 026f6eaf1..c7ddf974e 100644 --- a/src/Twilio/Rest/Messaging/V1/UsecaseOptions.cs +++ b/src/Twilio/Rest/Messaging/V1/UsecaseOptions.cs @@ -38,6 +38,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Messaging/V1/UsecaseResource.cs b/src/Twilio/Rest/Messaging/V1/UsecaseResource.cs index 3b3aa2816..edb574843 100644 --- a/src/Twilio/Rest/Messaging/V1/UsecaseResource.cs +++ b/src/Twilio/Rest/Messaging/V1/UsecaseResource.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; @@ -109,6 +110,22 @@ public static UsecaseResource 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); + } + } /// Human readable use case details (usecase, description and purpose) of Messaging Service Use Cases. diff --git a/src/Twilio/Rest/Microvisor/V1/AccountConfigOptions.cs b/src/Twilio/Rest/Microvisor/V1/AccountConfigOptions.cs index 850f1997a..247e0c11a 100644 --- a/src/Twilio/Rest/Microvisor/V1/AccountConfigOptions.cs +++ b/src/Twilio/Rest/Microvisor/V1/AccountConfigOptions.cs @@ -60,6 +60,7 @@ public List> GetParams() } return p; } + } @@ -87,6 +88,7 @@ public List> GetParams() return p; } + } @@ -116,6 +118,7 @@ public List> GetParams() return p; } + } @@ -140,6 +143,7 @@ public List> GetParams() } return p; } + } @@ -177,6 +181,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Microvisor/V1/AccountConfigResource.cs b/src/Twilio/Rest/Microvisor/V1/AccountConfigResource.cs index 8bfc89eaa..f8567777b 100644 --- a/src/Twilio/Rest/Microvisor/V1/AccountConfigResource.cs +++ b/src/Twilio/Rest/Microvisor/V1/AccountConfigResource.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; @@ -444,6 +445,22 @@ public static AccountConfigResource 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 config key; up to 100 characters. diff --git a/src/Twilio/Rest/Microvisor/V1/AccountSecretOptions.cs b/src/Twilio/Rest/Microvisor/V1/AccountSecretOptions.cs index aabc3398c..adf37b2fd 100644 --- a/src/Twilio/Rest/Microvisor/V1/AccountSecretOptions.cs +++ b/src/Twilio/Rest/Microvisor/V1/AccountSecretOptions.cs @@ -60,6 +60,7 @@ public List> GetParams() } return p; } + } @@ -87,6 +88,7 @@ public List> GetParams() return p; } + } @@ -116,6 +118,7 @@ public List> GetParams() return p; } + } @@ -140,6 +143,7 @@ public List> GetParams() } return p; } + } @@ -177,6 +181,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Microvisor/V1/AccountSecretResource.cs b/src/Twilio/Rest/Microvisor/V1/AccountSecretResource.cs index 1f4b2767b..8f23bec53 100644 --- a/src/Twilio/Rest/Microvisor/V1/AccountSecretResource.cs +++ b/src/Twilio/Rest/Microvisor/V1/AccountSecretResource.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; @@ -444,6 +445,22 @@ public static AccountSecretResource 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 secret key; up to 100 characters. diff --git a/src/Twilio/Rest/Microvisor/V1/App/AppManifestOptions.cs b/src/Twilio/Rest/Microvisor/V1/App/AppManifestOptions.cs index e024a611e..a8a931777 100644 --- a/src/Twilio/Rest/Microvisor/V1/App/AppManifestOptions.cs +++ b/src/Twilio/Rest/Microvisor/V1/App/AppManifestOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Microvisor/V1/App/AppManifestResource.cs b/src/Twilio/Rest/Microvisor/V1/App/AppManifestResource.cs index 766880fd6..eea944c56 100644 --- a/src/Twilio/Rest/Microvisor/V1/App/AppManifestResource.cs +++ b/src/Twilio/Rest/Microvisor/V1/App/AppManifestResource.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 AppManifestResource 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 App. diff --git a/src/Twilio/Rest/Microvisor/V1/AppOptions.cs b/src/Twilio/Rest/Microvisor/V1/AppOptions.cs index 2ad6a8e01..39cabadda 100644 --- a/src/Twilio/Rest/Microvisor/V1/AppOptions.cs +++ b/src/Twilio/Rest/Microvisor/V1/AppOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -76,6 +77,7 @@ public List> GetParams() return p; } + } @@ -100,6 +102,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Microvisor/V1/AppResource.cs b/src/Twilio/Rest/Microvisor/V1/AppResource.cs index a9aa98e55..86f851a6d 100644 --- a/src/Twilio/Rest/Microvisor/V1/AppResource.cs +++ b/src/Twilio/Rest/Microvisor/V1/AppResource.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; @@ -302,6 +303,22 @@ public static AppResource 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 App. diff --git a/src/Twilio/Rest/Microvisor/V1/Device/DeviceConfigOptions.cs b/src/Twilio/Rest/Microvisor/V1/Device/DeviceConfigOptions.cs index df9e42f74..3e56ff20f 100644 --- a/src/Twilio/Rest/Microvisor/V1/Device/DeviceConfigOptions.cs +++ b/src/Twilio/Rest/Microvisor/V1/Device/DeviceConfigOptions.cs @@ -65,6 +65,7 @@ public List> GetParams() } return p; } + } @@ -97,6 +98,7 @@ public List> GetParams() return p; } + } @@ -131,6 +133,7 @@ public List> GetParams() return p; } + } @@ -164,6 +167,7 @@ public List> GetParams() } return p; } + } @@ -206,6 +210,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Microvisor/V1/Device/DeviceConfigResource.cs b/src/Twilio/Rest/Microvisor/V1/Device/DeviceConfigResource.cs index 5b9b90cf5..71490ba52 100644 --- a/src/Twilio/Rest/Microvisor/V1/Device/DeviceConfigResource.cs +++ b/src/Twilio/Rest/Microvisor/V1/Device/DeviceConfigResource.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; @@ -471,6 +472,22 @@ public static DeviceConfigResource 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 the parent Device. diff --git a/src/Twilio/Rest/Microvisor/V1/Device/DeviceSecretOptions.cs b/src/Twilio/Rest/Microvisor/V1/Device/DeviceSecretOptions.cs index c243c6295..9d762fd26 100644 --- a/src/Twilio/Rest/Microvisor/V1/Device/DeviceSecretOptions.cs +++ b/src/Twilio/Rest/Microvisor/V1/Device/DeviceSecretOptions.cs @@ -65,6 +65,7 @@ public List> GetParams() } return p; } + } @@ -97,6 +98,7 @@ public List> GetParams() return p; } + } @@ -131,6 +133,7 @@ public List> GetParams() return p; } + } @@ -164,6 +167,7 @@ public List> GetParams() } return p; } + } @@ -206,6 +210,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Microvisor/V1/Device/DeviceSecretResource.cs b/src/Twilio/Rest/Microvisor/V1/Device/DeviceSecretResource.cs index 5bb593c11..fa18c3dee 100644 --- a/src/Twilio/Rest/Microvisor/V1/Device/DeviceSecretResource.cs +++ b/src/Twilio/Rest/Microvisor/V1/Device/DeviceSecretResource.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; @@ -471,6 +472,22 @@ public static DeviceSecretResource 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 the parent Device. diff --git a/src/Twilio/Rest/Microvisor/V1/DeviceOptions.cs b/src/Twilio/Rest/Microvisor/V1/DeviceOptions.cs index 8adec539d..15ed6453b 100644 --- a/src/Twilio/Rest/Microvisor/V1/DeviceOptions.cs +++ b/src/Twilio/Rest/Microvisor/V1/DeviceOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } @@ -127,6 +129,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Microvisor/V1/DeviceResource.cs b/src/Twilio/Rest/Microvisor/V1/DeviceResource.cs index 5427317c8..22c924d56 100644 --- a/src/Twilio/Rest/Microvisor/V1/DeviceResource.cs +++ b/src/Twilio/Rest/Microvisor/V1/DeviceResource.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; @@ -318,6 +319,22 @@ public static DeviceResource 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 Device. diff --git a/src/Twilio/Rest/Monitor/V1/AlertOptions.cs b/src/Twilio/Rest/Monitor/V1/AlertOptions.cs index c03ef9cf0..2775198b1 100644 --- a/src/Twilio/Rest/Monitor/V1/AlertOptions.cs +++ b/src/Twilio/Rest/Monitor/V1/AlertOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -92,6 +93,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Monitor/V1/AlertResource.cs b/src/Twilio/Rest/Monitor/V1/AlertResource.cs index 22f04d235..ff4f4bb98 100644 --- a/src/Twilio/Rest/Monitor/V1/AlertResource.cs +++ b/src/Twilio/Rest/Monitor/V1/AlertResource.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; @@ -246,6 +247,22 @@ public static AlertResource 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 Alert resource. diff --git a/src/Twilio/Rest/Monitor/V1/EventOptions.cs b/src/Twilio/Rest/Monitor/V1/EventOptions.cs index 1eb8be510..e0ac91706 100644 --- a/src/Twilio/Rest/Monitor/V1/EventOptions.cs +++ b/src/Twilio/Rest/Monitor/V1/EventOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -113,6 +114,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Monitor/V1/EventResource.cs b/src/Twilio/Rest/Monitor/V1/EventResource.cs index ca39008d3..3eb13150f 100644 --- a/src/Twilio/Rest/Monitor/V1/EventResource.cs +++ b/src/Twilio/Rest/Monitor/V1/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; @@ -258,6 +259,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); + } + } /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Event resource. diff --git a/src/Twilio/Rest/Notify/V1/CredentialOptions.cs b/src/Twilio/Rest/Notify/V1/CredentialOptions.cs index f16c8f797..35b31fd81 100644 --- a/src/Twilio/Rest/Notify/V1/CredentialOptions.cs +++ b/src/Twilio/Rest/Notify/V1/CredentialOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -243,6 +247,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Notify/V1/CredentialResource.cs b/src/Twilio/Rest/Notify/V1/CredentialResource.cs index c791e2003..c09554e97 100644 --- a/src/Twilio/Rest/Notify/V1/CredentialResource.cs +++ b/src/Twilio/Rest/Notify/V1/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); + } + } /// The unique string that we created to identify the Credential resource. diff --git a/src/Twilio/Rest/Notify/V1/Service/BindingOptions.cs b/src/Twilio/Rest/Notify/V1/Service/BindingOptions.cs index 048d24dae..0f2f4fa6a 100644 --- a/src/Twilio/Rest/Notify/V1/Service/BindingOptions.cs +++ b/src/Twilio/Rest/Notify/V1/Service/BindingOptions.cs @@ -103,6 +103,7 @@ public List> GetParams() } return p; } + } @@ -135,6 +136,7 @@ public List> GetParams() return p; } + } @@ -169,6 +171,7 @@ public List> GetParams() return p; } + } @@ -232,6 +235,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Notify/V1/Service/BindingResource.cs b/src/Twilio/Rest/Notify/V1/Service/BindingResource.cs index 71500edd8..83ec2c9c1 100644 --- a/src/Twilio/Rest/Notify/V1/Service/BindingResource.cs +++ b/src/Twilio/Rest/Notify/V1/Service/BindingResource.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; @@ -445,6 +446,22 @@ public static BindingResource 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 Binding resource. diff --git a/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.cs b/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.cs index 863895f4a..c8114241d 100644 --- a/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.cs +++ b/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.cs @@ -177,6 +177,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Notify/V1/Service/NotificationResource.cs b/src/Twilio/Rest/Notify/V1/Service/NotificationResource.cs index 385dbae2f..e40650abd 100644 --- a/src/Twilio/Rest/Notify/V1/Service/NotificationResource.cs +++ b/src/Twilio/Rest/Notify/V1/Service/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; @@ -202,6 +203,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 unique string that we created to identify the Notification resource. diff --git a/src/Twilio/Rest/Notify/V1/ServiceOptions.cs b/src/Twilio/Rest/Notify/V1/ServiceOptions.cs index 535d1bf37..cd3545f27 100644 --- a/src/Twilio/Rest/Notify/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/Notify/V1/ServiceOptions.cs @@ -136,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -163,6 +164,7 @@ public List> GetParams() return p; } + } @@ -192,6 +194,7 @@ public List> GetParams() return p; } + } @@ -223,6 +226,7 @@ public List> GetParams() } return p; } + } @@ -349,6 +353,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Notify/V1/ServiceResource.cs b/src/Twilio/Rest/Notify/V1/ServiceResource.cs index c67e1602c..83a66a68f 100644 --- a/src/Twilio/Rest/Notify/V1/ServiceResource.cs +++ b/src/Twilio/Rest/Notify/V1/ServiceResource.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; @@ -548,6 +549,22 @@ public static ServiceResource 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 Service resource. diff --git a/src/Twilio/Rest/Numbers/V1/BulkEligibilityOptions.cs b/src/Twilio/Rest/Numbers/V1/BulkEligibilityOptions.cs index e2242082c..9b9b6720e 100644 --- a/src/Twilio/Rest/Numbers/V1/BulkEligibilityOptions.cs +++ b/src/Twilio/Rest/Numbers/V1/BulkEligibilityOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Numbers/V1/BulkEligibilityResource.cs b/src/Twilio/Rest/Numbers/V1/BulkEligibilityResource.cs index 83cf86de6..75c0ed300 100644 --- a/src/Twilio/Rest/Numbers/V1/BulkEligibilityResource.cs +++ b/src/Twilio/Rest/Numbers/V1/BulkEligibilityResource.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 BulkEligibilityResource 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 bulk eligibility check that you want to know about. diff --git a/src/Twilio/Rest/Numbers/V1/PortingBulkPortabilityOptions.cs b/src/Twilio/Rest/Numbers/V1/PortingBulkPortabilityOptions.cs index 65c2bf196..c1e433d6a 100644 --- a/src/Twilio/Rest/Numbers/V1/PortingBulkPortabilityOptions.cs +++ b/src/Twilio/Rest/Numbers/V1/PortingBulkPortabilityOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } @@ -78,6 +79,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Numbers/V1/PortingBulkPortabilityResource.cs b/src/Twilio/Rest/Numbers/V1/PortingBulkPortabilityResource.cs index 0c720c99c..f88e7b3ea 100644 --- a/src/Twilio/Rest/Numbers/V1/PortingBulkPortabilityResource.cs +++ b/src/Twilio/Rest/Numbers/V1/PortingBulkPortabilityResource.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; @@ -194,6 +195,22 @@ public static PortingBulkPortabilityResource 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 Portability check. diff --git a/src/Twilio/Rest/Numbers/V1/PortingPortabilityOptions.cs b/src/Twilio/Rest/Numbers/V1/PortingPortabilityOptions.cs index f3d59d1b2..3d861ea74 100644 --- a/src/Twilio/Rest/Numbers/V1/PortingPortabilityOptions.cs +++ b/src/Twilio/Rest/Numbers/V1/PortingPortabilityOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V1/PortingPortabilityResource.cs b/src/Twilio/Rest/Numbers/V1/PortingPortabilityResource.cs index bb8ee984e..1eb8bffd0 100644 --- a/src/Twilio/Rest/Numbers/V1/PortingPortabilityResource.cs +++ b/src/Twilio/Rest/Numbers/V1/PortingPortabilityResource.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; @@ -132,6 +133,22 @@ public static PortingPortabilityResource 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 phone number which portability is to be checked. Phone numbers are in E.164 format (e.g. +16175551212). diff --git a/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderOptions.cs b/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderOptions.cs index edbdce328..84bc169e0 100644 --- a/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderOptions.cs @@ -30,7 +30,7 @@ public class ReadDependentHostedNumberOrderOptions : ReadOptions A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder. public string PathSigningDocumentSid { get; } - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. public DependentHostedNumberOrderResource.StatusEnum Status { get; set; } /// An E164 formatted phone number hosted by this HostedNumberOrder. @@ -79,6 +79,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderResource.cs b/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderResource.cs index ad18738ce..242da5268 100644 --- a/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderResource.cs +++ b/src/Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrderResource.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; @@ -96,7 +97,7 @@ public static async System.Threading.Tasks.Task Retrieve a list of dependent HostedNumberOrders belonging to the AuthorizationDocument. /// A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder. - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. /// An E164 formatted phone number hosted by this HostedNumberOrder. /// A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. /// A human readable description of this resource, up to 128 characters. @@ -121,7 +122,7 @@ public static ResourceSet Read( #if !NET35 /// Retrieve a list of dependent HostedNumberOrders belonging to the AuthorizationDocument. /// A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder. - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. /// An E164 formatted phone number hosted by this HostedNumberOrder. /// A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. /// A human readable description of this resource, up to 128 characters. @@ -209,6 +210,22 @@ public static DependentHostedNumberOrderResource 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 Authorization Document diff --git a/src/Twilio/Rest/Numbers/V2/AuthorizationDocumentOptions.cs b/src/Twilio/Rest/Numbers/V2/AuthorizationDocumentOptions.cs index e4a832ed9..79dc2bbe1 100644 --- a/src/Twilio/Rest/Numbers/V2/AuthorizationDocumentOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/AuthorizationDocumentOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -161,7 +164,7 @@ public class ReadAuthorizationDocumentOptions : ReadOptions Email that this AuthorizationDocument will be sent to for signing. public string Email { get; set; } - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. public AuthorizationDocumentResource.StatusEnum Status { get; set; } @@ -187,6 +190,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/AuthorizationDocumentResource.cs b/src/Twilio/Rest/Numbers/V2/AuthorizationDocumentResource.cs index 0b8368d5b..541207a9b 100644 --- a/src/Twilio/Rest/Numbers/V2/AuthorizationDocumentResource.cs +++ b/src/Twilio/Rest/Numbers/V2/AuthorizationDocumentResource.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; @@ -311,7 +312,7 @@ public static async System.Threading.Tasks.Task Retrieve a list of AuthorizationDocuments belonging to the account initiating the request. /// Email that this AuthorizationDocument will be sent to for signing. - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. /// How many resources to return in each list page. The default is 50, and the maximum is 1000. /// Record limit /// Client to make requests to Twilio @@ -330,7 +331,7 @@ public static ResourceSet Read( #if !NET35 /// Retrieve a list of AuthorizationDocuments belonging to the account initiating the request. /// Email that this AuthorizationDocument will be sent to for signing. - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. /// How many resources to return in each list page. The default is 50, and the maximum is 1000. /// Record limit /// Client to make requests to Twilio @@ -412,6 +413,22 @@ public static AuthorizationDocumentResource 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 AuthorizationDocument. diff --git a/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderOptions.cs b/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderOptions.cs index 989c7da5a..6f2571144 100644 --- a/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderResource.cs b/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderResource.cs index 9872708c4..b073887cc 100644 --- a/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderResource.cs +++ b/src/Twilio/Rest/Numbers/V2/BulkHostedNumberOrderResource.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 BulkHostedNumberOrderResource 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 BulkHostedNumberOrder. diff --git a/src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.cs b/src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.cs index c80a1c779..6a4395faa 100644 --- a/src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/HostedNumberOrderOptions.cs @@ -163,6 +163,7 @@ public List> GetParams() } return p; } + } @@ -190,6 +191,7 @@ public List> GetParams() return p; } + } @@ -219,6 +221,7 @@ public List> GetParams() return p; } + } @@ -278,6 +281,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/HostedNumberOrderResource.cs b/src/Twilio/Rest/Numbers/V2/HostedNumberOrderResource.cs index 7b8395ca1..845de4a7b 100644 --- a/src/Twilio/Rest/Numbers/V2/HostedNumberOrderResource.cs +++ b/src/Twilio/Rest/Numbers/V2/HostedNumberOrderResource.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; @@ -466,6 +467,22 @@ public static HostedNumberOrderResource 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 HostedNumberOrder. @@ -476,7 +493,7 @@ public static HostedNumberOrderResource FromJson(string json) [JsonProperty("account_sid")] public string AccountSid { get; private set; } - /// A 34 character string that uniquely identifies the [IncomingPhoneNumber](https://www.twilio.com/docs/api/rest/incoming-phone-numbers) resource that represents the phone number being hosted. + /// A 34 character string that uniquely identifies the [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the phone number being hosted. [JsonProperty("incoming_phone_number_sid")] public string IncomingPhoneNumberSid { get; private set; } @@ -484,7 +501,7 @@ public static HostedNumberOrderResource FromJson(string json) [JsonProperty("address_sid")] public string AddressSid { get; private set; } - /// A 34 character string that uniquely identifies the [Authorization Document](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents) the user needs to sign. + /// A 34 character string that uniquely identifies the [Authorization Document](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource) the user needs to sign. [JsonProperty("signing_document_sid")] public string SigningDocumentSid { get; private set; } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyOptions.cs index 58e77da9c..4591abd41 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyResource.cs index be1a37b2c..e19da50ea 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopyResource.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; @@ -264,6 +265,22 @@ public static BundleCopyResource 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 Bundle resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationOptions.cs index 6f0ba7178..fcbba4a22 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -79,6 +80,7 @@ public List> GetParams() return p; } + } @@ -112,6 +114,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationResource.cs index 081641ca7..5e57ef644 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/EvaluationResource.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; @@ -326,6 +327,22 @@ public static EvaluationResource 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 identifies the Evaluation resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentOptions.cs index 45bbec66f..129845c31 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentResource.cs index e6dd03797..287253212 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentResource.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; @@ -389,6 +390,22 @@ public static ItemAssignmentResource 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 Item Assignment resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsOptions.cs index 154040aeb..aeff08099 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsResource.cs index 4df27f6e3..51caa95e3 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ReplaceItemsResource.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; @@ -138,6 +139,22 @@ public static ReplaceItemsResource 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 Bundle resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.cs index 405b748b2..612c324ad 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.cs @@ -95,6 +95,7 @@ public List> GetParams() } return p; } + } @@ -122,6 +123,7 @@ public List> GetParams() return p; } + } @@ -151,6 +153,7 @@ public List> GetParams() return p; } + } @@ -255,6 +258,7 @@ public List> GetParams() } return p; } + } @@ -311,6 +315,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleResource.cs index 3ee8764da..a0e0447ae 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleResource.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; @@ -573,6 +574,22 @@ public static BundleResource 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 Bundle resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.cs index 28a38d3c3..88c3cf88d 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.cs @@ -67,6 +67,7 @@ public List> GetParams() } return p; } + } @@ -94,6 +95,7 @@ public List> GetParams() return p; } + } @@ -123,6 +125,7 @@ public List> GetParams() return p; } + } @@ -147,6 +150,7 @@ public List> GetParams() } return p; } + } @@ -189,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserResource.cs index 860904d08..fa8c89a3a 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserResource.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; @@ -465,6 +466,22 @@ public static EndUserResource 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 created by Twilio to identify the End User resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeOptions.cs index e32fd1519..27c25fdb1 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeResource.cs index d19d7d713..87f73abef 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeResource.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; @@ -234,6 +235,22 @@ public static EndUserTypeResource 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 identifies the End-User Type resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationOptions.cs index 991e4527d..b71db54f9 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -92,6 +93,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationResource.cs index e73fa9bf7..505cabae6 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/RegulationResource.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; @@ -259,6 +260,22 @@ public static RegulationResource 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 identifies the Regulation resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.cs index ecaed869f..62d3f398c 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.cs @@ -67,6 +67,7 @@ public List> GetParams() } return p; } + } @@ -94,6 +95,7 @@ public List> GetParams() return p; } + } @@ -123,6 +125,7 @@ public List> GetParams() return p; } + } @@ -147,6 +150,7 @@ public List> GetParams() } return p; } + } @@ -189,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentResource.cs index 3068b7af4..57fecf67d 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentResource.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; @@ -469,6 +470,22 @@ public static SupportingDocumentResource 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 created by Twilio to identify the Supporting Document resource. diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeOptions.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeOptions.cs index c8d322564..728ffede7 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeOptions.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeResource.cs b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeResource.cs index ed87ed44a..cfc50e8f1 100644 --- a/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeResource.cs +++ b/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeResource.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; @@ -234,6 +235,22 @@ public static SupportingDocumentTypeResource 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 identifies the Supporting Document Type resource. diff --git a/src/Twilio/Rest/Oauth/V1/DeviceCodeOptions.cs b/src/Twilio/Rest/Oauth/V1/DeviceCodeOptions.cs index 2e3f6f226..2885aaea1 100644 --- a/src/Twilio/Rest/Oauth/V1/DeviceCodeOptions.cs +++ b/src/Twilio/Rest/Oauth/V1/DeviceCodeOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Oauth/V1/DeviceCodeResource.cs b/src/Twilio/Rest/Oauth/V1/DeviceCodeResource.cs index 1a7185d7a..2e6f6dea7 100644 --- a/src/Twilio/Rest/Oauth/V1/DeviceCodeResource.cs +++ b/src/Twilio/Rest/Oauth/V1/DeviceCodeResource.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; @@ -123,6 +124,22 @@ public static DeviceCodeResource 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 device verification code. diff --git a/src/Twilio/Rest/Oauth/V1/OauthOptions.cs b/src/Twilio/Rest/Oauth/V1/OauthOptions.cs index ab1015aa8..e5b96962f 100644 --- a/src/Twilio/Rest/Oauth/V1/OauthOptions.cs +++ b/src/Twilio/Rest/Oauth/V1/OauthOptions.cs @@ -38,6 +38,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Oauth/V1/OauthResource.cs b/src/Twilio/Rest/Oauth/V1/OauthResource.cs index aa32d3da2..3211e8a12 100644 --- a/src/Twilio/Rest/Oauth/V1/OauthResource.cs +++ b/src/Twilio/Rest/Oauth/V1/OauthResource.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; @@ -109,6 +110,22 @@ public static OauthResource 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 collection of certificates where are signed Twilio-issued tokens. diff --git a/src/Twilio/Rest/Oauth/V1/OpenidDiscoveryOptions.cs b/src/Twilio/Rest/Oauth/V1/OpenidDiscoveryOptions.cs index f7016b467..54e80dcd5 100644 --- a/src/Twilio/Rest/Oauth/V1/OpenidDiscoveryOptions.cs +++ b/src/Twilio/Rest/Oauth/V1/OpenidDiscoveryOptions.cs @@ -38,6 +38,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Oauth/V1/OpenidDiscoveryResource.cs b/src/Twilio/Rest/Oauth/V1/OpenidDiscoveryResource.cs index 6c63446b0..16f9076ce 100644 --- a/src/Twilio/Rest/Oauth/V1/OpenidDiscoveryResource.cs +++ b/src/Twilio/Rest/Oauth/V1/OpenidDiscoveryResource.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; @@ -109,6 +110,22 @@ public static OpenidDiscoveryResource 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 URL of the party that will create the token and sign it with its private key. diff --git a/src/Twilio/Rest/Oauth/V1/TokenOptions.cs b/src/Twilio/Rest/Oauth/V1/TokenOptions.cs index 9a848b7e1..146153d29 100644 --- a/src/Twilio/Rest/Oauth/V1/TokenOptions.cs +++ b/src/Twilio/Rest/Oauth/V1/TokenOptions.cs @@ -102,6 +102,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Oauth/V1/TokenResource.cs b/src/Twilio/Rest/Oauth/V1/TokenResource.cs index df070ee5c..bd3fef174 100644 --- a/src/Twilio/Rest/Oauth/V1/TokenResource.cs +++ b/src/Twilio/Rest/Oauth/V1/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; @@ -143,6 +144,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); + } + } /// Token which carries the necessary information to access a Twilio resource directly. diff --git a/src/Twilio/Rest/Oauth/V1/UserInfoOptions.cs b/src/Twilio/Rest/Oauth/V1/UserInfoOptions.cs index 319b7745c..84f8f5d67 100644 --- a/src/Twilio/Rest/Oauth/V1/UserInfoOptions.cs +++ b/src/Twilio/Rest/Oauth/V1/UserInfoOptions.cs @@ -38,6 +38,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Oauth/V1/UserInfoResource.cs b/src/Twilio/Rest/Oauth/V1/UserInfoResource.cs index 354e8b265..0a127fbf6 100644 --- a/src/Twilio/Rest/Oauth/V1/UserInfoResource.cs +++ b/src/Twilio/Rest/Oauth/V1/UserInfoResource.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; @@ -109,6 +110,22 @@ public static UserInfoResource 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 URL of the party that will create the token and sign it with its private key. diff --git a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateOptions.cs b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateOptions.cs index 34ee9fe4d..b5b51bb6e 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateOptions.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateOptions.cs @@ -70,6 +70,7 @@ public List> GetParams() } return p; } + } @@ -102,6 +103,7 @@ public List> GetParams() return p; } + } @@ -136,6 +138,7 @@ public List> GetParams() return p; } + } @@ -176,6 +179,7 @@ public List> GetParams() } return p; } + } @@ -223,6 +227,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateResource.cs b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateResource.cs index 0e5b92864..ec8e81123 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateResource.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateResource.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; @@ -483,6 +484,22 @@ public static CertificateResource 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 34 character string that uniquely identifies this Certificate credential resource. diff --git a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentOptions.cs b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentOptions.cs index d71f261ca..1f445d8c6 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentOptions.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentOptions.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; } + } @@ -207,6 +211,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentResource.cs b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentResource.cs index cb23d4569..23d2a8df5 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentResource.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentResource.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 DeploymentResource 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 34 character string that uniquely identifies this Deployment resource. diff --git a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceOptions.cs b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceOptions.cs index 38285e3f0..b533792bd 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceOptions.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceOptions.cs @@ -82,6 +82,7 @@ public List> GetParams() } return p; } + } @@ -114,6 +115,7 @@ public List> GetParams() return p; } + } @@ -148,6 +150,7 @@ public List> GetParams() return p; } + } @@ -188,6 +191,7 @@ public List> GetParams() } return p; } + } @@ -249,6 +253,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceResource.cs b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceResource.cs index 0ff722e35..e736cfde0 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceResource.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceResource.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; @@ -499,6 +500,22 @@ public static DeviceResource 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 34 character string that uniquely identifies this Device resource. diff --git a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyOptions.cs b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyOptions.cs index 14382d285..b22c3ca2e 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyOptions.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyOptions.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; } + } @@ -167,6 +170,7 @@ public List> GetParams() } return p; } + } @@ -214,6 +218,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyResource.cs b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyResource.cs index fe7054b4e..c347e543d 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyResource.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/Fleet/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; @@ -479,6 +480,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); + } + } /// Contains a 34 character string that uniquely identifies this Key credential resource. diff --git a/src/Twilio/Rest/Preview/DeployedDevices/FleetOptions.cs b/src/Twilio/Rest/Preview/DeployedDevices/FleetOptions.cs index 3170aa257..fc2774334 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/FleetOptions.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/FleetOptions.cs @@ -45,6 +45,7 @@ public List> GetParams() } return p; } + } @@ -72,6 +73,7 @@ public List> GetParams() return p; } + } @@ -101,6 +103,7 @@ public List> GetParams() return p; } + } @@ -125,6 +128,7 @@ public List> GetParams() } return p; } + } @@ -167,6 +171,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/DeployedDevices/FleetResource.cs b/src/Twilio/Rest/Preview/DeployedDevices/FleetResource.cs index 2962ba5dc..f13092b45 100644 --- a/src/Twilio/Rest/Preview/DeployedDevices/FleetResource.cs +++ b/src/Twilio/Rest/Preview/DeployedDevices/FleetResource.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; @@ -444,6 +445,22 @@ public static FleetResource 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 34 character string that uniquely identifies this Fleet resource. diff --git a/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.cs b/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.cs index 11573e1a9..3880b1568 100644 --- a/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.cs +++ b/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.cs @@ -27,10 +27,10 @@ namespace Twilio.Rest.Preview.HostedNumbers.AuthorizationDocument public class ReadDependentHostedNumberOrderOptions : ReadOptions { - + /// A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder. public string PathSigningDocumentSid { get; } - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. public DependentHostedNumberOrderResource.StatusEnum Status { get; set; } /// An E164 formatted phone number hosted by this HostedNumberOrder. @@ -48,7 +48,7 @@ public class ReadDependentHostedNumberOrderOptions : ReadOptions Construct a new ListHostedNumbersDependentHostedNumberOrderOptions - /// + /// A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder. public ReadDependentHostedNumberOrderOptions(string pathSigningDocumentSid) { PathSigningDocumentSid = pathSigningDocumentSid; @@ -86,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderResource.cs b/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderResource.cs index 952dba416..bb26e43a6 100644 --- a/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderResource.cs +++ b/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderResource.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; @@ -110,8 +111,8 @@ public static async System.Threading.Tasks.Task Retrieve a list of dependent HostedNumberOrders belonging to the AuthorizationDocument. - /// - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. /// An E164 formatted phone number hosted by this HostedNumberOrder. /// A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. /// A human readable description of this resource, up to 64 characters. @@ -137,8 +138,8 @@ public static ResourceSet Read( #if !NET35 /// Retrieve a list of dependent HostedNumberOrders belonging to the AuthorizationDocument. - /// - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. /// An E164 formatted phone number hosted by this HostedNumberOrder. /// A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. /// A human readable description of this resource, up to 64 characters. @@ -228,6 +229,22 @@ public static DependentHostedNumberOrderResource 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 Authorization Document diff --git a/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.cs b/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.cs index 7101e3926..62d365088 100644 --- a/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.cs +++ b/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.cs @@ -95,6 +95,7 @@ public List> GetParams() } return p; } + } @@ -122,6 +123,7 @@ public List> GetParams() return p; } + } @@ -134,7 +136,7 @@ public class ReadAuthorizationDocumentOptions : ReadOptions Email that this AuthorizationDocument will be sent to for signing. public string Email { get; set; } - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. public AuthorizationDocumentResource.StatusEnum Status { get; set; } @@ -160,6 +162,7 @@ public List> GetParams() } return p; } + } @@ -168,7 +171,7 @@ public List> GetParams() public class UpdateAuthorizationDocumentOptions : IOptions { - + /// A 34 character string that uniquely identifies this AuthorizationDocument. public string PathSid { get; } /// A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. @@ -195,7 +198,7 @@ public class UpdateAuthorizationDocumentOptions : IOptions Construct a new UpdateHostedNumbersAuthorizationDocumentOptions - /// + /// A 34 character string that uniquely identifies this AuthorizationDocument. public UpdateAuthorizationDocumentOptions(string pathSid) { PathSid = pathSid; @@ -239,6 +242,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentResource.cs b/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentResource.cs index 95ae00d85..a80ec4a56 100644 --- a/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentResource.cs +++ b/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentResource.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; @@ -243,7 +244,7 @@ public static async System.Threading.Tasks.Task Retrieve a list of AuthorizationDocuments belonging to the account initiating the request. /// Email that this AuthorizationDocument will be sent to for signing. - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. /// How many resources to return in each list page. The default is 50, and the maximum is 1000. /// Record limit /// Client to make requests to Twilio @@ -262,7 +263,7 @@ public static ResourceSet Read( #if !NET35 /// Retrieve a list of AuthorizationDocuments belonging to the account initiating the request. /// Email that this AuthorizationDocument will be sent to for signing. - /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + /// Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses. /// How many resources to return in each list page. The default is 50, and the maximum is 1000. /// Record limit /// Client to make requests to Twilio @@ -371,7 +372,7 @@ public static async System.Threading.Tasks.Task U #endif /// Updates a specific AuthorizationDocument. - /// + /// A 34 character string that uniquely identifies this AuthorizationDocument. /// A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. /// A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. /// Email that this AuthorizationDocument will be sent to for signing. @@ -398,7 +399,7 @@ public static AuthorizationDocumentResource Update( #if !NET35 /// Updates a specific AuthorizationDocument. - /// + /// A 34 character string that uniquely identifies this AuthorizationDocument. /// A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. /// A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. /// Email that this AuthorizationDocument will be sent to for signing. @@ -440,6 +441,22 @@ public static AuthorizationDocumentResource 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 AuthorizationDocument. diff --git a/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.cs b/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.cs index 51a886aad..5f4acf6d3 100644 --- a/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.cs +++ b/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.cs @@ -166,6 +166,7 @@ public List> GetParams() } return p; } + } @@ -193,6 +194,7 @@ public List> GetParams() return p; } + } @@ -222,6 +224,7 @@ public List> GetParams() return p; } + } @@ -281,6 +284,7 @@ public List> GetParams() } return p; } + } @@ -289,7 +293,7 @@ public List> GetParams() public class UpdateHostedNumberOrderOptions : IOptions { - + /// A 34 character string that uniquely identifies this HostedNumberOrder. public string PathSid { get; } /// A 64 character string that is a human readable text that describes this resource. @@ -325,7 +329,7 @@ public class UpdateHostedNumberOrderOptions : IOptions Construct a new UpdateHostedNumbersHostedNumberOrderOptions - /// + /// A 34 character string that uniquely identifies this HostedNumberOrder. public UpdateHostedNumberOrderOptions(string pathSid) { PathSid = pathSid; @@ -380,6 +384,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderResource.cs b/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderResource.cs index a1b7c21c6..8e4df0130 100644 --- a/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderResource.cs +++ b/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderResource.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; @@ -512,7 +513,7 @@ public static async System.Threading.Tasks.Task Updat #endif /// Updates a specific HostedNumberOrder. - /// + /// A 34 character string that uniquely identifies this HostedNumberOrder. /// A 64 character string that is a human readable text that describes this resource. /// Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. /// Email of the owner of this phone number that is being hosted. @@ -545,7 +546,7 @@ public static HostedNumberOrderResource Update( #if !NET35 /// Updates a specific HostedNumberOrder. - /// + /// A 34 character string that uniquely identifies this HostedNumberOrder. /// A 64 character string that is a human readable text that describes this resource. /// Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. /// Email of the owner of this phone number that is being hosted. @@ -593,6 +594,22 @@ public static HostedNumberOrderResource 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 HostedNumberOrder. @@ -603,7 +620,7 @@ public static HostedNumberOrderResource FromJson(string json) [JsonProperty("account_sid")] public string AccountSid { get; private set; } - /// A 34 character string that uniquely identifies the [IncomingPhoneNumber](https://www.twilio.com/docs/api/rest/incoming-phone-numbers) resource that represents the phone number being hosted. + /// A 34 character string that uniquely identifies the [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the phone number being hosted. [JsonProperty("incoming_phone_number_sid")] public string IncomingPhoneNumberSid { get; private set; } @@ -611,7 +628,7 @@ public static HostedNumberOrderResource FromJson(string json) [JsonProperty("address_sid")] public string AddressSid { get; private set; } - /// A 34 character string that uniquely identifies the [Authorization Document](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents) the user needs to sign. + /// A 34 character string that uniquely identifies the [Authorization Document](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource) the user needs to sign. [JsonProperty("signing_document_sid")] public string SigningDocumentSid { get; private set; } diff --git a/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionOptions.cs b/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionOptions.cs index 4ba649bf4..80c6b1003 100644 --- a/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionOptions.cs +++ b/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionResource.cs b/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionResource.cs index c44ea4c5b..e5de05b16 100644 --- a/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionResource.cs +++ b/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionResource.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 AvailableAddOnExtensionResource 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 AvailableAddOnExtension resource. diff --git a/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnOptions.cs b/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnOptions.cs index 5caddd8bc..83ea2b207 100644 --- a/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnOptions.cs +++ b/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnResource.cs b/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnResource.cs index b22a3f5e4..fb00e0566 100644 --- a/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnResource.cs +++ b/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnResource.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; @@ -234,6 +235,22 @@ public static AvailableAddOnResource 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 AvailableAddOn resource. diff --git a/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionOptions.cs b/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionOptions.cs index 803cbb692..68b26610a 100644 --- a/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionOptions.cs +++ b/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } @@ -127,6 +129,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionResource.cs b/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionResource.cs index af8cac1d8..d82563dc9 100644 --- a/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionResource.cs +++ b/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionResource.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; @@ -323,6 +324,22 @@ public static InstalledAddOnExtensionResource 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 InstalledAddOn Extension resource. diff --git a/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.cs b/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.cs index ff260e4f1..5f9a581dd 100644 --- a/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.cs +++ b/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -101,6 +102,7 @@ public List> GetParams() return p; } + } @@ -130,6 +132,7 @@ public List> GetParams() return p; } + } @@ -154,6 +157,7 @@ public List> GetParams() } return p; } + } @@ -196,6 +200,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnResource.cs b/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnResource.cs index 62926df73..235871ac7 100644 --- a/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnResource.cs +++ b/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnResource.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; @@ -456,6 +457,22 @@ public static InstalledAddOnResource 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 InstalledAddOn resource. This Sid can also be found in the Console on that specific Add-ons page as the 'Available Add-on Sid'. diff --git a/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionOptions.cs b/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionOptions.cs index 7696e6658..24da636c8 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -199,6 +202,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionResource.cs b/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionResource.cs index a99803cd7..964eb0e3b 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionResource.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionResource.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; @@ -424,6 +425,22 @@ public static DocumentPermissionResource 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 Twilio Account. diff --git a/src/Twilio/Rest/Preview/Sync/Service/DocumentOptions.cs b/src/Twilio/Rest/Preview/Sync/Service/DocumentOptions.cs index 46f816d3e..3c2b7f7ff 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/DocumentOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/DocumentOptions.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; } + } @@ -205,6 +209,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Preview/Sync/Service/DocumentResource.cs b/src/Twilio/Rest/Preview/Sync/Service/DocumentResource.cs index 859bcbb8e..8f1e01533 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/DocumentResource.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/DocumentResource.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 DocumentResource 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/Preview/Sync/Service/SyncList/SyncListItemOptions.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.cs index e4a6016c6..1bc6a07dd 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.cs @@ -61,6 +61,7 @@ public List> GetParams() } return p; } + } @@ -101,6 +102,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -150,6 +152,7 @@ public List> GetParams() return p; } + } @@ -209,6 +212,7 @@ public List> GetParams() } return p; } + } @@ -259,6 +263,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemResource.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemResource.cs index bddd83597..ffa73cff3 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemResource.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemResource.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; @@ -536,6 +537,22 @@ public static SyncListItemResource 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 index diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionOptions.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionOptions.cs index f05dbd99b..f93819e19 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -199,6 +202,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionResource.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionResource.cs index 3d70cb8d5..3545951a7 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionResource.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionResource.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; @@ -424,6 +425,22 @@ public static SyncListPermissionResource 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 Twilio Account. diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncListOptions.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncListOptions.cs index 09ba99832..522913585 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncListOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncListOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } @@ -86,6 +87,7 @@ public List> GetParams() return p; } + } @@ -120,6 +122,7 @@ public List> GetParams() return p; } + } @@ -153,6 +156,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncListResource.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncListResource.cs index 9a3a669ab..b60caad49 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncListResource.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncListResource.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; @@ -389,6 +390,22 @@ public static SyncListResource 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/Preview/Sync/Service/SyncMap/SyncMapItemOptions.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.cs index ae164780e..dac7c68c2 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.cs @@ -70,6 +70,7 @@ public List> GetParams() } return p; } + } @@ -110,6 +111,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -159,6 +161,7 @@ public List> GetParams() return p; } + } @@ -218,6 +221,7 @@ public List> GetParams() } return p; } + } @@ -268,6 +272,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemResource.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemResource.cs index dac55eb64..0eb3829f9 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemResource.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemResource.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; @@ -540,6 +541,22 @@ public static SyncMapItemResource 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 key diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionOptions.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionOptions.cs index b5c39b0f4..57f92275f 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -199,6 +202,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionResource.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionResource.cs index 31de9772b..9231ac30c 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionResource.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionResource.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; @@ -424,6 +425,22 @@ public static SyncMapPermissionResource 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 Twilio Account. diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.cs index 1bdf10769..d88774e18 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } @@ -86,6 +87,7 @@ public List> GetParams() return p; } + } @@ -120,6 +122,7 @@ public List> GetParams() return p; } + } @@ -153,6 +156,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Sync/Service/SyncMapResource.cs b/src/Twilio/Rest/Preview/Sync/Service/SyncMapResource.cs index dfe745bd8..ef2aa6890 100644 --- a/src/Twilio/Rest/Preview/Sync/Service/SyncMapResource.cs +++ b/src/Twilio/Rest/Preview/Sync/Service/SyncMapResource.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; @@ -389,6 +390,22 @@ public static SyncMapResource 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/Preview/Sync/ServiceOptions.cs b/src/Twilio/Rest/Preview/Sync/ServiceOptions.cs index 5d93b8967..127dea24b 100644 --- a/src/Twilio/Rest/Preview/Sync/ServiceOptions.cs +++ b/src/Twilio/Rest/Preview/Sync/ServiceOptions.cs @@ -66,6 +66,7 @@ public List> GetParams() } return p; } + } @@ -93,6 +94,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -146,6 +149,7 @@ public List> GetParams() } return p; } + } @@ -202,6 +206,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Sync/ServiceResource.cs b/src/Twilio/Rest/Preview/Sync/ServiceResource.cs index fc88d5237..dca8f2dca 100644 --- a/src/Twilio/Rest/Preview/Sync/ServiceResource.cs +++ b/src/Twilio/Rest/Preview/Sync/ServiceResource.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; @@ -464,6 +465,22 @@ public static ServiceResource 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/Preview/Understand/Assistant/AssistantFallbackActionsOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.cs index aa4a2baef..88769ec72 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.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/Preview/Understand/Assistant/AssistantFallbackActionsResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsResource.cs index ed0cac9c7..b7b37826c 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsResource.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 AssistantFallbackActionsResource 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 account_sid diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.cs index 0e0c17a10..4a32917fd 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.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/Preview/Understand/Assistant/AssistantInitiationActionsResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsResource.cs index 75fe7501d..b91542fc9 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsResource.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 AssistantInitiationActionsResource 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 account_sid diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/DialogueOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/DialogueOptions.cs index e11a8b738..797f4c369 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/DialogueOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/DialogueOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/DialogueResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/DialogueResource.cs index 5946fd86d..49a2f4a4d 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/DialogueResource.cs +++ b/src/Twilio/Rest/Preview/Understand/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 unique ID of the Account that created this Field. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs index f3594b883..8b0610dfc 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/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/Preview/Understand/Assistant/FieldType/FieldValueResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs index defb79432..b5fea161a 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueResource.cs +++ b/src/Twilio/Rest/Preview/Understand/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 unique ID of the Account that created this Field Value. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.cs index e798654ca..516cc459d 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/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/Preview/Understand/Assistant/FieldTypeResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeResource.cs index 59c2de9ea..443e6a06f 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeResource.cs +++ b/src/Twilio/Rest/Preview/Understand/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 unique ID of the Account that created this Field Type. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.cs index c9039e2ec..5d78bb573 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/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/Preview/Understand/Assistant/ModelBuildResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildResource.cs index e30209178..5e1207dc8 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildResource.cs +++ b/src/Twilio/Rest/Preview/Understand/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 unique ID of the Account that created this Model Build. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.cs index 9617c1fe5..4e827e5dd 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.cs @@ -86,6 +86,7 @@ public List> GetParams() } return p; } + } @@ -118,6 +119,7 @@ public List> GetParams() return p; } + } @@ -152,6 +154,7 @@ public List> GetParams() return p; } + } @@ -206,6 +209,7 @@ public List> GetParams() } return p; } + } @@ -253,6 +257,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/QueryResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/QueryResource.cs index 62ec1e0c2..5f4469f86 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/QueryResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/QueryResource.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; @@ -499,6 +500,22 @@ public static QueryResource 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 created this Query. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetOptions.cs index 803aed58d..a967090a1 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetOptions.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/Preview/Understand/Assistant/StyleSheetResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetResource.cs index dce504c94..d206950e1 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetResource.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 StyleSheetResource 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 created this Assistant diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldOptions.cs index fde637128..1b74d1187 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldOptions.cs @@ -70,6 +70,7 @@ public List> GetParams() } return p; } + } @@ -107,6 +108,7 @@ public List> GetParams() return p; } + } @@ -146,6 +148,7 @@ public List> GetParams() return p; } + } @@ -184,6 +187,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldResource.cs index 90a5fe5e6..65a471ea9 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldResource.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; @@ -414,6 +415,22 @@ public static FieldResource 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 created this Field. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleOptions.cs index 6e04a40c4..8a19c253a 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleOptions.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; } + } @@ -257,6 +261,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleResource.cs index 9055e7f69..7679597cc 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleResource.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; @@ -514,6 +515,22 @@ public static SampleResource 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 created this Sample. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsOptions.cs index 42be06c2c..201535d68 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -93,6 +94,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsResource.cs index e87b7e349..6d9cc6215 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsResource.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; @@ -197,6 +198,22 @@ public static TaskActionsResource 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 created this Field. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsOptions.cs index 6e4721912..0693a0b0b 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsResource.cs index 3e8329097..c4fc034ce 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsResource.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 TaskStatisticsResource 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 created this Field. diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/TaskOptions.cs b/src/Twilio/Rest/Preview/Understand/Assistant/TaskOptions.cs index dec50f42a..3f48e1f2a 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/TaskOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/TaskOptions.cs @@ -77,6 +77,7 @@ public List> GetParams() } return p; } + } @@ -109,6 +110,7 @@ public List> GetParams() return p; } + } @@ -143,6 +145,7 @@ public List> GetParams() return p; } + } @@ -176,6 +179,7 @@ public List> GetParams() } return p; } + } @@ -237,6 +241,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Understand/Assistant/TaskResource.cs b/src/Twilio/Rest/Preview/Understand/Assistant/TaskResource.cs index edf1cfc0a..6ee4d10c4 100644 --- a/src/Twilio/Rest/Preview/Understand/Assistant/TaskResource.cs +++ b/src/Twilio/Rest/Preview/Understand/Assistant/TaskResource.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; @@ -491,6 +492,22 @@ public static TaskResource 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 created this Task. diff --git a/src/Twilio/Rest/Preview/Understand/AssistantOptions.cs b/src/Twilio/Rest/Preview/Understand/AssistantOptions.cs index 8bd0279e6..408be3721 100644 --- a/src/Twilio/Rest/Preview/Understand/AssistantOptions.cs +++ b/src/Twilio/Rest/Preview/Understand/AssistantOptions.cs @@ -94,6 +94,7 @@ public List> GetParams() } return p; } + } @@ -121,6 +122,7 @@ public List> GetParams() return p; } + } @@ -150,6 +152,7 @@ public List> GetParams() return p; } + } @@ -174,6 +177,7 @@ public List> GetParams() } return p; } + } @@ -258,6 +262,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Understand/AssistantResource.cs b/src/Twilio/Rest/Preview/Understand/AssistantResource.cs index 7dc86e742..7646ca327 100644 --- a/src/Twilio/Rest/Preview/Understand/AssistantResource.cs +++ b/src/Twilio/Rest/Preview/Understand/AssistantResource.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; @@ -496,6 +497,22 @@ public static AssistantResource 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 created this Assistant. diff --git a/src/Twilio/Rest/Preview/Wireless/CommandOptions.cs b/src/Twilio/Rest/Preview/Wireless/CommandOptions.cs index acd1a5f67..5b8ecd12f 100644 --- a/src/Twilio/Rest/Preview/Wireless/CommandOptions.cs +++ b/src/Twilio/Rest/Preview/Wireless/CommandOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -172,6 +174,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Wireless/CommandResource.cs b/src/Twilio/Rest/Preview/Wireless/CommandResource.cs index a4cd5161c..92e6a0def 100644 --- a/src/Twilio/Rest/Preview/Wireless/CommandResource.cs +++ b/src/Twilio/Rest/Preview/Wireless/CommandResource.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; @@ -340,6 +341,22 @@ public static CommandResource 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/Preview/Wireless/RatePlanOptions.cs b/src/Twilio/Rest/Preview/Wireless/RatePlanOptions.cs index a5f4d77d9..f4e6faa39 100644 --- a/src/Twilio/Rest/Preview/Wireless/RatePlanOptions.cs +++ b/src/Twilio/Rest/Preview/Wireless/RatePlanOptions.cs @@ -108,6 +108,7 @@ public List> GetParams() } return p; } + } @@ -135,6 +136,7 @@ public List> GetParams() return p; } + } @@ -164,6 +166,7 @@ public List> GetParams() return p; } + } @@ -188,6 +191,7 @@ public List> GetParams() } return p; } + } @@ -230,6 +234,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Wireless/RatePlanResource.cs b/src/Twilio/Rest/Preview/Wireless/RatePlanResource.cs index e4d0c263e..6219b097c 100644 --- a/src/Twilio/Rest/Preview/Wireless/RatePlanResource.cs +++ b/src/Twilio/Rest/Preview/Wireless/RatePlanResource.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; @@ -480,6 +481,22 @@ public static RatePlanResource 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/Preview/Wireless/Sim/UsageOptions.cs b/src/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.cs index e6e2a3027..f0f21a567 100644 --- a/src/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.cs +++ b/src/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.cs @@ -61,6 +61,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Wireless/Sim/UsageResource.cs b/src/Twilio/Rest/Preview/Wireless/Sim/UsageResource.cs index b55b12f93..229a6eb4a 100644 --- a/src/Twilio/Rest/Preview/Wireless/Sim/UsageResource.cs +++ b/src/Twilio/Rest/Preview/Wireless/Sim/UsageResource.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; @@ -120,6 +121,22 @@ public static UsageResource 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 sim_sid diff --git a/src/Twilio/Rest/Preview/Wireless/SimOptions.cs b/src/Twilio/Rest/Preview/Wireless/SimOptions.cs index f6f2ed387..2c7a3c4b5 100644 --- a/src/Twilio/Rest/Preview/Wireless/SimOptions.cs +++ b/src/Twilio/Rest/Preview/Wireless/SimOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -106,6 +107,7 @@ public List> GetParams() } return p; } + } @@ -246,6 +248,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Preview/Wireless/SimResource.cs b/src/Twilio/Rest/Preview/Wireless/SimResource.cs index 7d9e3ecae..7a50455c5 100644 --- a/src/Twilio/Rest/Preview/Wireless/SimResource.cs +++ b/src/Twilio/Rest/Preview/Wireless/SimResource.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; @@ -386,6 +387,22 @@ public static SimResource 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/Pricing/V1/Messaging/CountryOptions.cs b/src/Twilio/Rest/Pricing/V1/Messaging/CountryOptions.cs index 5fc3475ba..5a9dd2e55 100644 --- a/src/Twilio/Rest/Pricing/V1/Messaging/CountryOptions.cs +++ b/src/Twilio/Rest/Pricing/V1/Messaging/CountryOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Pricing/V1/Messaging/CountryResource.cs b/src/Twilio/Rest/Pricing/V1/Messaging/CountryResource.cs index 82ff7e038..a30b7d0d2 100644 --- a/src/Twilio/Rest/Pricing/V1/Messaging/CountryResource.cs +++ b/src/Twilio/Rest/Pricing/V1/Messaging/CountryResource.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; @@ -234,6 +235,22 @@ public static CountryResource 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 name of the country. diff --git a/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryOptions.cs b/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryOptions.cs index 91888e15b..bcfda0825 100644 --- a/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryOptions.cs +++ b/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryResource.cs b/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryResource.cs index f4aa97e8a..8034ff890 100644 --- a/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryResource.cs +++ b/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryResource.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; @@ -234,6 +235,22 @@ public static CountryResource 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 name of the country. diff --git a/src/Twilio/Rest/Pricing/V1/Voice/CountryOptions.cs b/src/Twilio/Rest/Pricing/V1/Voice/CountryOptions.cs index 951abbdc7..7687165c9 100644 --- a/src/Twilio/Rest/Pricing/V1/Voice/CountryOptions.cs +++ b/src/Twilio/Rest/Pricing/V1/Voice/CountryOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Pricing/V1/Voice/CountryResource.cs b/src/Twilio/Rest/Pricing/V1/Voice/CountryResource.cs index c18a635bb..bf7718feb 100644 --- a/src/Twilio/Rest/Pricing/V1/Voice/CountryResource.cs +++ b/src/Twilio/Rest/Pricing/V1/Voice/CountryResource.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; @@ -234,6 +235,22 @@ public static CountryResource 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 name of the country. diff --git a/src/Twilio/Rest/Pricing/V1/Voice/NumberOptions.cs b/src/Twilio/Rest/Pricing/V1/Voice/NumberOptions.cs index 214b9f614..1071c9ed6 100644 --- a/src/Twilio/Rest/Pricing/V1/Voice/NumberOptions.cs +++ b/src/Twilio/Rest/Pricing/V1/Voice/NumberOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Pricing/V1/Voice/NumberResource.cs b/src/Twilio/Rest/Pricing/V1/Voice/NumberResource.cs index 15d1497aa..8bcfc8ad1 100644 --- a/src/Twilio/Rest/Pricing/V1/Voice/NumberResource.cs +++ b/src/Twilio/Rest/Pricing/V1/Voice/NumberResource.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 NumberResource 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 phone number. diff --git a/src/Twilio/Rest/Pricing/V2/CountryOptions.cs b/src/Twilio/Rest/Pricing/V2/CountryOptions.cs index 921d7af86..e86a92ee6 100644 --- a/src/Twilio/Rest/Pricing/V2/CountryOptions.cs +++ b/src/Twilio/Rest/Pricing/V2/CountryOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Pricing/V2/CountryResource.cs b/src/Twilio/Rest/Pricing/V2/CountryResource.cs index 1dcb9e2c3..537d5c65a 100644 --- a/src/Twilio/Rest/Pricing/V2/CountryResource.cs +++ b/src/Twilio/Rest/Pricing/V2/CountryResource.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; @@ -234,6 +235,22 @@ public static CountryResource 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 name of the country. diff --git a/src/Twilio/Rest/Pricing/V2/NumberOptions.cs b/src/Twilio/Rest/Pricing/V2/NumberOptions.cs index e12ce1b37..c81990f25 100644 --- a/src/Twilio/Rest/Pricing/V2/NumberOptions.cs +++ b/src/Twilio/Rest/Pricing/V2/NumberOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Pricing/V2/NumberResource.cs b/src/Twilio/Rest/Pricing/V2/NumberResource.cs index 1333230ed..67d4f0d03 100644 --- a/src/Twilio/Rest/Pricing/V2/NumberResource.cs +++ b/src/Twilio/Rest/Pricing/V2/NumberResource.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; @@ -117,6 +118,22 @@ public static NumberResource 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 destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. diff --git a/src/Twilio/Rest/Pricing/V2/Voice/CountryOptions.cs b/src/Twilio/Rest/Pricing/V2/Voice/CountryOptions.cs index 6e989b86c..9f9293f5d 100644 --- a/src/Twilio/Rest/Pricing/V2/Voice/CountryOptions.cs +++ b/src/Twilio/Rest/Pricing/V2/Voice/CountryOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Pricing/V2/Voice/CountryResource.cs b/src/Twilio/Rest/Pricing/V2/Voice/CountryResource.cs index ef1f11c2a..cf3b3f56f 100644 --- a/src/Twilio/Rest/Pricing/V2/Voice/CountryResource.cs +++ b/src/Twilio/Rest/Pricing/V2/Voice/CountryResource.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; @@ -234,6 +235,22 @@ public static CountryResource 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 name of the country. diff --git a/src/Twilio/Rest/Pricing/V2/Voice/NumberOptions.cs b/src/Twilio/Rest/Pricing/V2/Voice/NumberOptions.cs index cfcfd5a47..02a705832 100644 --- a/src/Twilio/Rest/Pricing/V2/Voice/NumberOptions.cs +++ b/src/Twilio/Rest/Pricing/V2/Voice/NumberOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Pricing/V2/Voice/NumberResource.cs b/src/Twilio/Rest/Pricing/V2/Voice/NumberResource.cs index a8fd4de9d..2e0a523c8 100644 --- a/src/Twilio/Rest/Pricing/V2/Voice/NumberResource.cs +++ b/src/Twilio/Rest/Pricing/V2/Voice/NumberResource.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; @@ -117,6 +118,22 @@ public static NumberResource 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 destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. diff --git a/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.cs b/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.cs index ba2799617..31a73d449 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -100,6 +101,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() return p; } + } @@ -167,6 +170,7 @@ public List> GetParams() } return p; } + } @@ -207,6 +211,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberResource.cs b/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberResource.cs index 1cc1caeb1..3d137f28b 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberResource.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberResource.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 PhoneNumberResource 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 PhoneNumber resource. diff --git a/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionOptions.cs b/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionOptions.cs index f90bd2c09..e88b5975a 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionOptions.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionResource.cs b/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionResource.cs index 73f057ad6..8b1172c25 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionResource.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionResource.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; @@ -378,6 +379,22 @@ public static InteractionResource 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 Interaction resource. diff --git a/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.cs b/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.cs index 67c20df1b..a3d8a6c7d 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.cs @@ -72,6 +72,7 @@ public List> GetParams() } return p; } + } @@ -114,6 +115,7 @@ public List> GetParams() return p; } + } @@ -157,6 +159,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionResource.cs b/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionResource.cs index 096878ad0..12f931c87 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionResource.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionResource.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; @@ -401,6 +402,22 @@ public static MessageInteractionResource 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 MessageInteraction resource. diff --git a/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.cs b/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.cs index 97c109a3c..d202e12c2 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.cs @@ -82,6 +82,7 @@ public List> GetParams() } return p; } + } @@ -119,6 +120,7 @@ public List> GetParams() return p; } + } @@ -158,6 +160,7 @@ public List> GetParams() return p; } + } @@ -196,6 +199,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantResource.cs b/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantResource.cs index 029716943..5b50d2b70 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantResource.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/Session/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; @@ -422,6 +423,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 unique string that we created to identify the Participant resource. diff --git a/src/Twilio/Rest/Proxy/V1/Service/SessionOptions.cs b/src/Twilio/Rest/Proxy/V1/Service/SessionOptions.cs index cc8b47bc6..f8c2ab1d7 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/SessionOptions.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/SessionOptions.cs @@ -90,6 +90,7 @@ public List> GetParams() } return p; } + } @@ -122,6 +123,7 @@ public List> GetParams() return p; } + } @@ -156,6 +158,7 @@ public List> GetParams() return p; } + } @@ -189,6 +192,7 @@ public List> GetParams() } return p; } + } @@ -243,6 +247,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Proxy/V1/Service/SessionResource.cs b/src/Twilio/Rest/Proxy/V1/Service/SessionResource.cs index bedb8a814..df689f796 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/SessionResource.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/SessionResource.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; @@ -525,6 +526,22 @@ public static SessionResource 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 Session resource. diff --git a/src/Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.cs b/src/Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.cs index 6c9eb86ce..29176342c 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } @@ -195,6 +199,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Proxy/V1/Service/ShortCodeResource.cs b/src/Twilio/Rest/Proxy/V1/Service/ShortCodeResource.cs index 44eb83a18..c2b873bf6 100644 --- a/src/Twilio/Rest/Proxy/V1/Service/ShortCodeResource.cs +++ b/src/Twilio/Rest/Proxy/V1/Service/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; @@ -467,6 +468,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 unique string that we created to identify the ShortCode resource. diff --git a/src/Twilio/Rest/Proxy/V1/ServiceOptions.cs b/src/Twilio/Rest/Proxy/V1/ServiceOptions.cs index 802f19186..ba376a83f 100644 --- a/src/Twilio/Rest/Proxy/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/Proxy/V1/ServiceOptions.cs @@ -46,7 +46,7 @@ public class CreateServiceOptions : IOptions /// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. public Uri InterceptCallbackUrl { get; set; } - /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. + /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. public Uri OutOfSessionCallbackUrl { get; set; } /// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. @@ -100,6 +100,7 @@ public List> GetParams() } return p; } + } @@ -127,6 +128,7 @@ public List> GetParams() return p; } + } @@ -156,6 +158,7 @@ public List> GetParams() return p; } + } @@ -180,6 +183,7 @@ public List> GetParams() } return p; } + } @@ -209,7 +213,7 @@ public class UpdateServiceOptions : IOptions /// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. public Uri InterceptCallbackUrl { get; set; } - /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. + /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. public Uri OutOfSessionCallbackUrl { get; set; } /// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. @@ -264,6 +268,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Proxy/V1/ServiceResource.cs b/src/Twilio/Rest/Proxy/V1/ServiceResource.cs index 0566d7a16..68fbdaf85 100644 --- a/src/Twilio/Rest/Proxy/V1/ServiceResource.cs +++ b/src/Twilio/Rest/Proxy/V1/ServiceResource.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; @@ -108,7 +109,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre /// /// /// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. - /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. + /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. /// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. /// Client to make requests to Twilio /// A single instance of Service @@ -135,7 +136,7 @@ public static ServiceResource Create( /// /// /// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. - /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. + /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. /// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. /// Client to make requests to Twilio /// Task that resolves to A single instance of Service @@ -458,7 +459,7 @@ public static async System.Threading.Tasks.Task UpdateAsync(Upd /// /// /// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. - /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. + /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. /// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. /// Client to make requests to Twilio /// A single instance of Service @@ -487,7 +488,7 @@ public static ServiceResource Update( /// /// /// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. - /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. + /// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. /// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship. /// Client to make requests to Twilio /// Task that resolves to A single instance of Service @@ -524,6 +525,22 @@ public static ServiceResource 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 Service resource. @@ -562,7 +579,7 @@ public static ServiceResource FromJson(string json) [JsonProperty("intercept_callback_url")] public Uri InterceptCallbackUrl { get; private set; } - /// The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. + /// The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information. [JsonProperty("out_of_session_callback_url")] public Uri OutOfSessionCallbackUrl { get; private set; } diff --git a/src/Twilio/Rest/Routes/V2/PhoneNumberOptions.cs b/src/Twilio/Rest/Routes/V2/PhoneNumberOptions.cs index 4590b8482..c4715e087 100644 --- a/src/Twilio/Rest/Routes/V2/PhoneNumberOptions.cs +++ b/src/Twilio/Rest/Routes/V2/PhoneNumberOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -90,6 +91,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Routes/V2/PhoneNumberResource.cs b/src/Twilio/Rest/Routes/V2/PhoneNumberResource.cs index 868ecf525..70dca8491 100644 --- a/src/Twilio/Rest/Routes/V2/PhoneNumberResource.cs +++ b/src/Twilio/Rest/Routes/V2/PhoneNumberResource.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; @@ -190,6 +191,22 @@ public static PhoneNumberResource 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 phone number in E.164 format diff --git a/src/Twilio/Rest/Routes/V2/SipDomainOptions.cs b/src/Twilio/Rest/Routes/V2/SipDomainOptions.cs index b738e25e0..20bd6c5b9 100644 --- a/src/Twilio/Rest/Routes/V2/SipDomainOptions.cs +++ b/src/Twilio/Rest/Routes/V2/SipDomainOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -90,6 +91,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Routes/V2/SipDomainResource.cs b/src/Twilio/Rest/Routes/V2/SipDomainResource.cs index 303c7b851..b82c591ad 100644 --- a/src/Twilio/Rest/Routes/V2/SipDomainResource.cs +++ b/src/Twilio/Rest/Routes/V2/SipDomainResource.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; @@ -190,6 +191,22 @@ public static SipDomainResource 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 sip_domain diff --git a/src/Twilio/Rest/Routes/V2/TrunkOptions.cs b/src/Twilio/Rest/Routes/V2/TrunkOptions.cs index f9a94310a..7875cd5f3 100644 --- a/src/Twilio/Rest/Routes/V2/TrunkOptions.cs +++ b/src/Twilio/Rest/Routes/V2/TrunkOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -90,6 +91,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Routes/V2/TrunkResource.cs b/src/Twilio/Rest/Routes/V2/TrunkResource.cs index 66074faa0..ace05158d 100644 --- a/src/Twilio/Rest/Routes/V2/TrunkResource.cs +++ b/src/Twilio/Rest/Routes/V2/TrunkResource.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; @@ -190,6 +191,22 @@ public static TrunkResource 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 absolute URL of the SIP Trunk diff --git a/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionOptions.cs index 507849d55..2cbda67fe 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionResource.cs b/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionResource.cs index 297f8f114..6bf49a91c 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionResource.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; @@ -270,6 +271,22 @@ public static AssetVersionResource 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 Asset Version resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/AssetOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/AssetOptions.cs index 26a3d0d73..36634504a 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/AssetOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/AssetOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } @@ -197,6 +201,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/AssetResource.cs b/src/Twilio/Rest/Serverless/V1/Service/AssetResource.cs index 9021edd00..74413bd9c 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/AssetResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/AssetResource.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 AssetResource 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 Asset resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusOptions.cs index 49fb65cbc..628a22a83 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusResource.cs b/src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusResource.cs index a06f5774e..f42dc8c85 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Build/BuildStatusResource.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; @@ -133,6 +134,22 @@ public static BuildStatusResource 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 Build resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/BuildOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/BuildOptions.cs index 303cffaa9..9130256b2 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/BuildOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/BuildOptions.cs @@ -77,6 +77,7 @@ public List> GetParams() } return p; } + } @@ -109,6 +110,7 @@ public List> GetParams() return p; } + } @@ -143,6 +145,7 @@ public List> GetParams() return p; } + } @@ -176,6 +179,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/BuildResource.cs b/src/Twilio/Rest/Serverless/V1/Service/BuildResource.cs index 3142ca682..73ce3afe5 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/BuildResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/BuildResource.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; @@ -431,6 +432,22 @@ public static BuildResource 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 Build resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentOptions.cs index 6ad486092..4b95b9064 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentOptions.cs @@ -59,6 +59,7 @@ public List> GetParams() } return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentResource.cs b/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentResource.cs index 01d7a1719..53a3d205b 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentResource.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; @@ -334,6 +335,22 @@ public static DeploymentResource 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 Deployment resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.cs index e38c85548..56f1b5775 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -116,6 +117,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/Environment/LogResource.cs b/src/Twilio/Rest/Serverless/V1/Service/Environment/LogResource.cs index 5fad473fd..411ab5322 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Environment/LogResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Environment/LogResource.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; @@ -282,6 +283,22 @@ public static LogResource 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 Log resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableOptions.cs index f64015a01..b81db6510 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableOptions.cs @@ -70,6 +70,7 @@ public List> GetParams() } return p; } + } @@ -107,6 +108,7 @@ public List> GetParams() return p; } + } @@ -146,6 +148,7 @@ public List> GetParams() return p; } + } @@ -184,6 +187,7 @@ public List> GetParams() } return p; } + } @@ -236,6 +240,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableResource.cs b/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableResource.cs index 50346cd02..bf295bca7 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableResource.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; @@ -502,6 +503,22 @@ public static VariableResource 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 Variable resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.cs index fd5bb1f4f..6c8007c04 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.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; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/EnvironmentResource.cs b/src/Twilio/Rest/Serverless/V1/Service/EnvironmentResource.cs index ac9715ab4..b344f1ace 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/EnvironmentResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/EnvironmentResource.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; @@ -393,6 +394,22 @@ public static EnvironmentResource 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 Environment resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContentOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContentOptions.cs index e59275485..3ff9f4213 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContentOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContentOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContentResource.cs b/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContentResource.cs index 4308646fe..9a1973ce6 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContentResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContentResource.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; @@ -124,6 +125,22 @@ public static FunctionVersionContentResource 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 Function Version resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersionOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersionOptions.cs index 3db0ea443..e0e73d4f0 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersionOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersionResource.cs b/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersionResource.cs index f208cf049..74796c2da 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersionResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/Function/FunctionVersionResource.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; @@ -270,6 +271,22 @@ public static FunctionVersionResource 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 Function Version resource. diff --git a/src/Twilio/Rest/Serverless/V1/Service/FunctionOptions.cs b/src/Twilio/Rest/Serverless/V1/Service/FunctionOptions.cs index 9f0281111..5fb758340 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/FunctionOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/FunctionOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } @@ -197,6 +201,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/Service/FunctionResource.cs b/src/Twilio/Rest/Serverless/V1/Service/FunctionResource.cs index 6a17ee4e5..dc06bfd56 100644 --- a/src/Twilio/Rest/Serverless/V1/Service/FunctionResource.cs +++ b/src/Twilio/Rest/Serverless/V1/Service/FunctionResource.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 FunctionResource 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 Function resource. diff --git a/src/Twilio/Rest/Serverless/V1/ServiceOptions.cs b/src/Twilio/Rest/Serverless/V1/ServiceOptions.cs index 9bc7f71c5..13c6e0732 100644 --- a/src/Twilio/Rest/Serverless/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/Serverless/V1/ServiceOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -101,6 +102,7 @@ public List> GetParams() return p; } + } @@ -130,6 +132,7 @@ public List> GetParams() return p; } + } @@ -154,6 +157,7 @@ public List> GetParams() } return p; } + } @@ -203,6 +207,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Serverless/V1/ServiceResource.cs b/src/Twilio/Rest/Serverless/V1/ServiceResource.cs index 68a82b462..58c7d62c0 100644 --- a/src/Twilio/Rest/Serverless/V1/ServiceResource.cs +++ b/src/Twilio/Rest/Serverless/V1/ServiceResource.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; @@ -460,6 +461,22 @@ public static ServiceResource 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 Service resource. diff --git a/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextOptions.cs b/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextOptions.cs index 997b9e3da..d6127fd49 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextOptions.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextResource.cs b/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextResource.cs index 4bb41d5af..8025973f7 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextResource.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextResource.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 EngagementContextResource 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. diff --git a/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextOptions.cs b/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextOptions.cs index 565298b1b..6bcf57515 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextOptions.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextResource.cs b/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextResource.cs index 9dc20e183..be6aec223 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextResource.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextResource.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; @@ -124,6 +125,22 @@ public static StepContextResource 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 StepContext resource. diff --git a/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepOptions.cs b/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepOptions.cs index 69777eac9..81893a861 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepOptions.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepResource.cs b/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepResource.cs index addb6cabf..16396778d 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepResource.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepResource.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; @@ -256,6 +257,22 @@ public static StepResource 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 Step resource. diff --git a/src/Twilio/Rest/Studio/V1/Flow/EngagementOptions.cs b/src/Twilio/Rest/Studio/V1/Flow/EngagementOptions.cs index 0894e8013..dd0619ea3 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/EngagementOptions.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/EngagementOptions.cs @@ -72,6 +72,7 @@ public List> GetParams() } return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() return p; } + } @@ -138,6 +140,7 @@ public List> GetParams() return p; } + } @@ -171,6 +174,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/Flow/EngagementResource.cs b/src/Twilio/Rest/Studio/V1/Flow/EngagementResource.cs index 3347fc374..1930ab731 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/EngagementResource.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/EngagementResource.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 EngagementResource 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 Engagement resource. diff --git a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextOptions.cs b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextOptions.cs index a1c294507..319e0b119 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextOptions.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextResource.cs b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextResource.cs index 8e751cc12..d34857c1a 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextResource.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextResource.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 ExecutionContextResource 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 ExecutionContext resource. diff --git a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextOptions.cs b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextOptions.cs index f18610152..00accb38d 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextOptions.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextResource.cs b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextResource.cs index c33ea92d3..a668d29c4 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextResource.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextResource.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; @@ -124,6 +125,22 @@ public static ExecutionStepContextResource 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 ExecutionStepContext resource. diff --git a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepOptions.cs b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepOptions.cs index 16d640e0f..8993ae09c 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepOptions.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepResource.cs b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepResource.cs index 8ea8804ef..04937ff6b 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepResource.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepResource.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; @@ -256,6 +257,22 @@ public static ExecutionStepResource 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 ExecutionStep resource. diff --git a/src/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.cs b/src/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.cs index ad3734e7b..e7b0368ef 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.cs @@ -72,6 +72,7 @@ public List> GetParams() } return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() return p; } + } @@ -138,6 +140,7 @@ public List> GetParams() return p; } + } @@ -185,6 +188,7 @@ public List> GetParams() } return p; } + } @@ -227,6 +231,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/Flow/ExecutionResource.cs b/src/Twilio/Rest/Studio/V1/Flow/ExecutionResource.cs index 21cbdd051..9df613f75 100644 --- a/src/Twilio/Rest/Studio/V1/Flow/ExecutionResource.cs +++ b/src/Twilio/Rest/Studio/V1/Flow/ExecutionResource.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; @@ -496,6 +497,22 @@ public static ExecutionResource 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 Execution resource. diff --git a/src/Twilio/Rest/Studio/V1/FlowOptions.cs b/src/Twilio/Rest/Studio/V1/FlowOptions.cs index d64f25443..007464ade 100644 --- a/src/Twilio/Rest/Studio/V1/FlowOptions.cs +++ b/src/Twilio/Rest/Studio/V1/FlowOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -76,6 +77,7 @@ public List> GetParams() return p; } + } @@ -100,6 +102,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V1/FlowResource.cs b/src/Twilio/Rest/Studio/V1/FlowResource.cs index 38bc2f439..a83558e77 100644 --- a/src/Twilio/Rest/Studio/V1/FlowResource.cs +++ b/src/Twilio/Rest/Studio/V1/FlowResource.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; @@ -315,6 +316,22 @@ public static FlowResource 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 Flow resource. diff --git a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextOptions.cs b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextOptions.cs index 1e341a71b..ee8b2c4ea 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextOptions.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextResource.cs b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextResource.cs index 35079f97a..ffe24832a 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextResource.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContextResource.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 ExecutionContextResource 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 ExecutionContext resource. diff --git a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextOptions.cs b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextOptions.cs index 7674a3f9a..9c26184fd 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextOptions.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextResource.cs b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextResource.cs index bab774d1c..afcc26178 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextResource.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextResource.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; @@ -124,6 +125,22 @@ public static ExecutionStepContextResource 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 ExecutionStepContext resource. diff --git a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepOptions.cs b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepOptions.cs index d110593a8..c48882328 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepOptions.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepResource.cs b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepResource.cs index 69854c3de..a0539a26d 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepResource.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStepResource.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; @@ -256,6 +257,22 @@ public static ExecutionStepResource 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 ExecutionStep resource. diff --git a/src/Twilio/Rest/Studio/V2/Flow/ExecutionOptions.cs b/src/Twilio/Rest/Studio/V2/Flow/ExecutionOptions.cs index b5e74698f..11749292c 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/ExecutionOptions.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/ExecutionOptions.cs @@ -72,6 +72,7 @@ public List> GetParams() } return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() return p; } + } @@ -138,6 +140,7 @@ public List> GetParams() return p; } + } @@ -185,6 +188,7 @@ public List> GetParams() } return p; } + } @@ -227,6 +231,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V2/Flow/ExecutionResource.cs b/src/Twilio/Rest/Studio/V2/Flow/ExecutionResource.cs index 13129ac49..2cab4899f 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/ExecutionResource.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/ExecutionResource.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; @@ -496,6 +497,22 @@ public static ExecutionResource 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 Execution resource. diff --git a/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionOptions.cs b/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionOptions.cs index 031a82537..180496faa 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionOptions.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionResource.cs b/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionResource.cs index 6d88cc769..e95f16d52 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionResource.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionResource.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 FlowRevisionResource 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 Flow resource. diff --git a/src/Twilio/Rest/Studio/V2/Flow/FlowTestUserOptions.cs b/src/Twilio/Rest/Studio/V2/Flow/FlowTestUserOptions.cs index 2bd930188..479504381 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/FlowTestUserOptions.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/FlowTestUserOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -85,6 +86,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V2/Flow/FlowTestUserResource.cs b/src/Twilio/Rest/Studio/V2/Flow/FlowTestUserResource.cs index c787f4c09..8b4c7e29b 100644 --- a/src/Twilio/Rest/Studio/V2/Flow/FlowTestUserResource.cs +++ b/src/Twilio/Rest/Studio/V2/Flow/FlowTestUserResource.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 FlowTestUserResource 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); + } + } /// Unique identifier of the flow. diff --git a/src/Twilio/Rest/Studio/V2/FlowOptions.cs b/src/Twilio/Rest/Studio/V2/FlowOptions.cs index a6d020489..6a931bd08 100644 --- a/src/Twilio/Rest/Studio/V2/FlowOptions.cs +++ b/src/Twilio/Rest/Studio/V2/FlowOptions.cs @@ -76,6 +76,7 @@ public List> GetParams() } return p; } + } @@ -103,6 +104,7 @@ public List> GetParams() return p; } + } @@ -132,6 +134,7 @@ public List> GetParams() return p; } + } @@ -156,6 +159,7 @@ public List> GetParams() } return p; } + } @@ -214,6 +218,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V2/FlowResource.cs b/src/Twilio/Rest/Studio/V2/FlowResource.cs index 5746293a5..3fddfcc9f 100644 --- a/src/Twilio/Rest/Studio/V2/FlowResource.cs +++ b/src/Twilio/Rest/Studio/V2/FlowResource.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; @@ -477,6 +478,22 @@ public static FlowResource 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 Flow resource. diff --git a/src/Twilio/Rest/Studio/V2/FlowValidateOptions.cs b/src/Twilio/Rest/Studio/V2/FlowValidateOptions.cs index 1cee133df..98c53f97d 100644 --- a/src/Twilio/Rest/Studio/V2/FlowValidateOptions.cs +++ b/src/Twilio/Rest/Studio/V2/FlowValidateOptions.cs @@ -76,6 +76,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Studio/V2/FlowValidateResource.cs b/src/Twilio/Rest/Studio/V2/FlowValidateResource.cs index 83e9d2297..d10109d32 100644 --- a/src/Twilio/Rest/Studio/V2/FlowValidateResource.cs +++ b/src/Twilio/Rest/Studio/V2/FlowValidateResource.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; @@ -139,6 +140,22 @@ public static FlowValidateResource 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); + } + } /// Boolean if the flow definition is valid. diff --git a/src/Twilio/Rest/Supersim/V1/EsimProfileOptions.cs b/src/Twilio/Rest/Supersim/V1/EsimProfileOptions.cs index 54f9c5e3f..4e31ae22d 100644 --- a/src/Twilio/Rest/Supersim/V1/EsimProfileOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/EsimProfileOptions.cs @@ -66,6 +66,7 @@ public List> GetParams() } return p; } + } @@ -93,6 +94,7 @@ public List> GetParams() return p; } + } @@ -138,6 +140,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/EsimProfileResource.cs b/src/Twilio/Rest/Supersim/V1/EsimProfileResource.cs index 0596172cb..5bd956423 100644 --- a/src/Twilio/Rest/Supersim/V1/EsimProfileResource.cs +++ b/src/Twilio/Rest/Supersim/V1/EsimProfileResource.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; @@ -341,6 +342,22 @@ public static EsimProfileResource 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 eSIM Profile resource. diff --git a/src/Twilio/Rest/Supersim/V1/FleetOptions.cs b/src/Twilio/Rest/Supersim/V1/FleetOptions.cs index 2bb42e4af..5efb419a5 100644 --- a/src/Twilio/Rest/Supersim/V1/FleetOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/FleetOptions.cs @@ -107,6 +107,7 @@ public List> GetParams() } return p; } + } @@ -134,6 +135,7 @@ public List> GetParams() return p; } + } @@ -165,6 +167,7 @@ public List> GetParams() } return p; } + } @@ -242,6 +245,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/FleetResource.cs b/src/Twilio/Rest/Supersim/V1/FleetResource.cs index fe625af49..e59ca69b8 100644 --- a/src/Twilio/Rest/Supersim/V1/FleetResource.cs +++ b/src/Twilio/Rest/Supersim/V1/FleetResource.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; @@ -444,6 +445,22 @@ public static FleetResource 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 Fleet resource. diff --git a/src/Twilio/Rest/Supersim/V1/IpCommandOptions.cs b/src/Twilio/Rest/Supersim/V1/IpCommandOptions.cs index 28727f4a2..814c4b53c 100644 --- a/src/Twilio/Rest/Supersim/V1/IpCommandOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/IpCommandOptions.cs @@ -90,6 +90,7 @@ public List> GetParams() } return p; } + } @@ -117,6 +118,7 @@ public List> GetParams() return p; } + } @@ -169,6 +171,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/IpCommandResource.cs b/src/Twilio/Rest/Supersim/V1/IpCommandResource.cs index e5f2c48ab..15ec0684e 100644 --- a/src/Twilio/Rest/Supersim/V1/IpCommandResource.cs +++ b/src/Twilio/Rest/Supersim/V1/IpCommandResource.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; @@ -377,6 +378,22 @@ public static IpCommandResource 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 IP Command resource. diff --git a/src/Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkOptions.cs b/src/Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkOptions.cs index b6373639b..da0b8e5d9 100644 --- a/src/Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkResource.cs b/src/Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkResource.cs index 0f9c0dff2..3cf34d65c 100644 --- a/src/Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkResource.cs +++ b/src/Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetworkResource.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; @@ -389,6 +390,22 @@ public static NetworkAccessProfileNetworkResource 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 identifies the Network resource. diff --git a/src/Twilio/Rest/Supersim/V1/NetworkAccessProfileOptions.cs b/src/Twilio/Rest/Supersim/V1/NetworkAccessProfileOptions.cs index f067cf777..645e9019b 100644 --- a/src/Twilio/Rest/Supersim/V1/NetworkAccessProfileOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/NetworkAccessProfileOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() } return p; } + } @@ -79,6 +80,7 @@ public List> GetParams() return p; } + } @@ -103,6 +105,7 @@ public List> GetParams() } return p; } + } @@ -138,6 +141,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/NetworkAccessProfileResource.cs b/src/Twilio/Rest/Supersim/V1/NetworkAccessProfileResource.cs index 74984ea73..961e06a01 100644 --- a/src/Twilio/Rest/Supersim/V1/NetworkAccessProfileResource.cs +++ b/src/Twilio/Rest/Supersim/V1/NetworkAccessProfileResource.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; @@ -376,6 +377,22 @@ public static NetworkAccessProfileResource 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 identifies the Network Access Profile resource. diff --git a/src/Twilio/Rest/Supersim/V1/NetworkOptions.cs b/src/Twilio/Rest/Supersim/V1/NetworkOptions.cs index c428c7f73..a3fa1900e 100644 --- a/src/Twilio/Rest/Supersim/V1/NetworkOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/NetworkOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -92,6 +93,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/NetworkResource.cs b/src/Twilio/Rest/Supersim/V1/NetworkResource.cs index 852eb0051..a5ee178ab 100644 --- a/src/Twilio/Rest/Supersim/V1/NetworkResource.cs +++ b/src/Twilio/Rest/Supersim/V1/NetworkResource.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; @@ -246,6 +247,22 @@ public static NetworkResource 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 Network resource. diff --git a/src/Twilio/Rest/Supersim/V1/SettingsUpdateOptions.cs b/src/Twilio/Rest/Supersim/V1/SettingsUpdateOptions.cs index 95426b7c6..7c0e6331e 100644 --- a/src/Twilio/Rest/Supersim/V1/SettingsUpdateOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/SettingsUpdateOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/SettingsUpdateResource.cs b/src/Twilio/Rest/Supersim/V1/SettingsUpdateResource.cs index 44935d3a0..9bb7190c2 100644 --- a/src/Twilio/Rest/Supersim/V1/SettingsUpdateResource.cs +++ b/src/Twilio/Rest/Supersim/V1/SettingsUpdateResource.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; @@ -192,6 +193,22 @@ public static SettingsUpdateResource 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 identifier of this Settings Update. diff --git a/src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodOptions.cs b/src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodOptions.cs index 6ea939fea..6595ba6f7 100644 --- a/src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodResource.cs b/src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodResource.cs index a1068ac01..595582399 100644 --- a/src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodResource.cs +++ b/src/Twilio/Rest/Supersim/V1/Sim/BillingPeriodResource.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; @@ -188,6 +189,22 @@ public static BillingPeriodResource 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 Billing Period. diff --git a/src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressOptions.cs b/src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressOptions.cs index 922318530..0144da75b 100644 --- a/src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressResource.cs b/src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressResource.cs index 85ecb2bb6..2655a24d2 100644 --- a/src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressResource.cs +++ b/src/Twilio/Rest/Supersim/V1/Sim/SimIpAddressResource.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; @@ -188,6 +189,22 @@ public static SimIpAddressResource 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); + } + } /// IP address assigned to the given Super SIM diff --git a/src/Twilio/Rest/Supersim/V1/SimOptions.cs b/src/Twilio/Rest/Supersim/V1/SimOptions.cs index 09bd12d54..53e8f42d9 100644 --- a/src/Twilio/Rest/Supersim/V1/SimOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/SimOptions.cs @@ -60,6 +60,7 @@ public List> GetParams() } return p; } + } @@ -87,6 +88,7 @@ public List> GetParams() return p; } + } @@ -132,6 +134,7 @@ public List> GetParams() } return p; } + } @@ -202,6 +205,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/SimResource.cs b/src/Twilio/Rest/Supersim/V1/SimResource.cs index c18f4b6f2..5438eb587 100644 --- a/src/Twilio/Rest/Supersim/V1/SimResource.cs +++ b/src/Twilio/Rest/Supersim/V1/SimResource.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; @@ -437,6 +438,22 @@ public static SimResource 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 identifies the Sim resource. diff --git a/src/Twilio/Rest/Supersim/V1/SmsCommandOptions.cs b/src/Twilio/Rest/Supersim/V1/SmsCommandOptions.cs index 83ff10aad..a8327d040 100644 --- a/src/Twilio/Rest/Supersim/V1/SmsCommandOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/SmsCommandOptions.cs @@ -74,6 +74,7 @@ public List> GetParams() } return p; } + } @@ -101,6 +102,7 @@ public List> GetParams() return p; } + } @@ -146,6 +148,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/SmsCommandResource.cs b/src/Twilio/Rest/Supersim/V1/SmsCommandResource.cs index 2193d9538..f24a35ed3 100644 --- a/src/Twilio/Rest/Supersim/V1/SmsCommandResource.cs +++ b/src/Twilio/Rest/Supersim/V1/SmsCommandResource.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; @@ -353,6 +354,22 @@ public static SmsCommandResource 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 SMS Command resource. diff --git a/src/Twilio/Rest/Supersim/V1/UsageRecordOptions.cs b/src/Twilio/Rest/Supersim/V1/UsageRecordOptions.cs index 84414449a..85c5cb376 100644 --- a/src/Twilio/Rest/Supersim/V1/UsageRecordOptions.cs +++ b/src/Twilio/Rest/Supersim/V1/UsageRecordOptions.cs @@ -98,6 +98,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Supersim/V1/UsageRecordResource.cs b/src/Twilio/Rest/Supersim/V1/UsageRecordResource.cs index 984c79c64..4f1a1f527 100644 --- a/src/Twilio/Rest/Supersim/V1/UsageRecordResource.cs +++ b/src/Twilio/Rest/Supersim/V1/UsageRecordResource.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; @@ -228,6 +229,22 @@ public static UsageRecordResource 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 incurred the usage. diff --git a/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionOptions.cs b/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionOptions.cs index 96887e440..89b98867e 100644 --- a/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -199,6 +202,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionResource.cs b/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionResource.cs index 5e6791db2..ec6cb1c81 100644 --- a/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionResource.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; @@ -424,6 +425,22 @@ public static DocumentPermissionResource 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 Document Permission resource. diff --git a/src/Twilio/Rest/Sync/V1/Service/DocumentOptions.cs b/src/Twilio/Rest/Sync/V1/Service/DocumentOptions.cs index 4a779ed61..668ae9351 100644 --- a/src/Twilio/Rest/Sync/V1/Service/DocumentOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/DocumentOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -100,6 +101,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() return p; } + } @@ -167,6 +170,7 @@ public List> GetParams() } return p; } + } @@ -217,6 +221,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Sync/V1/Service/DocumentResource.cs b/src/Twilio/Rest/Sync/V1/Service/DocumentResource.cs index 55112242e..74b6a71ea 100644 --- a/src/Twilio/Rest/Sync/V1/Service/DocumentResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/DocumentResource.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; @@ -483,6 +484,22 @@ public static DocumentResource 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 Document resource. diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.cs index b5f6201de..4d7b1753c 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.cs @@ -82,6 +82,7 @@ public List> GetParams() } return p; } + } @@ -122,6 +123,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -171,6 +173,7 @@ public List> GetParams() return p; } + } @@ -230,6 +233,7 @@ public List> GetParams() } return p; } + } @@ -299,6 +303,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemResource.cs index ab29c4479..6e555ae03 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemResource.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; @@ -560,6 +561,22 @@ public static SyncListItemResource 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 automatically generated index of the List Item. The `index` values of the List Items in a Sync List can have gaps in their sequence. diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionOptions.cs index bc77b7808..b39d1420b 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -199,6 +202,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionResource.cs index b6340b380..961086143 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionResource.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; @@ -424,6 +425,22 @@ public static SyncListPermissionResource 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 Sync List Permission resource. diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.cs index 5a4c7b4ea..29499f505 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -100,6 +101,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() return p; } + } @@ -167,6 +170,7 @@ public List> GetParams() } return p; } + } @@ -214,6 +218,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncListResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncListResource.cs index bd13e5b3a..3d6396db1 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncListResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncListResource.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; @@ -479,6 +480,22 @@ public static SyncListResource 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 Sync List resource. diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.cs index 169992bc3..7df248b18 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.cs @@ -91,6 +91,7 @@ public List> GetParams() } return p; } + } @@ -131,6 +132,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -180,6 +182,7 @@ public List> GetParams() return p; } + } @@ -239,6 +242,7 @@ public List> GetParams() } return p; } + } @@ -308,6 +312,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemResource.cs index 275354d2a..5fbaba68b 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemResource.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; @@ -564,6 +565,22 @@ public static SyncMapItemResource 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, user-defined key for the Map Item. diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionOptions.cs index 2dc5e75a3..b75de01b1 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -199,6 +202,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionResource.cs index e67c16f65..68b3c74b4 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionResource.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; @@ -424,6 +425,22 @@ public static SyncMapPermissionResource 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 Sync Map Permission resource. diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncMapOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncMapOptions.cs index 70ba00c77..900ebf60e 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncMapOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncMapOptions.cs @@ -68,6 +68,7 @@ public List> GetParams() } return p; } + } @@ -100,6 +101,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() return p; } + } @@ -167,6 +170,7 @@ public List> GetParams() } return p; } + } @@ -214,6 +218,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncMapResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncMapResource.cs index 274a5139e..c60d4cc10 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncMapResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncMapResource.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; @@ -479,6 +480,22 @@ public static SyncMapResource 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 Sync Map resource. diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageOptions.cs index b1926681a..ebc42fb34 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageOptions.cs @@ -61,6 +61,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageResource.cs index ded3a064c..eca879627 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageResource.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; @@ -127,6 +128,22 @@ public static StreamMessageResource 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 Stream Message resource. diff --git a/src/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.cs b/src/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.cs index 39e71e831..a179b93b1 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.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/Sync/V1/Service/SyncStreamResource.cs b/src/Twilio/Rest/Sync/V1/Service/SyncStreamResource.cs index e1f018306..52339e0c1 100644 --- a/src/Twilio/Rest/Sync/V1/Service/SyncStreamResource.cs +++ b/src/Twilio/Rest/Sync/V1/Service/SyncStreamResource.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; @@ -471,6 +472,22 @@ public static SyncStreamResource 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 Sync Stream resource. diff --git a/src/Twilio/Rest/Sync/V1/ServiceOptions.cs b/src/Twilio/Rest/Sync/V1/ServiceOptions.cs index 934e154ad..de42177df 100644 --- a/src/Twilio/Rest/Sync/V1/ServiceOptions.cs +++ b/src/Twilio/Rest/Sync/V1/ServiceOptions.cs @@ -87,6 +87,7 @@ public List> GetParams() } return p; } + } @@ -114,6 +115,7 @@ public List> GetParams() return p; } + } @@ -143,6 +145,7 @@ public List> GetParams() return p; } + } @@ -167,6 +170,7 @@ public List> GetParams() } return p; } + } @@ -244,6 +248,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Sync/V1/ServiceResource.cs b/src/Twilio/Rest/Sync/V1/ServiceResource.cs index 8ec278e69..1739bf259 100644 --- a/src/Twilio/Rest/Sync/V1/ServiceResource.cs +++ b/src/Twilio/Rest/Sync/V1/ServiceResource.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; @@ -488,6 +489,22 @@ public static ServiceResource 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 Service resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.cs index 1d8d3eefd..f8d7d00df 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.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; } + } @@ -176,6 +179,7 @@ public List> GetParams() } return p; } + } @@ -216,6 +220,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityResource.cs index 2a2b4a2fe..aa8497d94 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityResource.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; @@ -479,6 +480,22 @@ public static ActivityResource 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 Activity resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.cs index 5c62e7106..0b447d20c 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -162,6 +163,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/EventResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/EventResource.cs index f05885c84..a7e966cba 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/EventResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/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; @@ -289,6 +290,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); + } + } /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Event resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.cs index 9845b0c10..6e55ec273 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -109,6 +110,7 @@ public List> GetParams() } return p; } + } @@ -524,6 +526,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationResource.cs index d5d77349e..cd1610b26 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationResource.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; @@ -623,6 +624,22 @@ public static ReservationResource 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 TaskReservation resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.cs index 4f836e82b..c4b9b19f2 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.cs @@ -72,6 +72,7 @@ public List> GetParams() } return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() return p; } + } @@ -138,6 +140,7 @@ public List> GetParams() return p; } + } @@ -171,6 +174,7 @@ public List> GetParams() } return p; } + } @@ -218,6 +222,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelResource.cs index aa7eafee7..d0f4374d1 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelResource.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; @@ -479,6 +480,22 @@ public static TaskChannelResource 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 Task Channel resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.cs index 6f0c1b0a1..958ffc3dc 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.cs @@ -82,6 +82,7 @@ public List> GetParams() } return p; } + } @@ -117,6 +118,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -161,6 +163,7 @@ public List> GetParams() return p; } + } @@ -258,6 +261,7 @@ public List> GetParams() } return p; } + } @@ -329,6 +333,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.cs index 79a212cc5..9acd9eba5 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.cs @@ -87,6 +87,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsResource.cs index 38ba2c2a2..e5d2adc4a 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsResource.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; @@ -134,6 +135,22 @@ public static TaskQueueCumulativeStatisticsResource 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 TaskQueue resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.cs index 601534528..7ec7d3324 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.cs @@ -59,6 +59,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsResource.cs index 0068219bf..fdc2a591a 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsResource.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; @@ -122,6 +123,22 @@ public static TaskQueueRealTimeStatisticsResource 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 TaskQueue resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.cs index b53aa3d13..1dbacc3b6 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.cs @@ -87,6 +87,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsResource.cs index c4c03185b..a61e64b6a 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsResource.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; @@ -134,6 +135,22 @@ public static TaskQueueStatisticsResource 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 TaskQueue resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.cs index 16cd705b2..1f98e7e49 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsResource.cs index 82e7c6379..997372c41 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsResource.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; @@ -199,6 +200,22 @@ public static TaskQueuesStatisticsResource 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 TaskQueue resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.cs index 200456cae..1f05c249c 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.cs @@ -91,6 +91,7 @@ public List> GetParams() } return p; } + } @@ -123,6 +124,7 @@ public List> GetParams() return p; } + } @@ -157,6 +159,7 @@ public List> GetParams() return p; } + } @@ -218,6 +221,7 @@ public List> GetParams() } return p; } + } @@ -293,6 +297,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueResource.cs index 7d6523f36..71d7e6534 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueResource.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; @@ -536,6 +537,22 @@ public static TaskQueueResource 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 TaskQueue resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskResource.cs index 698bcb07e..c1a4cfb13 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskResource.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; @@ -558,6 +559,22 @@ public static TaskResource 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 Task resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.cs index 08b92c553..fcf5f6707 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -102,6 +103,7 @@ public List> GetParams() } return p; } + } @@ -503,6 +505,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationResource.cs index bfc78479a..c80a8e327 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationResource.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; @@ -598,6 +599,22 @@ public static ReservationResource 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 WorkerReservation resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.cs index 0eb1bae35..82c9442e3 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } @@ -147,6 +149,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelResource.cs index c1b5ebc71..d7280bb78 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelResource.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 WorkerChannelResource 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 Worker resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.cs index f1daf63ba..f833c716d 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.cs @@ -80,6 +80,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsResource.cs index decb9ef43..7f1407f9c 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsResource.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 WorkerStatisticsResource 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 Worker resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.cs index 8e22d65e8..0aec3d05f 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.cs @@ -75,6 +75,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsResource.cs index 6e3d7765c..00c53d849 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsResource.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; @@ -126,6 +127,22 @@ public static WorkersCumulativeStatisticsResource 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 Worker resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.cs index 7ecdec100..06349807a 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsResource.cs index d792a8f93..8ef9c90e4 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsResource.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; @@ -117,6 +118,22 @@ public static WorkersRealTimeStatisticsResource 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 Worker resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.cs index ab1beb08c..4d1056280 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.cs @@ -96,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsResource.cs index 6af7161c6..ca5a12e4a 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsResource.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; @@ -135,6 +136,22 @@ public static WorkersStatisticsResource 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); + } + } /// An object that contains the real-time statistics for the Worker. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.cs index b46aad044..2566cec27 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.cs @@ -70,6 +70,7 @@ public List> GetParams() } return p; } + } @@ -105,6 +106,7 @@ public List> GetParams() return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -238,6 +241,7 @@ public List> GetParams() } return p; } + } @@ -302,6 +306,7 @@ public List> GetParams() } return p; } + /// Generate the necessary header parameters public List> GetHeaderParams() diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerResource.cs index 7a5253386..093a4b173 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerResource.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; @@ -525,6 +526,22 @@ public static WorkerResource 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 Worker resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.cs index 85c545f12..19620dda1 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.cs @@ -87,6 +87,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsResource.cs index 53d2c400c..f0936f855 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsResource.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; @@ -134,6 +135,22 @@ public static WorkflowCumulativeStatisticsResource 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 Workflow resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.cs index aa69e7d04..386091832 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.cs @@ -59,6 +59,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsResource.cs index 5789c8183..3eb1c59f2 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsResource.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; @@ -122,6 +123,22 @@ public static WorkflowRealTimeStatisticsResource 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 Workflow resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.cs index 1a3030a16..328058e37 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.cs @@ -87,6 +87,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsResource.cs index 8ca80ab13..8ec3bf89f 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsResource.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; @@ -134,6 +135,22 @@ public static WorkflowStatisticsResource 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 Workflow resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.cs index 2ffb0573a..b4bc60899 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.cs @@ -86,6 +86,7 @@ public List> GetParams() } return p; } + } @@ -118,6 +119,7 @@ public List> GetParams() return p; } + } @@ -152,6 +154,7 @@ public List> GetParams() return p; } + } @@ -192,6 +195,7 @@ public List> GetParams() } return p; } + } @@ -267,6 +271,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowResource.cs index 0268427c2..a2744c58a 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowResource.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; @@ -507,6 +508,22 @@ public static WorkflowResource 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 Workflow resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.cs index cc2902904..053be34d4 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.cs @@ -82,6 +82,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsResource.cs index 0daedfcc4..6ad8e8ae4 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsResource.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; @@ -129,6 +130,22 @@ public static WorkspaceCumulativeStatisticsResource 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 Workspace resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.cs index 6a07a703b..247d60835 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.cs @@ -54,6 +54,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsResource.cs index cf1ce3908..9a26b9220 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsResource.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; @@ -117,6 +118,22 @@ public static WorkspaceRealTimeStatisticsResource 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 Workspace resource. diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.cs index 77bd7d253..78fd725ff 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.cs @@ -82,6 +82,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsResource.cs b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsResource.cs index dfd79ade0..633f9cf83 100644 --- a/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsResource.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; @@ -129,6 +130,22 @@ public static WorkspaceStatisticsResource 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); + } + } /// An object that contains the real-time statistics for the Workspace. diff --git a/src/Twilio/Rest/Taskrouter/V1/WorkspaceOptions.cs b/src/Twilio/Rest/Taskrouter/V1/WorkspaceOptions.cs index b9dbad150..9584a9eaf 100644 --- a/src/Twilio/Rest/Taskrouter/V1/WorkspaceOptions.cs +++ b/src/Twilio/Rest/Taskrouter/V1/WorkspaceOptions.cs @@ -86,6 +86,7 @@ public List> GetParams() } return p; } + } @@ -113,6 +114,7 @@ public List> GetParams() return p; } + } @@ -142,6 +144,7 @@ public List> GetParams() return p; } + } @@ -173,6 +176,7 @@ public List> GetParams() } return p; } + } @@ -250,6 +254,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Taskrouter/V1/WorkspaceResource.cs b/src/Twilio/Rest/Taskrouter/V1/WorkspaceResource.cs index 7be9a5215..c62e44804 100644 --- a/src/Twilio/Rest/Taskrouter/V1/WorkspaceResource.cs +++ b/src/Twilio/Rest/Taskrouter/V1/WorkspaceResource.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; @@ -501,6 +502,22 @@ public static WorkspaceResource 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 Workspace resource. diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListOptions.cs b/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListOptions.cs index 7c66a24ce..3d259fd8a 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListOptions.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListResource.cs b/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListResource.cs index 55df21b4f..fe1cd075b 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListResource.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/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; @@ -389,6 +390,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 SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialList resource. diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListOptions.cs b/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListOptions.cs index b4891e81e..d39901835 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListOptions.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListResource.cs b/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListResource.cs index a189a381e..814e42611 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListResource.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/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; @@ -389,6 +390,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); + } + } /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlList resource. diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.cs b/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.cs index ff2c20369..1389bcf53 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.cs @@ -92,6 +92,7 @@ public List> GetParams() } return p; } + } @@ -124,6 +125,7 @@ public List> GetParams() return p; } + } @@ -158,6 +160,7 @@ public List> GetParams() return p; } + } @@ -191,6 +194,7 @@ public List> GetParams() } return p; } + } @@ -259,6 +263,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlResource.cs b/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlResource.cs index 3d829da52..24e0c16df 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlResource.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlResource.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; @@ -499,6 +500,22 @@ public static OriginationUrlResource 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 OriginationUrl resource. diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberOptions.cs b/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberOptions.cs index 4c8f07074..4285526c9 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberOptions.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberResource.cs b/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberResource.cs index f69482869..1e92a6ff9 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberResource.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberResource.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 PhoneNumberResource 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 PhoneNumber resource. diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/RecordingOptions.cs b/src/Twilio/Rest/Trunking/V1/Trunk/RecordingOptions.cs index b0072f70c..da8c8f322 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/RecordingOptions.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/RecordingOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -90,6 +91,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trunking/V1/Trunk/RecordingResource.cs b/src/Twilio/Rest/Trunking/V1/Trunk/RecordingResource.cs index 235cd1d2b..586fe5116 100644 --- a/src/Twilio/Rest/Trunking/V1/Trunk/RecordingResource.cs +++ b/src/Twilio/Rest/Trunking/V1/Trunk/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; @@ -219,6 +220,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); + } + } diff --git a/src/Twilio/Rest/Trunking/V1/TrunkOptions.cs b/src/Twilio/Rest/Trunking/V1/TrunkOptions.cs index 906ff362b..9d3691528 100644 --- a/src/Twilio/Rest/Trunking/V1/TrunkOptions.cs +++ b/src/Twilio/Rest/Trunking/V1/TrunkOptions.cs @@ -94,6 +94,7 @@ public List> GetParams() } return p; } + } @@ -121,6 +122,7 @@ public List> GetParams() return p; } + } @@ -150,6 +152,7 @@ public List> GetParams() return p; } + } @@ -174,6 +177,7 @@ public List> GetParams() } return p; } + } @@ -258,6 +262,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trunking/V1/TrunkResource.cs b/src/Twilio/Rest/Trunking/V1/TrunkResource.cs index bdf68be32..e42f7f1c0 100644 --- a/src/Twilio/Rest/Trunking/V1/TrunkResource.cs +++ b/src/Twilio/Rest/Trunking/V1/TrunkResource.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; @@ -523,6 +524,22 @@ public static TrunkResource 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 Trunk resource. diff --git a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentOptions.cs b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentOptions.cs index 53159deec..cc4a820a1 100644 --- a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentOptions.cs @@ -65,6 +65,7 @@ public List> GetParams() } return p; } + } @@ -97,6 +98,7 @@ public List> GetParams() return p; } + } @@ -131,6 +133,7 @@ public List> GetParams() return p; } + } @@ -178,6 +181,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentResource.cs b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentResource.cs index b4b96eea2..585183a0a 100644 --- a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesChannelEndpointAssignmentResource.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; @@ -401,6 +402,22 @@ public static CustomerProfilesChannelEndpointAssignmentResource FromJson(string 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 Item Assignment resource. diff --git a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsOptions.cs b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsOptions.cs index dbd2ef393..3793a7dbf 100644 --- a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsResource.cs b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsResource.cs index 6e61ca736..4658bd9bb 100644 --- a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignmentsResource.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; @@ -389,6 +390,22 @@ public static CustomerProfilesEntityAssignmentsResource 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 Item Assignment resource. diff --git a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsOptions.cs b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsOptions.cs index 08be22f64..bb413378e 100644 --- a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -121,6 +123,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsResource.cs b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsResource.cs index 1690bb01d..bccffba57 100644 --- a/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEvaluationsResource.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; @@ -330,6 +331,22 @@ public static CustomerProfilesEvaluationsResource 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 identifies the Evaluation resource. diff --git a/src/Twilio/Rest/Trusthub/V1/CustomerProfilesOptions.cs b/src/Twilio/Rest/Trusthub/V1/CustomerProfilesOptions.cs index da3f4b75d..0f580431d 100644 --- a/src/Twilio/Rest/Trusthub/V1/CustomerProfilesOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/CustomerProfilesOptions.cs @@ -76,6 +76,7 @@ public List> GetParams() } return p; } + } @@ -103,6 +104,7 @@ public List> GetParams() return p; } + } @@ -132,6 +134,7 @@ public List> GetParams() return p; } + } @@ -177,6 +180,7 @@ public List> GetParams() } return p; } + } @@ -233,6 +237,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/CustomerProfilesResource.cs b/src/Twilio/Rest/Trusthub/V1/CustomerProfilesResource.cs index 104e748ec..80b0f44d1 100644 --- a/src/Twilio/Rest/Trusthub/V1/CustomerProfilesResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/CustomerProfilesResource.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; @@ -492,6 +493,22 @@ public static CustomerProfilesResource 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 Customer-Profile resource. diff --git a/src/Twilio/Rest/Trusthub/V1/EndUserOptions.cs b/src/Twilio/Rest/Trusthub/V1/EndUserOptions.cs index 604cd9de5..8019b349f 100644 --- a/src/Twilio/Rest/Trusthub/V1/EndUserOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/EndUserOptions.cs @@ -67,6 +67,7 @@ public List> GetParams() } return p; } + } @@ -94,6 +95,7 @@ public List> GetParams() return p; } + } @@ -123,6 +125,7 @@ public List> GetParams() return p; } + } @@ -147,6 +150,7 @@ public List> GetParams() } return p; } + } @@ -189,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/EndUserResource.cs b/src/Twilio/Rest/Trusthub/V1/EndUserResource.cs index adcb144f3..e54a602b4 100644 --- a/src/Twilio/Rest/Trusthub/V1/EndUserResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/EndUserResource.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; @@ -452,6 +453,22 @@ public static EndUserResource 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 created by Twilio to identify the End User resource. diff --git a/src/Twilio/Rest/Trusthub/V1/EndUserTypeOptions.cs b/src/Twilio/Rest/Trusthub/V1/EndUserTypeOptions.cs index 1aa9a3b41..e05e1b94a 100644 --- a/src/Twilio/Rest/Trusthub/V1/EndUserTypeOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/EndUserTypeOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/EndUserTypeResource.cs b/src/Twilio/Rest/Trusthub/V1/EndUserTypeResource.cs index bc972b693..202c90a9f 100644 --- a/src/Twilio/Rest/Trusthub/V1/EndUserTypeResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/EndUserTypeResource.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; @@ -234,6 +235,22 @@ public static EndUserTypeResource 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 identifies the End-User Type resource. diff --git a/src/Twilio/Rest/Trusthub/V1/PoliciesOptions.cs b/src/Twilio/Rest/Trusthub/V1/PoliciesOptions.cs index 236adaac0..0a2c9dc49 100644 --- a/src/Twilio/Rest/Trusthub/V1/PoliciesOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/PoliciesOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/PoliciesResource.cs b/src/Twilio/Rest/Trusthub/V1/PoliciesResource.cs index 6ee6401b0..d32937ef9 100644 --- a/src/Twilio/Rest/Trusthub/V1/PoliciesResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/PoliciesResource.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; @@ -234,6 +235,22 @@ public static PoliciesResource 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 identifies the Policy resource. diff --git a/src/Twilio/Rest/Trusthub/V1/SupportingDocumentOptions.cs b/src/Twilio/Rest/Trusthub/V1/SupportingDocumentOptions.cs index fcc0e3008..dc952b976 100644 --- a/src/Twilio/Rest/Trusthub/V1/SupportingDocumentOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/SupportingDocumentOptions.cs @@ -67,6 +67,7 @@ public List> GetParams() } return p; } + } @@ -94,6 +95,7 @@ public List> GetParams() return p; } + } @@ -123,6 +125,7 @@ public List> GetParams() return p; } + } @@ -147,6 +150,7 @@ public List> GetParams() } return p; } + } @@ -189,6 +193,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/SupportingDocumentResource.cs b/src/Twilio/Rest/Trusthub/V1/SupportingDocumentResource.cs index a43bfea7e..66b373675 100644 --- a/src/Twilio/Rest/Trusthub/V1/SupportingDocumentResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/SupportingDocumentResource.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; @@ -469,6 +470,22 @@ public static SupportingDocumentResource 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 created by Twilio to identify the Supporting Document resource. diff --git a/src/Twilio/Rest/Trusthub/V1/SupportingDocumentTypeOptions.cs b/src/Twilio/Rest/Trusthub/V1/SupportingDocumentTypeOptions.cs index b51068a33..a05fc9129 100644 --- a/src/Twilio/Rest/Trusthub/V1/SupportingDocumentTypeOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/SupportingDocumentTypeOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -71,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/SupportingDocumentTypeResource.cs b/src/Twilio/Rest/Trusthub/V1/SupportingDocumentTypeResource.cs index e100f10f2..2a6d65246 100644 --- a/src/Twilio/Rest/Trusthub/V1/SupportingDocumentTypeResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/SupportingDocumentTypeResource.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; @@ -234,6 +235,22 @@ public static SupportingDocumentTypeResource 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 identifies the Supporting Document Type resource. diff --git a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentOptions.cs b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentOptions.cs index 37f1749b4..f4b725e75 100644 --- a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentOptions.cs @@ -65,6 +65,7 @@ public List> GetParams() } return p; } + } @@ -97,6 +98,7 @@ public List> GetParams() return p; } + } @@ -131,6 +133,7 @@ public List> GetParams() return p; } + } @@ -178,6 +181,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentResource.cs b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentResource.cs index 955422231..d6ecfc356 100644 --- a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsChannelEndpointAssignmentResource.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; @@ -401,6 +402,22 @@ public static TrustProductsChannelEndpointAssignmentResource 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 unique string that we created to identify the Item Assignment resource. diff --git a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsOptions.cs b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsOptions.cs index 176dea8a4..4454d8e50 100644 --- a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsResource.cs b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsResource.cs index 3b79d962d..d15701fc5 100644 --- a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEntityAssignmentsResource.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; @@ -389,6 +390,22 @@ public static TrustProductsEntityAssignmentsResource 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 Item Assignment resource. diff --git a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsOptions.cs b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsOptions.cs index ed99a8dcb..8c96b3779 100644 --- a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -121,6 +123,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsResource.cs b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsResource.cs index 3c9203c4b..8f0dabc43 100644 --- a/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/TrustProducts/TrustProductsEvaluationsResource.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; @@ -330,6 +331,22 @@ public static TrustProductsEvaluationsResource 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 identifies the Evaluation resource. diff --git a/src/Twilio/Rest/Trusthub/V1/TrustProductsOptions.cs b/src/Twilio/Rest/Trusthub/V1/TrustProductsOptions.cs index 76d228042..f837925e8 100644 --- a/src/Twilio/Rest/Trusthub/V1/TrustProductsOptions.cs +++ b/src/Twilio/Rest/Trusthub/V1/TrustProductsOptions.cs @@ -76,6 +76,7 @@ public List> GetParams() } return p; } + } @@ -103,6 +104,7 @@ public List> GetParams() return p; } + } @@ -132,6 +134,7 @@ public List> GetParams() return p; } + } @@ -177,6 +180,7 @@ public List> GetParams() } return p; } + } @@ -233,6 +237,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Trusthub/V1/TrustProductsResource.cs b/src/Twilio/Rest/Trusthub/V1/TrustProductsResource.cs index 3ef12e1ac..57a4ade68 100644 --- a/src/Twilio/Rest/Trusthub/V1/TrustProductsResource.cs +++ b/src/Twilio/Rest/Trusthub/V1/TrustProductsResource.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; @@ -492,6 +493,22 @@ public static TrustProductsResource 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 Customer-Profile resource. diff --git a/src/Twilio/Rest/Verify/V2/FormOptions.cs b/src/Twilio/Rest/Verify/V2/FormOptions.cs index 2e86a88dc..54bcc900d 100644 --- a/src/Twilio/Rest/Verify/V2/FormOptions.cs +++ b/src/Twilio/Rest/Verify/V2/FormOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/FormResource.cs b/src/Twilio/Rest/Verify/V2/FormResource.cs index 6b00f74cb..b3457a28a 100644 --- a/src/Twilio/Rest/Verify/V2/FormResource.cs +++ b/src/Twilio/Rest/Verify/V2/FormResource.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; @@ -126,6 +127,22 @@ public static FormResource 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); + } + } diff --git a/src/Twilio/Rest/Verify/V2/SafelistOptions.cs b/src/Twilio/Rest/Verify/V2/SafelistOptions.cs index 87c5cffdf..041414aaa 100644 --- a/src/Twilio/Rest/Verify/V2/SafelistOptions.cs +++ b/src/Twilio/Rest/Verify/V2/SafelistOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } @@ -78,6 +79,7 @@ public List> GetParams() return p; } + } @@ -107,6 +109,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/SafelistResource.cs b/src/Twilio/Rest/Verify/V2/SafelistResource.cs index 8605275c9..5878686e8 100644 --- a/src/Twilio/Rest/Verify/V2/SafelistResource.cs +++ b/src/Twilio/Rest/Verify/V2/SafelistResource.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; @@ -248,6 +249,22 @@ public static SafelistResource 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 SafeList resource. diff --git a/src/Twilio/Rest/Verify/V2/Service/AccessTokenOptions.cs b/src/Twilio/Rest/Verify/V2/Service/AccessTokenOptions.cs index 813bfbed0..0645265a0 100644 --- a/src/Twilio/Rest/Verify/V2/Service/AccessTokenOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/AccessTokenOptions.cs @@ -79,6 +79,7 @@ public List> GetParams() } return p; } + } @@ -111,6 +112,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/AccessTokenResource.cs b/src/Twilio/Rest/Verify/V2/Service/AccessTokenResource.cs index de818f303..1c8da1dec 100644 --- a/src/Twilio/Rest/Verify/V2/Service/AccessTokenResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/AccessTokenResource.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; @@ -215,6 +216,22 @@ public static AccessTokenResource 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 Access Token. diff --git a/src/Twilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationOptions.cs b/src/Twilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationOptions.cs index 72f1ed074..c2da21081 100644 --- a/src/Twilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationOptions.cs @@ -64,6 +64,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationResource.cs b/src/Twilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationResource.cs index 69abbadf0..02651d6b0 100644 --- a/src/Twilio/Rest/Verify/V2/Service/Entity/Challenge/NotificationResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/Entity/Challenge/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; @@ -133,6 +134,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); + } + } /// A 34 character string that uniquely identifies this Notification. diff --git a/src/Twilio/Rest/Verify/V2/Service/Entity/ChallengeOptions.cs b/src/Twilio/Rest/Verify/V2/Service/Entity/ChallengeOptions.cs index 184278cf2..2536b4034 100644 --- a/src/Twilio/Rest/Verify/V2/Service/Entity/ChallengeOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/Entity/ChallengeOptions.cs @@ -97,6 +97,7 @@ public List> GetParams() } return p; } + } @@ -134,6 +135,7 @@ public List> GetParams() return p; } + } @@ -193,6 +195,7 @@ public List> GetParams() } return p; } + } @@ -245,6 +248,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/Entity/ChallengeResource.cs b/src/Twilio/Rest/Verify/V2/Service/Entity/ChallengeResource.cs index 66c98b8a8..98aaeefd4 100644 --- a/src/Twilio/Rest/Verify/V2/Service/Entity/ChallengeResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/Entity/ChallengeResource.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; @@ -508,6 +509,22 @@ public static ChallengeResource 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 Challenge. diff --git a/src/Twilio/Rest/Verify/V2/Service/Entity/FactorOptions.cs b/src/Twilio/Rest/Verify/V2/Service/Entity/FactorOptions.cs index 8128a1e03..ffa3508d8 100644 --- a/src/Twilio/Rest/Verify/V2/Service/Entity/FactorOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/Entity/FactorOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -96,6 +97,7 @@ public List> GetParams() return p; } + } @@ -134,6 +136,7 @@ public List> GetParams() } return p; } + } @@ -235,6 +238,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/Entity/FactorResource.cs b/src/Twilio/Rest/Verify/V2/Service/Entity/FactorResource.cs index 9d40bc119..50bb6d48b 100644 --- a/src/Twilio/Rest/Verify/V2/Service/Entity/FactorResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/Entity/FactorResource.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 FactorResource 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 Factor. diff --git a/src/Twilio/Rest/Verify/V2/Service/Entity/NewFactorOptions.cs b/src/Twilio/Rest/Verify/V2/Service/Entity/NewFactorOptions.cs index 0ad8a332a..548786ac3 100644 --- a/src/Twilio/Rest/Verify/V2/Service/Entity/NewFactorOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/Entity/NewFactorOptions.cs @@ -154,6 +154,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/Entity/NewFactorResource.cs b/src/Twilio/Rest/Verify/V2/Service/Entity/NewFactorResource.cs index 6cdb6d579..3e328aec2 100644 --- a/src/Twilio/Rest/Verify/V2/Service/Entity/NewFactorResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/Entity/NewFactorResource.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; @@ -231,6 +232,22 @@ public static NewFactorResource 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 Factor. diff --git a/src/Twilio/Rest/Verify/V2/Service/EntityOptions.cs b/src/Twilio/Rest/Verify/V2/Service/EntityOptions.cs index 8dd71dfc6..6e266fa14 100644 --- a/src/Twilio/Rest/Verify/V2/Service/EntityOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/EntityOptions.cs @@ -56,6 +56,7 @@ public List> GetParams() } return p; } + } @@ -88,6 +89,7 @@ public List> GetParams() return p; } + } @@ -122,6 +124,7 @@ public List> GetParams() return p; } + } @@ -155,6 +158,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/EntityResource.cs b/src/Twilio/Rest/Verify/V2/Service/EntityResource.cs index 64a248183..d4dedf072 100644 --- a/src/Twilio/Rest/Verify/V2/Service/EntityResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/EntityResource.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; @@ -389,6 +390,22 @@ public static EntityResource 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 Entity. diff --git a/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationOptions.cs b/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationOptions.cs index 446f2e957..ccb1f8cf7 100644 --- a/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationOptions.cs @@ -34,14 +34,14 @@ public class CreateMessagingConfigurationOptions : IOptions The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. public string Country { get; } - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. public string MessagingServiceSid { get; } /// Construct a new CreateMessagingConfigurationOptions /// The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. /// The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. public CreateMessagingConfigurationOptions(string pathServiceSid, string country, string messagingServiceSid) { PathServiceSid = pathServiceSid; @@ -65,6 +65,7 @@ public List> GetParams() } return p; } + } @@ -97,6 +98,7 @@ public List> GetParams() return p; } + } @@ -131,6 +133,7 @@ public List> GetParams() return p; } + } @@ -164,6 +167,7 @@ public List> GetParams() } return p; } + } @@ -178,7 +182,7 @@ public class UpdateMessagingConfigurationOptions : IOptions The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. public string PathCountry { get; } - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. public string MessagingServiceSid { get; } @@ -186,7 +190,7 @@ public class UpdateMessagingConfigurationOptions : IOptions Construct a new UpdateMessagingConfigurationOptions /// The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. /// The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. public UpdateMessagingConfigurationOptions(string pathServiceSid, string pathCountry, string messagingServiceSid) { PathServiceSid = pathServiceSid; @@ -206,6 +210,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationResource.cs b/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationResource.cs index 263829aa9..2d91c9d1b 100644 --- a/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationResource.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; @@ -78,7 +79,7 @@ public static async System.Threading.Tasks.Task /// Create a new MessagingConfiguration for a service. /// The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. /// The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. /// Client to make requests to Twilio /// A single instance of MessagingConfiguration public static MessagingConfigurationResource Create( @@ -95,7 +96,7 @@ public static MessagingConfigurationResource Create( /// Create a new MessagingConfiguration for a service. /// The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. /// The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. /// Client to make requests to Twilio /// Task that resolves to A single instance of MessagingConfiguration public static async System.Threading.Tasks.Task CreateAsync( @@ -424,7 +425,7 @@ public static async System.Threading.Tasks.Task /// Update a specific MessagingConfiguration /// The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. /// The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. /// Client to make requests to Twilio /// A single instance of MessagingConfiguration public static MessagingConfigurationResource Update( @@ -441,7 +442,7 @@ public static MessagingConfigurationResource Update( /// Update a specific MessagingConfiguration /// The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. /// The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. /// Client to make requests to Twilio /// Task that resolves to A single instance of MessagingConfiguration public static async System.Threading.Tasks.Task UpdateAsync( @@ -471,6 +472,22 @@ public static MessagingConfigurationResource 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 Service resource. @@ -485,7 +502,7 @@ public static MessagingConfigurationResource FromJson(string json) [JsonProperty("country")] public string Country { get; private set; } - /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) to be used to send SMS to the country of this configuration. + /// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration. [JsonProperty("messaging_service_sid")] public string MessagingServiceSid { get; private set; } diff --git a/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.cs b/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.cs index 5f10a5830..c5e076bc4 100644 --- a/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.cs @@ -70,6 +70,7 @@ public List> GetParams() } return p; } + } @@ -107,6 +108,7 @@ public List> GetParams() return p; } + } @@ -146,6 +148,7 @@ public List> GetParams() return p; } + } @@ -184,6 +187,7 @@ public List> GetParams() } return p; } + } @@ -236,6 +240,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketResource.cs b/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketResource.cs index 27951ba6e..d46c46d1a 100644 --- a/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketResource.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; @@ -502,6 +503,22 @@ public static BucketResource 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 Bucket. diff --git a/src/Twilio/Rest/Verify/V2/Service/RateLimitOptions.cs b/src/Twilio/Rest/Verify/V2/Service/RateLimitOptions.cs index a3c5ad498..c9afed8a4 100644 --- a/src/Twilio/Rest/Verify/V2/Service/RateLimitOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/RateLimitOptions.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; } + } @@ -202,6 +206,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/RateLimitResource.cs b/src/Twilio/Rest/Verify/V2/Service/RateLimitResource.cs index f376ab362..8b5223f8a 100644 --- a/src/Twilio/Rest/Verify/V2/Service/RateLimitResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/RateLimitResource.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; @@ -471,6 +472,22 @@ public static RateLimitResource 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 Rate Limit. diff --git a/src/Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.cs b/src/Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.cs index f3dfa5c07..ded5ab57b 100644 --- a/src/Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.cs @@ -82,6 +82,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/VerificationCheckResource.cs b/src/Twilio/Rest/Verify/V2/Service/VerificationCheckResource.cs index 9943a226c..fe32b5296 100644 --- a/src/Twilio/Rest/Verify/V2/Service/VerificationCheckResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/VerificationCheckResource.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; @@ -153,6 +154,22 @@ public static VerificationCheckResource 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 VerificationCheck resource. diff --git a/src/Twilio/Rest/Verify/V2/Service/VerificationOptions.cs b/src/Twilio/Rest/Verify/V2/Service/VerificationOptions.cs index aefe8aa6c..e4c9d3eeb 100644 --- a/src/Twilio/Rest/Verify/V2/Service/VerificationOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/VerificationOptions.cs @@ -163,6 +163,7 @@ public List> GetParams() } return p; } + } @@ -195,6 +196,7 @@ public List> GetParams() return p; } + } @@ -238,6 +240,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/VerificationResource.cs b/src/Twilio/Rest/Verify/V2/Service/VerificationResource.cs index 2b3d4fd02..411ea6900 100644 --- a/src/Twilio/Rest/Verify/V2/Service/VerificationResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/VerificationResource.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; @@ -369,6 +370,22 @@ public static VerificationResource 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 Verification resource. diff --git a/src/Twilio/Rest/Verify/V2/Service/WebhookOptions.cs b/src/Twilio/Rest/Verify/V2/Service/WebhookOptions.cs index a9f18c380..c3a823450 100644 --- a/src/Twilio/Rest/Verify/V2/Service/WebhookOptions.cs +++ b/src/Twilio/Rest/Verify/V2/Service/WebhookOptions.cs @@ -88,6 +88,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -154,6 +156,7 @@ public List> GetParams() return p; } + } @@ -187,6 +190,7 @@ public List> GetParams() } return p; } + } @@ -256,6 +260,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/Service/WebhookResource.cs b/src/Twilio/Rest/Verify/V2/Service/WebhookResource.cs index 54c19554d..1b8ad9577 100644 --- a/src/Twilio/Rest/Verify/V2/Service/WebhookResource.cs +++ b/src/Twilio/Rest/Verify/V2/Service/WebhookResource.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; @@ -538,6 +539,22 @@ public static WebhookResource 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 Webhook resource. diff --git a/src/Twilio/Rest/Verify/V2/ServiceOptions.cs b/src/Twilio/Rest/Verify/V2/ServiceOptions.cs index 206ecb4dd..6c28e8f1d 100644 --- a/src/Twilio/Rest/Verify/V2/ServiceOptions.cs +++ b/src/Twilio/Rest/Verify/V2/ServiceOptions.cs @@ -163,6 +163,7 @@ public List> GetParams() } return p; } + } @@ -190,6 +191,7 @@ public List> GetParams() return p; } + } @@ -219,6 +221,7 @@ public List> GetParams() return p; } + } @@ -243,6 +246,7 @@ public List> GetParams() } return p; } + } @@ -390,6 +394,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/ServiceResource.cs b/src/Twilio/Rest/Verify/V2/ServiceResource.cs index 74f328036..3b2a704d1 100644 --- a/src/Twilio/Rest/Verify/V2/ServiceResource.cs +++ b/src/Twilio/Rest/Verify/V2/ServiceResource.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; @@ -568,6 +569,22 @@ public static ServiceResource 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 Service resource. diff --git a/src/Twilio/Rest/Verify/V2/TemplateOptions.cs b/src/Twilio/Rest/Verify/V2/TemplateOptions.cs index fdae48877..b0d3322ab 100644 --- a/src/Twilio/Rest/Verify/V2/TemplateOptions.cs +++ b/src/Twilio/Rest/Verify/V2/TemplateOptions.cs @@ -49,6 +49,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/TemplateResource.cs b/src/Twilio/Rest/Verify/V2/TemplateResource.cs index b34581d65..f637e7cd7 100644 --- a/src/Twilio/Rest/Verify/V2/TemplateResource.cs +++ b/src/Twilio/Rest/Verify/V2/TemplateResource.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; @@ -173,6 +174,22 @@ public static TemplateResource 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 a Verification Template. diff --git a/src/Twilio/Rest/Verify/V2/VerificationAttemptOptions.cs b/src/Twilio/Rest/Verify/V2/VerificationAttemptOptions.cs index b573ee03f..b33f36879 100644 --- a/src/Twilio/Rest/Verify/V2/VerificationAttemptOptions.cs +++ b/src/Twilio/Rest/Verify/V2/VerificationAttemptOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -127,6 +128,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/VerificationAttemptResource.cs b/src/Twilio/Rest/Verify/V2/VerificationAttemptResource.cs index 85cbcf5c8..5ef2295da 100644 --- a/src/Twilio/Rest/Verify/V2/VerificationAttemptResource.cs +++ b/src/Twilio/Rest/Verify/V2/VerificationAttemptResource.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 VerificationAttemptResource 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 that uniquely identifies the verification attempt resource. diff --git a/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.cs b/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.cs index 9ab74101a..19c6dbdf8 100644 --- a/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.cs +++ b/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryOptions.cs @@ -80,6 +80,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryResource.cs b/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryResource.cs index 7ba829bae..6cabd7a67 100644 --- a/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryResource.cs +++ b/src/Twilio/Rest/Verify/V2/VerificationAttemptsSummaryResource.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 VerificationAttemptsSummaryResource 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); + } + } /// Total of attempts made according to the provided filters diff --git a/src/Twilio/Rest/Video/V1/CompositionHookOptions.cs b/src/Twilio/Rest/Video/V1/CompositionHookOptions.cs index a3bb11aac..ad1b2689e 100644 --- a/src/Twilio/Rest/Video/V1/CompositionHookOptions.cs +++ b/src/Twilio/Rest/Video/V1/CompositionHookOptions.cs @@ -116,6 +116,7 @@ public List> GetParams() } return p; } + } @@ -143,6 +144,7 @@ public List> GetParams() return p; } + } @@ -172,6 +174,7 @@ public List> GetParams() return p; } + } @@ -224,6 +227,7 @@ public List> GetParams() } return p; } + } @@ -326,6 +330,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/CompositionHookResource.cs b/src/Twilio/Rest/Video/V1/CompositionHookResource.cs index 6c4211d88..c10651b61 100644 --- a/src/Twilio/Rest/Video/V1/CompositionHookResource.cs +++ b/src/Twilio/Rest/Video/V1/CompositionHookResource.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; @@ -541,6 +542,22 @@ public static CompositionHookResource 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 CompositionHook resource. diff --git a/src/Twilio/Rest/Video/V1/CompositionOptions.cs b/src/Twilio/Rest/Video/V1/CompositionOptions.cs index b25bbc7a5..b2fede259 100644 --- a/src/Twilio/Rest/Video/V1/CompositionOptions.cs +++ b/src/Twilio/Rest/Video/V1/CompositionOptions.cs @@ -109,6 +109,7 @@ public List> GetParams() } return p; } + } @@ -136,6 +137,7 @@ public List> GetParams() return p; } + } @@ -165,6 +167,7 @@ public List> GetParams() return p; } + } @@ -217,6 +220,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/CompositionResource.cs b/src/Twilio/Rest/Video/V1/CompositionResource.cs index fd89e24c6..94ae10295 100644 --- a/src/Twilio/Rest/Video/V1/CompositionResource.cs +++ b/src/Twilio/Rest/Video/V1/CompositionResource.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; @@ -445,6 +446,22 @@ public static CompositionResource 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 Composition resource. diff --git a/src/Twilio/Rest/Video/V1/CompositionSettingsOptions.cs b/src/Twilio/Rest/Video/V1/CompositionSettingsOptions.cs index 162d8a77a..091aa8188 100644 --- a/src/Twilio/Rest/Video/V1/CompositionSettingsOptions.cs +++ b/src/Twilio/Rest/Video/V1/CompositionSettingsOptions.cs @@ -86,6 +86,7 @@ public List> GetParams() } return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Video/V1/CompositionSettingsResource.cs b/src/Twilio/Rest/Video/V1/CompositionSettingsResource.cs index f1e72ee04..c653df604 100644 --- a/src/Twilio/Rest/Video/V1/CompositionSettingsResource.cs +++ b/src/Twilio/Rest/Video/V1/CompositionSettingsResource.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; @@ -195,6 +196,22 @@ public static CompositionSettingsResource 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 CompositionSettings resource. diff --git a/src/Twilio/Rest/Video/V1/RecordingOptions.cs b/src/Twilio/Rest/Video/V1/RecordingOptions.cs index de3378f47..2250180e8 100644 --- a/src/Twilio/Rest/Video/V1/RecordingOptions.cs +++ b/src/Twilio/Rest/Video/V1/RecordingOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -76,6 +77,7 @@ public List> GetParams() return p; } + } @@ -142,6 +144,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/RecordingResource.cs b/src/Twilio/Rest/Video/V1/RecordingResource.cs index f96bb98e9..71997f234 100644 --- a/src/Twilio/Rest/Video/V1/RecordingResource.cs +++ b/src/Twilio/Rest/Video/V1/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; @@ -383,6 +384,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/Video/V1/RecordingSettingsOptions.cs b/src/Twilio/Rest/Video/V1/RecordingSettingsOptions.cs index 871da57bc..0fbf98298 100644 --- a/src/Twilio/Rest/Video/V1/RecordingSettingsOptions.cs +++ b/src/Twilio/Rest/Video/V1/RecordingSettingsOptions.cs @@ -86,6 +86,7 @@ public List> GetParams() } return p; } + } @@ -104,6 +105,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Video/V1/RecordingSettingsResource.cs b/src/Twilio/Rest/Video/V1/RecordingSettingsResource.cs index aba5ddb78..03807a4de 100644 --- a/src/Twilio/Rest/Video/V1/RecordingSettingsResource.cs +++ b/src/Twilio/Rest/Video/V1/RecordingSettingsResource.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; @@ -195,6 +196,22 @@ public static RecordingSettingsResource 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 RecordingSettings resource. diff --git a/src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeOptions.cs b/src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeOptions.cs index db4e7c972..1913acfad 100644 --- a/src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeOptions.cs +++ b/src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeResource.cs b/src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeResource.cs index c7f442398..eaffe1989 100644 --- a/src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeResource.cs +++ b/src/Twilio/Rest/Video/V1/Room/Participant/AnonymizeResource.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; @@ -136,6 +137,22 @@ public static AnonymizeResource 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 RoomParticipant resource. diff --git a/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackOptions.cs b/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackOptions.cs index a6f8686e8..e46d0ea09 100644 --- a/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackOptions.cs +++ b/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackResource.cs b/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackResource.cs index a6c442000..4a1c8082a 100644 --- a/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackResource.cs +++ b/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackResource.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; @@ -270,6 +271,22 @@ public static PublishedTrackResource 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 RoomParticipantPublishedTrack resource. diff --git a/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.cs b/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.cs index 3500a362e..0f71469d2 100644 --- a/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.cs +++ b/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -93,6 +94,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesResource.cs b/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesResource.cs index f36f709f6..d78dfd9db 100644 --- a/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesResource.cs +++ b/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesResource.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; @@ -197,6 +198,22 @@ public static SubscribeRulesResource 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 Participant resource for the Subscribe Rules. diff --git a/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackOptions.cs b/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackOptions.cs index 7eeb5ac9e..0f3676efc 100644 --- a/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackOptions.cs +++ b/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackOptions.cs @@ -57,6 +57,7 @@ public List> GetParams() return p; } + } @@ -95,6 +96,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackResource.cs b/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackResource.cs index 5c021690a..2199a04cb 100644 --- a/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackResource.cs +++ b/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackResource.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; @@ -270,6 +271,22 @@ public static SubscribedTrackResource 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 RoomParticipantSubscribedTrack resource. diff --git a/src/Twilio/Rest/Video/V1/Room/ParticipantOptions.cs b/src/Twilio/Rest/Video/V1/Room/ParticipantOptions.cs index 1b93399b1..d318f5863 100644 --- a/src/Twilio/Rest/Video/V1/Room/ParticipantOptions.cs +++ b/src/Twilio/Rest/Video/V1/Room/ParticipantOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -113,6 +114,7 @@ public List> GetParams() } return p; } + } @@ -153,6 +155,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/Room/ParticipantResource.cs b/src/Twilio/Rest/Video/V1/Room/ParticipantResource.cs index 7b2d7a646..03bd6cd91 100644 --- a/src/Twilio/Rest/Video/V1/Room/ParticipantResource.cs +++ b/src/Twilio/Rest/Video/V1/Room/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; @@ -352,6 +353,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 unique string that we created to identify the RoomParticipant resource. diff --git a/src/Twilio/Rest/Video/V1/Room/RecordingRulesOptions.cs b/src/Twilio/Rest/Video/V1/Room/RecordingRulesOptions.cs index b021b4b65..d7c4b2b15 100644 --- a/src/Twilio/Rest/Video/V1/Room/RecordingRulesOptions.cs +++ b/src/Twilio/Rest/Video/V1/Room/RecordingRulesOptions.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/Video/V1/Room/RecordingRulesResource.cs b/src/Twilio/Rest/Video/V1/Room/RecordingRulesResource.cs index ac033a9fb..d61fd1743 100644 --- a/src/Twilio/Rest/Video/V1/Room/RecordingRulesResource.cs +++ b/src/Twilio/Rest/Video/V1/Room/RecordingRulesResource.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 RecordingRulesResource 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 Room resource for the Recording Rules diff --git a/src/Twilio/Rest/Video/V1/Room/RoomRecordingOptions.cs b/src/Twilio/Rest/Video/V1/Room/RoomRecordingOptions.cs index ddd527dd3..c8b2ddcb9 100644 --- a/src/Twilio/Rest/Video/V1/Room/RoomRecordingOptions.cs +++ b/src/Twilio/Rest/Video/V1/Room/RoomRecordingOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } @@ -86,6 +87,7 @@ public List> GetParams() return p; } + } @@ -147,6 +149,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/Room/RoomRecordingResource.cs b/src/Twilio/Rest/Video/V1/Room/RoomRecordingResource.cs index 2365f759e..0130a6418 100644 --- a/src/Twilio/Rest/Video/V1/Room/RoomRecordingResource.cs +++ b/src/Twilio/Rest/Video/V1/Room/RoomRecordingResource.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; @@ -390,6 +391,22 @@ public static RoomRecordingResource 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 RoomRecording resource. diff --git a/src/Twilio/Rest/Video/V1/RoomOptions.cs b/src/Twilio/Rest/Video/V1/RoomOptions.cs index 014d93a82..1cd377b0b 100644 --- a/src/Twilio/Rest/Video/V1/RoomOptions.cs +++ b/src/Twilio/Rest/Video/V1/RoomOptions.cs @@ -143,6 +143,7 @@ public List> GetParams() } return p; } + } @@ -170,6 +171,7 @@ public List> GetParams() return p; } + } @@ -222,6 +224,7 @@ public List> GetParams() } return p; } + } @@ -259,6 +262,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Video/V1/RoomResource.cs b/src/Twilio/Rest/Video/V1/RoomResource.cs index d67f4abe2..df178ef5c 100644 --- a/src/Twilio/Rest/Video/V1/RoomResource.cs +++ b/src/Twilio/Rest/Video/V1/RoomResource.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; @@ -486,6 +487,22 @@ public static RoomResource 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 Room resource. diff --git a/src/Twilio/Rest/Voice/V1/ArchivedCallOptions.cs b/src/Twilio/Rest/Voice/V1/ArchivedCallOptions.cs index 984f33a38..7afe47d9e 100644 --- a/src/Twilio/Rest/Voice/V1/ArchivedCallOptions.cs +++ b/src/Twilio/Rest/Voice/V1/ArchivedCallOptions.cs @@ -52,6 +52,7 @@ public List> GetParams() return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/ArchivedCallResource.cs b/src/Twilio/Rest/Voice/V1/ArchivedCallResource.cs index e2f0f67c8..3a6dc23af 100644 --- a/src/Twilio/Rest/Voice/V1/ArchivedCallResource.cs +++ b/src/Twilio/Rest/Voice/V1/ArchivedCallResource.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 ArchivedCallResource 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); + } + } diff --git a/src/Twilio/Rest/Voice/V1/ByocTrunkOptions.cs b/src/Twilio/Rest/Voice/V1/ByocTrunkOptions.cs index 9d2cdebb8..4b782043a 100644 --- a/src/Twilio/Rest/Voice/V1/ByocTrunkOptions.cs +++ b/src/Twilio/Rest/Voice/V1/ByocTrunkOptions.cs @@ -108,6 +108,7 @@ public List> GetParams() } return p; } + } @@ -135,6 +136,7 @@ public List> GetParams() return p; } + } @@ -164,6 +166,7 @@ public List> GetParams() return p; } + } @@ -188,6 +191,7 @@ public List> GetParams() } return p; } + } @@ -286,6 +290,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/ByocTrunkResource.cs b/src/Twilio/Rest/Voice/V1/ByocTrunkResource.cs index 96db87ed3..50ec3912d 100644 --- a/src/Twilio/Rest/Voice/V1/ByocTrunkResource.cs +++ b/src/Twilio/Rest/Voice/V1/ByocTrunkResource.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; @@ -512,6 +513,22 @@ public static ByocTrunkResource 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 BYOC Trunk resource. diff --git a/src/Twilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetOptions.cs b/src/Twilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetOptions.cs index 945265ee1..4cfd8477c 100644 --- a/src/Twilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetOptions.cs +++ b/src/Twilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetOptions.cs @@ -84,6 +84,7 @@ public List> GetParams() } return p; } + } @@ -116,6 +117,7 @@ public List> GetParams() return p; } + } @@ -150,6 +152,7 @@ public List> GetParams() return p; } + } @@ -183,6 +186,7 @@ public List> GetParams() } return p; } + } @@ -251,6 +255,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetResource.cs b/src/Twilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetResource.cs index 5582a3842..c3c0c7369 100644 --- a/src/Twilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetResource.cs +++ b/src/Twilio/Rest/Voice/V1/ConnectionPolicy/ConnectionPolicyTargetResource.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; @@ -499,6 +500,22 @@ public static ConnectionPolicyTargetResource 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 Target resource. diff --git a/src/Twilio/Rest/Voice/V1/ConnectionPolicyOptions.cs b/src/Twilio/Rest/Voice/V1/ConnectionPolicyOptions.cs index f66f1218d..5a38c17e4 100644 --- a/src/Twilio/Rest/Voice/V1/ConnectionPolicyOptions.cs +++ b/src/Twilio/Rest/Voice/V1/ConnectionPolicyOptions.cs @@ -45,6 +45,7 @@ public List> GetParams() } return p; } + } @@ -72,6 +73,7 @@ public List> GetParams() return p; } + } @@ -101,6 +103,7 @@ public List> GetParams() return p; } + } @@ -125,6 +128,7 @@ public List> GetParams() } return p; } + } @@ -160,6 +164,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/ConnectionPolicyResource.cs b/src/Twilio/Rest/Voice/V1/ConnectionPolicyResource.cs index 591390af7..1fb8acd2e 100644 --- a/src/Twilio/Rest/Voice/V1/ConnectionPolicyResource.cs +++ b/src/Twilio/Rest/Voice/V1/ConnectionPolicyResource.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; @@ -440,6 +441,22 @@ public static ConnectionPolicyResource 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 Connection Policy resource. diff --git a/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateOptions.cs b/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateOptions.cs index e048c55c6..385e61f9f 100644 --- a/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateOptions.cs +++ b/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateResource.cs b/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateResource.cs index a93925163..5bd630e91 100644 --- a/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateResource.cs +++ b/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateResource.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; @@ -115,6 +116,22 @@ public static BulkCountryUpdateResource 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 number of countries updated diff --git a/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixOptions.cs b/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixOptions.cs index 55862dd99..cf27d504f 100644 --- a/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixOptions.cs +++ b/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixResource.cs b/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixResource.cs index bbe8fe139..f67468d30 100644 --- a/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixResource.cs +++ b/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixResource.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 HighriskSpecialPrefixResource 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 prefix is a contiguous number range for a block of E.164 numbers that includes the E.164 assigned country code. For example, a North American Numbering Plan prefix like `+1510720` written like `+1(510) 720` matches all numbers inclusive from `+1(510) 720-0000` to `+1(510) 720-9999`. diff --git a/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.cs b/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.cs index 635ea02a6..8ccf9d168 100644 --- a/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.cs +++ b/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -113,6 +114,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryResource.cs b/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryResource.cs index f07b1818a..836de8bcc 100644 --- a/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryResource.cs +++ b/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryResource.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 CountryResource 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 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). diff --git a/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.cs b/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.cs index 7ad5afd62..72ff61c41 100644 --- a/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.cs +++ b/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.cs @@ -38,6 +38,7 @@ public List> GetParams() return p; } + } @@ -65,6 +66,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsResource.cs b/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsResource.cs index 0b663acb0..6b97b32c7 100644 --- a/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsResource.cs +++ b/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsResource.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 SettingsResource 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); + } + } /// `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`. diff --git a/src/Twilio/Rest/Voice/V1/IpRecordOptions.cs b/src/Twilio/Rest/Voice/V1/IpRecordOptions.cs index ca800641f..b833e251e 100644 --- a/src/Twilio/Rest/Voice/V1/IpRecordOptions.cs +++ b/src/Twilio/Rest/Voice/V1/IpRecordOptions.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/Voice/V1/IpRecordResource.cs b/src/Twilio/Rest/Voice/V1/IpRecordResource.cs index 0963d016a..5ea3e0b00 100644 --- a/src/Twilio/Rest/Voice/V1/IpRecordResource.cs +++ b/src/Twilio/Rest/Voice/V1/IpRecordResource.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 IpRecordResource 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 IP Record resource. diff --git a/src/Twilio/Rest/Voice/V1/SourceIpMappingOptions.cs b/src/Twilio/Rest/Voice/V1/SourceIpMappingOptions.cs index 38d53ab51..4d8c742e2 100644 --- a/src/Twilio/Rest/Voice/V1/SourceIpMappingOptions.cs +++ b/src/Twilio/Rest/Voice/V1/SourceIpMappingOptions.cs @@ -60,6 +60,7 @@ public List> GetParams() } return p; } + } @@ -87,6 +88,7 @@ public List> GetParams() return p; } + } @@ -116,6 +118,7 @@ public List> GetParams() return p; } + } @@ -140,6 +143,7 @@ public List> GetParams() } return p; } + } @@ -177,6 +181,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Voice/V1/SourceIpMappingResource.cs b/src/Twilio/Rest/Voice/V1/SourceIpMappingResource.cs index 5e9d24d3c..b66702d9a 100644 --- a/src/Twilio/Rest/Voice/V1/SourceIpMappingResource.cs +++ b/src/Twilio/Rest/Voice/V1/SourceIpMappingResource.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; @@ -444,6 +445,22 @@ public static SourceIpMappingResource 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 IP Record resource. diff --git a/src/Twilio/Rest/Wireless/V1/CommandOptions.cs b/src/Twilio/Rest/Wireless/V1/CommandOptions.cs index 1d95cc3ac..0ff16a221 100644 --- a/src/Twilio/Rest/Wireless/V1/CommandOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/CommandOptions.cs @@ -93,6 +93,7 @@ public List> GetParams() } return p; } + } @@ -120,6 +121,7 @@ public List> GetParams() return p; } + } @@ -149,6 +151,7 @@ public List> GetParams() return p; } + } @@ -201,6 +204,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Wireless/V1/CommandResource.cs b/src/Twilio/Rest/Wireless/V1/CommandResource.cs index 1ed93c229..dbdd82def 100644 --- a/src/Twilio/Rest/Wireless/V1/CommandResource.cs +++ b/src/Twilio/Rest/Wireless/V1/CommandResource.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; @@ -463,6 +464,22 @@ public static CommandResource 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 Command resource. diff --git a/src/Twilio/Rest/Wireless/V1/RatePlanOptions.cs b/src/Twilio/Rest/Wireless/V1/RatePlanOptions.cs index 6e109ae12..18402e300 100644 --- a/src/Twilio/Rest/Wireless/V1/RatePlanOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/RatePlanOptions.cs @@ -115,6 +115,7 @@ public List> GetParams() } return p; } + } @@ -142,6 +143,7 @@ public List> GetParams() return p; } + } @@ -171,6 +173,7 @@ public List> GetParams() return p; } + } @@ -195,6 +198,7 @@ public List> GetParams() } return p; } + } @@ -237,6 +241,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Wireless/V1/RatePlanResource.cs b/src/Twilio/Rest/Wireless/V1/RatePlanResource.cs index f1cca73af..7d7a76c9c 100644 --- a/src/Twilio/Rest/Wireless/V1/RatePlanResource.cs +++ b/src/Twilio/Rest/Wireless/V1/RatePlanResource.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; @@ -484,6 +485,22 @@ public static RatePlanResource 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 RatePlan resource. diff --git a/src/Twilio/Rest/Wireless/V1/Sim/DataSessionOptions.cs b/src/Twilio/Rest/Wireless/V1/Sim/DataSessionOptions.cs index 98d3b746e..5450d2d8f 100644 --- a/src/Twilio/Rest/Wireless/V1/Sim/DataSessionOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/Sim/DataSessionOptions.cs @@ -51,6 +51,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Wireless/V1/Sim/DataSessionResource.cs b/src/Twilio/Rest/Wireless/V1/Sim/DataSessionResource.cs index 44f5cab24..0a4da2d37 100644 --- a/src/Twilio/Rest/Wireless/V1/Sim/DataSessionResource.cs +++ b/src/Twilio/Rest/Wireless/V1/Sim/DataSessionResource.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 DataSessionResource 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 DataSession resource. diff --git a/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.cs b/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.cs index 9e7ace392..6f44e770a 100644 --- a/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.cs @@ -72,6 +72,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordResource.cs b/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordResource.cs index 458871e21..cf6241ad8 100644 --- a/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordResource.cs +++ b/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordResource.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; @@ -200,6 +201,22 @@ public static UsageRecordResource 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 [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) that this Usage Record is for. diff --git a/src/Twilio/Rest/Wireless/V1/SimOptions.cs b/src/Twilio/Rest/Wireless/V1/SimOptions.cs index 5602110da..0b36c4fd6 100644 --- a/src/Twilio/Rest/Wireless/V1/SimOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/SimOptions.cs @@ -47,6 +47,7 @@ public List> GetParams() return p; } + } @@ -76,6 +77,7 @@ public List> GetParams() return p; } + } @@ -135,6 +137,7 @@ public List> GetParams() } return p; } + } @@ -289,6 +292,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Wireless/V1/SimResource.cs b/src/Twilio/Rest/Wireless/V1/SimResource.cs index 8acb850ad..eae8aedc2 100644 --- a/src/Twilio/Rest/Wireless/V1/SimResource.cs +++ b/src/Twilio/Rest/Wireless/V1/SimResource.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; @@ -493,6 +494,22 @@ public static SimResource 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 Sim resource. diff --git a/src/Twilio/Rest/Wireless/V1/UsageRecordOptions.cs b/src/Twilio/Rest/Wireless/V1/UsageRecordOptions.cs index 84790bb9e..afb942c17 100644 --- a/src/Twilio/Rest/Wireless/V1/UsageRecordOptions.cs +++ b/src/Twilio/Rest/Wireless/V1/UsageRecordOptions.cs @@ -63,6 +63,7 @@ public List> GetParams() } return p; } + } diff --git a/src/Twilio/Rest/Wireless/V1/UsageRecordResource.cs b/src/Twilio/Rest/Wireless/V1/UsageRecordResource.cs index ef8819823..f422476fa 100644 --- a/src/Twilio/Rest/Wireless/V1/UsageRecordResource.cs +++ b/src/Twilio/Rest/Wireless/V1/UsageRecordResource.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; @@ -194,6 +195,22 @@ public static UsageRecordResource 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 AccountUsageRecord resource. diff --git a/src/Twilio/Twilio.csproj b/src/Twilio/Twilio.csproj index aa407f109..283a8ec4f 100644 --- a/src/Twilio/Twilio.csproj +++ b/src/Twilio/Twilio.csproj @@ -7,7 +7,7 @@ Copyright © Twilio Twilio en-US - 6.13.0 + 6.14.0 Twilio diff --git a/test/Twilio.Test/Clients/TwilioRestClientTest.cs b/test/Twilio.Test/Clients/TwilioRestClientTest.cs index 68509800c..28cc5361c 100644 --- a/test/Twilio.Test/Clients/TwilioRestClientTest.cs +++ b/test/Twilio.Test/Clients/TwilioRestClientTest.cs @@ -48,7 +48,7 @@ public void TestCantConnect() catch (CertificateValidationException e) { Assert.IsInstanceOf(typeof(InvalidOperationException), e.GetBaseException()); - Assert.AreEqual("Connection to api.twilio.com:8443 failed", e.Message); + Assert.AreEqual("Connection to tls-test.twilio.com:443 failed", e.Message); Assert.IsNull(e.Response); Assert.IsNotNull(e.Request); }