Skip to content

Commit

Permalink
Merge branch 'main' into adding-content_v1
Browse files Browse the repository at this point in the history
  • Loading branch information
sbansla committed Sep 24, 2024
2 parents 09ba50c + 9db9873 commit efbe130
Show file tree
Hide file tree
Showing 31 changed files with 1,534 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
using Twilio.Types;




namespace Twilio.Rest.Api.V2010.Account.Call
{
public class FeedbackCallSummaryResource : Resource
Expand Down Expand Up @@ -88,7 +90,7 @@ public static FeedbackCallSummaryResource Update(UpdateFeedbackCallSummaryOption
/// <returns> Task that resolves to A single instance of FeedbackCallSummary </returns>
#if !NET35
public static async System.Threading.Tasks.Task<FeedbackCallSummaryResource> UpdateAsync(UpdateFeedbackCallSummaryOptions options,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildUpdateRequest(options, client));
Expand All @@ -110,7 +112,7 @@ public static FeedbackCallSummaryResource Update(
DateTime? startDate,
string pathAccountSid = null,
string accountSid = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new UpdateFeedbackCallSummaryOptions(pathSid, endDate, startDate){ PathAccountSid = pathAccountSid, AccountSid = accountSid };
return Update(options, client);
Expand All @@ -131,7 +133,7 @@ public static async System.Threading.Tasks.Task<FeedbackCallSummaryResource> Upd
DateTime? startDate,
string pathAccountSid = null,
string accountSid = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new UpdateFeedbackCallSummaryOptions(pathSid, endDate, startDate){ PathAccountSid = pathAccountSid, AccountSid = accountSid };
return await UpdateAsync(options, client);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
using Twilio.Types;




namespace Twilio.Rest.Api.V2010.Account
{
public class CallResource : Resource
Expand Down Expand Up @@ -85,8 +87,7 @@ public static CallResource Create(CreateCallOptions options, ITwilioRestClient c
/// <param name="options"> Create Call parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Call </returns>
public static async System.Threading.Tasks.Task<CallResource> CreateAsync(CreateCallOptions options,
ITwilioRestClient client = null)
public static async System.Threading.Tasks.Task<CallResource> CreateAsync(CreateCallOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildCreateRequest(options, client));
Expand All @@ -108,7 +109,7 @@ public static CallResource Create(
string pathAccountSid = null,
List<string> testArrayOfStrings = null,
List<Uri> testArrayOfUri = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new CreateCallOptions(requiredStringProperty, testMethod){ PathAccountSid = pathAccountSid, TestArrayOfStrings = testArrayOfStrings, TestArrayOfUri = testArrayOfUri };
return Create(options, client);
Expand All @@ -129,7 +130,7 @@ public static async System.Threading.Tasks.Task<CallResource> CreateAsync(
string pathAccountSid = null,
List<string> testArrayOfStrings = null,
List<Uri> testArrayOfUri = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new CreateCallOptions(requiredStringProperty, testMethod){ PathAccountSid = pathAccountSid, TestArrayOfStrings = testArrayOfStrings, TestArrayOfUri = testArrayOfUri };
return await CreateAsync(options, client);
Expand Down Expand Up @@ -176,7 +177,7 @@ public static bool Delete(DeleteCallOptions options, ITwilioRestClient client =
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Call </returns>
public static async System.Threading.Tasks.Task<bool> DeleteAsync(DeleteCallOptions options,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildDeleteRequest(options, client));
Expand Down Expand Up @@ -243,8 +244,7 @@ public static CallResource Fetch(FetchCallOptions options, ITwilioRestClient cli
/// <param name="options"> Fetch Call parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Call </returns>
public static async System.Threading.Tasks.Task<CallResource> FetchAsync(FetchCallOptions options,
ITwilioRestClient client = null)
public static async System.Threading.Tasks.Task<CallResource> FetchAsync(FetchCallOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildFetchRequest(options, client));
Expand All @@ -259,7 +259,7 @@ public static async System.Threading.Tasks.Task<CallResource> FetchAsync(FetchCa
public static CallResource Fetch(
int? pathTestInteger,
string pathAccountSid = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new FetchCallOptions(pathTestInteger){ PathAccountSid = pathAccountSid };
return Fetch(options, client);
Expand Down
29 changes: 14 additions & 15 deletions examples/csharp/src/Twilio/Rest/Api/V2010/AccountResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
using Twilio.Types;




namespace Twilio.Rest.Api.V2010
{
public class AccountResource : Resource
Expand Down Expand Up @@ -95,8 +97,7 @@ public static AccountResource Create(CreateAccountOptions options, ITwilioRestCl
/// <param name="options"> Create Account parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Account </returns>
public static async System.Threading.Tasks.Task<AccountResource> CreateAsync(CreateAccountOptions options,
ITwilioRestClient client = null)
public static async System.Threading.Tasks.Task<AccountResource> CreateAsync(CreateAccountOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildCreateRequest(options, client));
Expand All @@ -116,7 +117,7 @@ public static AccountResource Create(
List<string> recordingStatusCallbackEvent = null,
Types.Twiml twiml = null,
AccountResource.XTwilioWebhookEnabledEnum xTwilioWebhookEnabled = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new CreateAccountOptions(){ RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackEvent = recordingStatusCallbackEvent, Twiml = twiml, XTwilioWebhookEnabled = xTwilioWebhookEnabled };
return Create(options, client);
Expand All @@ -135,7 +136,7 @@ public static async System.Threading.Tasks.Task<AccountResource> CreateAsync(
List<string> recordingStatusCallbackEvent = null,
Types.Twiml twiml = null,
AccountResource.XTwilioWebhookEnabledEnum xTwilioWebhookEnabled = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new CreateAccountOptions(){ RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackEvent = recordingStatusCallbackEvent, Twiml = twiml, XTwilioWebhookEnabled = xTwilioWebhookEnabled };
return await CreateAsync(options, client);
Expand Down Expand Up @@ -180,7 +181,7 @@ public static bool Delete(DeleteAccountOptions options, ITwilioRestClient client
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Account </returns>
public static async System.Threading.Tasks.Task<bool> DeleteAsync(DeleteAccountOptions options,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildDeleteRequest(options, client));
Expand Down Expand Up @@ -243,8 +244,7 @@ public static AccountResource Fetch(FetchAccountOptions options, ITwilioRestClie
/// <param name="options"> Fetch Account parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Account </returns>
public static async System.Threading.Tasks.Task<AccountResource> FetchAsync(FetchAccountOptions options,
ITwilioRestClient client = null)
public static async System.Threading.Tasks.Task<AccountResource> FetchAsync(FetchAccountOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildFetchRequest(options, client));
Expand All @@ -257,7 +257,7 @@ public static async System.Threading.Tasks.Task<AccountResource> FetchAsync(Fetc
/// <returns> A single instance of Account </returns>
public static AccountResource Fetch(
string pathSid = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new FetchAccountOptions(){ PathSid = pathSid };
return Fetch(options, client);
Expand Down Expand Up @@ -306,8 +306,7 @@ public static ResourceSet<AccountResource> Read(ReadAccountOptions options, ITwi
/// <param name="options"> Read Account parameters </param>
/// <param name="client"> Client to make requests to Twilio </param>
/// <returns> Task that resolves to A single instance of Account </returns>
public static async System.Threading.Tasks.Task<ResourceSet<AccountResource>> ReadAsync(ReadAccountOptions options,
ITwilioRestClient client = null)
public static async System.Threading.Tasks.Task<ResourceSet<AccountResource>> ReadAsync(ReadAccountOptions options, ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildReadRequest(options, client));
Expand All @@ -332,7 +331,7 @@ public static ResourceSet<AccountResource> Read(
DateTime? dateCreatedAfter = null,
int? pageSize = null,
long? limit = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new ReadAccountOptions(){ DateCreated = dateCreated, DateTest = dateTest, DateCreatedBefore = dateCreatedBefore, DateCreatedAfter = dateCreatedAfter, PageSize = pageSize, Limit = limit};
return Read(options, client);
Expand All @@ -355,7 +354,7 @@ public static async System.Threading.Tasks.Task<ResourceSet<AccountResource>> Re
DateTime? dateCreatedAfter = null,
int? pageSize = null,
long? limit = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new ReadAccountOptions(){ DateCreated = dateCreated, DateTest = dateTest, DateCreatedBefore = dateCreatedBefore, DateCreatedAfter = dateCreatedAfter, PageSize = pageSize, Limit = limit};
return await ReadAsync(options, client);
Expand Down Expand Up @@ -446,7 +445,7 @@ public static AccountResource Update(UpdateAccountOptions options, ITwilioRestCl
/// <returns> Task that resolves to A single instance of Account </returns>
#if !NET35
public static async System.Threading.Tasks.Task<AccountResource> UpdateAsync(UpdateAccountOptions options,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildUpdateRequest(options, client));
Expand All @@ -464,7 +463,7 @@ public static AccountResource Update(
AccountResource.StatusEnum status,
string pathSid = null,
string pauseBehavior = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new UpdateAccountOptions(status){ PathSid = pathSid, PauseBehavior = pauseBehavior };
return Update(options, client);
Expand All @@ -481,7 +480,7 @@ public static async System.Threading.Tasks.Task<AccountResource> UpdateAsync(
AccountResource.StatusEnum status,
string pathSid = null,
string pauseBehavior = null,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new UpdateAccountOptions(status){ PathSid = pathSid, PauseBehavior = pauseBehavior };
return await UpdateAsync(options, client);
Expand Down
1 change: 1 addition & 0 deletions examples/csharp/src/Twilio/Rest/Domain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public static implicit operator Domain(string value)
public static readonly Domain Api = new Domain("api");
public static readonly Domain FlexApi = new Domain("flex-api");
public static readonly Domain Versionless = new Domain("versionless");
public static readonly Domain PreviewIam = new Domain("preview-iam");
}
}
8 changes: 5 additions & 3 deletions examples/csharp/src/Twilio/Rest/FlexApi/V1/CallResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@





namespace Twilio.Rest.FlexApi.V1
{
public class CallResource : Resource
Expand Down Expand Up @@ -69,7 +71,7 @@ public static CallResource Update(UpdateCallOptions options, ITwilioRestClient c
/// <returns> Task that resolves to A single instance of Call </returns>
#if !NET35
public static async System.Threading.Tasks.Task<CallResource> UpdateAsync(UpdateCallOptions options,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
client = client ?? TwilioClient.GetRestClient();
var response = await client.RequestAsync(BuildUpdateRequest(options, client));
Expand All @@ -83,7 +85,7 @@ public static async System.Threading.Tasks.Task<CallResource> UpdateAsync(Update
/// <returns> A single instance of Call </returns>
public static CallResource Update(
string pathSid,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new UpdateCallOptions(pathSid){ };
return Update(options, client);
Expand All @@ -96,7 +98,7 @@ public static CallResource Update(
/// <returns> Task that resolves to A single instance of Call </returns>
public static async System.Threading.Tasks.Task<CallResource> UpdateAsync(
string pathSid,
ITwilioRestClient client = null)
ITwilioRestClient client = null)
{
var options = new UpdateCallOptions(pathSid){ };
return await UpdateAsync(options, client);
Expand Down
Loading

0 comments on commit efbe130

Please sign in to comment.