Skip to content

Commit

Permalink
Update TwilioRestClient.cs to add overloaded method in rest client
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere authored Nov 26, 2024
1 parent b6aabe9 commit a7f638f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Twilio/Clients/TwilioRestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,36 @@ public class TwilioRestClient : ITwilioRestClient
/// <param name="region">region to make requests for</param>
/// <param name="httpClient">http client used to make the requests</param>
/// <param name="edge">edge to make requests for</param>
public TwilioRestClient(
string username,
string password,
string accountSid = null,
string region = null,
HttpClient httpClient = null,
string edge = null
)
{
_username = username;
_password = password;

AccountSid = accountSid ?? username;
HttpClient = httpClient ?? DefaultClient();

Region = region;
Edge = edge;
}

/// <summary>
/// Constructor for a TwilioRestClient
/// </summary>
///
/// <param name="username">username for requests</param>
/// <param name="password">password for requests</param>
/// <param name="accountSid">account sid to make requests for</param>
/// <param name="region">region to make requests for</param>
/// <param name="httpClient">http client used to make the requests</param>
/// <param name="edge">edge to make requests for</param>
/// <param name="authstrategy">authentication strategy that will be used to make requests for</param>
public TwilioRestClient(
string username,
string password,
Expand Down

0 comments on commit a7f638f

Please sign in to comment.