Skip to content

Commit

Permalink
Merge branch 'main' into ruby-read-modified-dependentProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
sbansla authored Sep 14, 2023
2 parents 6b14023 + f3071f0 commit 585fc11
Show file tree
Hide file tree
Showing 27 changed files with 612 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace Twilio.Rest.Api.V2010.Account.Call
public class FeedbackCallSummaryResource : Resource
{



[JsonConverter(typeof(StringEnumConverter))]
public sealed class StatusEnum : StringEnum
{
Expand Down Expand Up @@ -150,6 +152,22 @@ public static FeedbackCallSummaryResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> The account_sid </summary>
Expand Down
18 changes: 18 additions & 0 deletions examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace Twilio.Rest.Api.V2010.Account
public class CallResource : Resource
{



[JsonConverter(typeof(StringEnumConverter))]
public sealed class StatusEnum : StringEnum
{
Expand Down Expand Up @@ -290,6 +292,22 @@ public static CallResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> The account_sid </summary>
Expand Down
18 changes: 18 additions & 0 deletions examples/csharp/src/Twilio/Rest/Api/V2010/AccountResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace Twilio.Rest.Api.V2010
public class AccountResource : Resource
{



[JsonConverter(typeof(StringEnumConverter))]
public sealed class StatusEnum : StringEnum
{
Expand Down Expand Up @@ -499,6 +501,22 @@ public static AccountResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> The account_sid </summary>
Expand Down
18 changes: 18 additions & 0 deletions examples/csharp/src/Twilio/Rest/FlexApi/V1/CallResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class CallResource : Resource
{





private static Request BuildUpdateRequest(UpdateCallOptions options, ITwilioRestClient client)
{
Expand Down Expand Up @@ -115,6 +117,22 @@ public static CallResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> Non-string path parameter in the response. </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class HistoryResource : Resource
{





private static Request BuildFetchRequest(FetchHistoryOptions options, ITwilioRestClient client)
{
Expand Down Expand Up @@ -115,6 +117,22 @@ public static HistoryResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> The account_sid </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class AwsResource : Resource
{





/// <summary> delete </summary>
/// <param name="options"> Delete Aws parameters </param>
Expand Down Expand Up @@ -376,6 +378,22 @@ public static AwsResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> The account_sid </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace Twilio.Rest.FlexApi.V1.Credential
public class NewCredentialsResource : Resource
{



public sealed class StatusEnum : StringEnum
{
private StatusEnum(string value) : base(value) {}
Expand Down Expand Up @@ -205,6 +207,22 @@ public static NewCredentialsResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> The account_sid </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class FleetResource : Resource
{





private static Request BuildCreateRequest(CreateFleetOptions options, ITwilioRestClient client)
{
Expand Down Expand Up @@ -178,6 +180,22 @@ public static FleetResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> The name </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class AssistantResource : Resource
{





private static Request BuildReadRequest(ReadAssistantOptions options, ITwilioRestClient client)
{
Expand Down Expand Up @@ -167,6 +169,22 @@ public static AssistantResource FromJson(string json)
throw new ApiException(e.Message, e);
}
}
/// <summary>
/// Converts an object into a json string
/// </summary>
/// <param name="model"> C# model </param>
/// <returns> JSON string </returns>
public static string ToJson(object model)
{
try
{
return JsonConvert.SerializeObject(model);
}
catch (JsonException e)
{
throw new ApiException(e.Message, e);
}
}


///<summary> A string that uniquely identifies this Fleet. </summary>
Expand Down
Loading

0 comments on commit 585fc11

Please sign in to comment.