Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Organizations Api Uptake for twilio-csharp and support for bearer token/ no token authentication #595

Merged
merged 39 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
35d2736
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
29f595e
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
c6f0eea
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
0541dc7
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
c4eee19
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
d4e7086
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
d0e0933
remove null pointer exceptions for error objects
AsabuHere Sep 4, 2024
3bfe21d
renaming TwilioBearerToken client to TwilioOrgsToken client
AsabuHere Sep 4, 2024
b3eeb87
renaming request classes
AsabuHere Sep 4, 2024
55364db
renaming resourcset
AsabuHere Sep 4, 2024
622f931
Renaming rest clients in mustache files
AsabuHere Sep 13, 2024
e3bc20b
moving constant references to enum file
AsabuHere Sep 17, 2024
a53ecc6
renamed mustache configurations for domain class name
AsabuHere Sep 17, 2024
0441b5c
Renaming rest client get method in mustache files
AsabuHere Sep 17, 2024
21325de
Changes to auth method handler
AsabuHere Sep 23, 2024
436748e
fix: add support for required query params in node (#596)
tiwarishubham635 Aug 1, 2024
20af68b
chore: removing unused params from python model constructor (#597)
tiwarishubham635 Aug 2, 2024
1f7e230
chore: remove local file paths (#598)
tiwarishubham635 Aug 5, 2024
b9f4793
chore: librarian time check (#594)
manisha1997 Aug 12, 2024
c1416ef
chore: fixing nullable attributes (#591)
manisha1997 Aug 19, 2024
ec82cc3
chore: revert changes (#603)
manisha1997 Aug 19, 2024
6f7372b
chore: ignore content_v1 spec for release and iam_organizations spec …
sbansla Aug 23, 2024
9c0ca40
chore: added a null check for content v1 spec file (#610)
sbansla Sep 4, 2024
457304d
chore: setting contentType correctly in java (#608)
tiwarishubham635 Sep 5, 2024
bbe6473
chore: skipping isOverridden flag in distinctResponseModels (#611)
tiwarishubham635 Sep 18, 2024
6508649
resolving merge conflicts
AsabuHere Sep 23, 2024
b9176c3
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
80b24aa
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
6ddab76
orgs api uptake for twilio csharp
AsabuHere Jul 23, 2024
1afdc1b
Merge branch 'main' into csharp_orgs_api_uptake
AsabuHere Sep 23, 2024
7bc8f1e
resolving conflicts
AsabuHere Sep 23, 2024
b3929d2
auth method processing changes
AsabuHere Sep 23, 2024
98b9f19
removing unwanted changes
AsabuHere Sep 23, 2024
a9dbbd4
excluding other languages from generation
AsabuHere Sep 23, 2024
918725d
test files
AsabuHere Sep 23, 2024
4e2c9e1
test files
AsabuHere Sep 23, 2024
11af9e5
test files
AsabuHere Sep 23, 2024
f97bec6
test files
AsabuHere Sep 23, 2024
6147a38
test files
AsabuHere Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading