Skip to content

Commit

Permalink
Merge pull request #33 from Bandwidth/release/2021-09-13-14-52-27
Browse files Browse the repository at this point in the history
DX-2200 Voice, Answering machine detection
  • Loading branch information
ckoegel authored Sep 14, 2021
2 parents 9eccc9f + 18941d9 commit 1ec39c9
Show file tree
Hide file tree
Showing 24 changed files with 1,996 additions and 969 deletions.
2 changes: 1 addition & 1 deletion Bandwidth.Standard/Bandwidth.Standard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
</AssemblyAttribute>
</ItemGroup>

</Project>
</Project>
4 changes: 2 additions & 2 deletions Bandwidth.Standard/Http/Client/HttpClientConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ public class Builder
private TimeSpan maximumRetryWaitTime = TimeSpan.FromSeconds(0);
private IList<int> statusCodesToRetry = new List<int>
{
408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524,
408, 413, 429, 500, 502, 503, 504, 521, 522, 524, 408, 413, 429, 500, 502, 503, 504, 521, 522, 524
}.ToImmutableList();
private IList<HttpMethod> requestMethodsToRetry = new List<string>
{
"GET", "PUT", "GET", "PUT",
"GET", "PUT", "GET", "PUT"
}.Select(val => new HttpMethod(val)).ToImmutableList();
private HttpClient httpClientInstance = new HttpClient();
private bool overrideHttpClientConfiguration = true;
Expand Down
40 changes: 20 additions & 20 deletions Bandwidth.Standard/Messaging/Controllers/APIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ internal APIController(IConfiguration config, IHttpClient httpClient, IDictionar
}

/// <summary>
/// listMedia.
/// Gets a list of your media files. No query parameters are supported.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="continuationToken">Optional parameter: Continuation token used to retrieve subsequent media..</param>
/// <param name="continuationToken">Optional parameter: Continuation token used to retrieve subsequent media.</param>
/// <returns>Returns the ApiResponse of List<Models.Media> response from the API call.</returns>
public ApiResponse<List<Models.Media>> ListMedia(
string accountId,
Expand All @@ -54,10 +54,10 @@ internal APIController(IConfiguration config, IHttpClient httpClient, IDictionar
}

/// <summary>
/// listMedia.
/// Gets a list of your media files. No query parameters are supported.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="continuationToken">Optional parameter: Continuation token used to retrieve subsequent media..</param>
/// <param name="continuationToken">Optional parameter: Continuation token used to retrieve subsequent media.</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the ApiResponse of List<Models.Media> response from the API call.</returns>
public async Task<ApiResponse<List<Models.Media>>> ListMediaAsync(
Expand Down Expand Up @@ -143,7 +143,7 @@ internal APIController(IConfiguration config, IHttpClient httpClient, IDictionar
}

/// <summary>
/// getMedia.
/// Downloads a media file you previously uploaded.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="mediaId">Required parameter: Media ID to retrieve.</param>
Expand All @@ -158,7 +158,7 @@ public ApiResponse<Stream> GetMedia(
}

/// <summary>
/// getMedia.
/// Downloads a media file you previously uploaded.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="mediaId">Required parameter: Media ID to retrieve.</param>
Expand Down Expand Up @@ -246,13 +246,13 @@ public async Task<ApiResponse<Stream>> GetMediaAsync(
}

/// <summary>
/// uploadMedia.
/// Uploads a file the normal HTTP way. You may add headers to the request in order to provide some control to your media-file.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="mediaId">Required parameter: The user supplied custom media ID.</param>
/// <param name="body">Required parameter: Example: .</param>
/// <param name="contentType">Optional parameter: The media type of the entity-body.</param>
/// <param name="cacheControl">Optional parameter: General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain..</param>
/// <param name="cacheControl">Optional parameter: General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.</param>
public void UploadMedia(
string accountId,
string mediaId,
Expand All @@ -265,13 +265,13 @@ public void UploadMedia(
}

/// <summary>
/// uploadMedia.
/// Uploads a file the normal HTTP way. You may add headers to the request in order to provide some control to your media-file.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="mediaId">Required parameter: The user supplied custom media ID.</param>
/// <param name="body">Required parameter: Example: .</param>
/// <param name="contentType">Optional parameter: The media type of the entity-body.</param>
/// <param name="cacheControl">Optional parameter: General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain..</param>
/// <param name="cacheControl">Optional parameter: General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the void response from the API call.</returns>
public async Task UploadMediaAsync(
Expand Down Expand Up @@ -360,7 +360,7 @@ public async Task UploadMediaAsync(
}

/// <summary>
/// deleteMedia.
/// Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file, you can immediately upload a new file with the same name.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="mediaId">Required parameter: The media ID to delete.</param>
Expand All @@ -373,7 +373,7 @@ public void DeleteMedia(
}

/// <summary>
/// deleteMedia.
/// Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file, you can immediately upload a new file with the same name.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="mediaId">Required parameter: The media ID to delete.</param>
Expand Down Expand Up @@ -457,16 +457,16 @@ public async Task DeleteMediaAsync(
}

/// <summary>
/// getMessages.
/// Gets a list of messages based on query parameters.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="messageId">Optional parameter: The ID of the message to search for. Special characters need to be encoded using URL encoding.</param>
/// <param name="sourceTn">Optional parameter: The phone number that sent the message.</param>
/// <param name="destinationTn">Optional parameter: The phone number that received the message.</param>
/// <param name="messageStatus">Optional parameter: The status of the message. One of RECEIVED, QUEUED, SENDING, SENT, FAILED, DELIVERED, ACCEPTED, UNDELIVERED.</param>
/// <param name="errorCode">Optional parameter: The error code of the message.</param>
/// <param name="fromDateTime">Optional parameter: The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days..</param>
/// <param name="toDateTime">Optional parameter: The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days..</param>
/// <param name="fromDateTime">Optional parameter: The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.</param>
/// <param name="toDateTime">Optional parameter: The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.</param>
/// <param name="pageToken">Optional parameter: A base64 encoded value used for pagination of results.</param>
/// <param name="limit">Optional parameter: The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000.</param>
/// <returns>Returns the ApiResponse of Models.BandwidthMessagesList response from the API call.</returns>
Expand All @@ -488,16 +488,16 @@ public async Task DeleteMediaAsync(
}

/// <summary>
/// getMessages.
/// Gets a list of messages based on query parameters.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="messageId">Optional parameter: The ID of the message to search for. Special characters need to be encoded using URL encoding.</param>
/// <param name="sourceTn">Optional parameter: The phone number that sent the message.</param>
/// <param name="destinationTn">Optional parameter: The phone number that received the message.</param>
/// <param name="messageStatus">Optional parameter: The status of the message. One of RECEIVED, QUEUED, SENDING, SENT, FAILED, DELIVERED, ACCEPTED, UNDELIVERED.</param>
/// <param name="errorCode">Optional parameter: The error code of the message.</param>
/// <param name="fromDateTime">Optional parameter: The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days..</param>
/// <param name="toDateTime">Optional parameter: The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days..</param>
/// <param name="fromDateTime">Optional parameter: The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.</param>
/// <param name="toDateTime">Optional parameter: The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.</param>
/// <param name="pageToken">Optional parameter: A base64 encoded value used for pagination of results.</param>
/// <param name="limit">Optional parameter: The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000.</param>
/// <param name="cancellationToken"> cancellationToken. </param>
Expand Down Expand Up @@ -606,7 +606,7 @@ public async Task DeleteMediaAsync(
}

/// <summary>
/// createMessage.
/// Endpoint for sending text messages and picture messages using V2 messaging.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="body">Required parameter: Example: .</param>
Expand All @@ -621,7 +621,7 @@ public async Task DeleteMediaAsync(
}

/// <summary>
/// createMessage.
/// Endpoint for sending text messages and picture messages using V2 messaging.
/// </summary>
/// <param name="accountId">Required parameter: User's account ID.</param>
/// <param name="body">Required parameter: Example: .</param>
Expand Down
2 changes: 1 addition & 1 deletion Bandwidth.Standard/Messaging/Models/BandwidthMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public BandwidthMessage(
public string From { get; set; }

/// <summary>
/// The list of media URLs sent in the message
/// The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name.
/// </summary>
[JsonProperty("media", NullValueHandling = NullValueHandling.Ignore)]
public List<string> Media { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal MFAController(IConfiguration config, IHttpClient httpClient, IDictionar
}

/// <summary>
/// Allows a user to send a MFA code through a phone call.
/// Multi-Factor authentication with Bandwidth Voice services. Allows for a user to send an MFA code via a phone call.
/// </summary>
/// <param name="accountId">Required parameter: Bandwidth Account ID with Voice service enabled.</param>
/// <param name="body">Required parameter: Example: .</param>
Expand All @@ -54,7 +54,7 @@ internal MFAController(IConfiguration config, IHttpClient httpClient, IDictionar
}

/// <summary>
/// Allows a user to send a MFA code through a phone call.
/// Multi-Factor authentication with Bandwidth Voice services. Allows for a user to send an MFA code via a phone call.
/// </summary>
/// <param name="accountId">Required parameter: Bandwidth Account ID with Voice service enabled.</param>
/// <param name="body">Required parameter: Example: .</param>
Expand Down Expand Up @@ -136,7 +136,7 @@ internal MFAController(IConfiguration config, IHttpClient httpClient, IDictionar
}

/// <summary>
/// Allows a user to send a MFA code through a text message (SMS).
/// Multi-Factor authentication with Bandwidth Messaging services. Allows a user to send an MFA code via a text message (SMS).
/// </summary>
/// <param name="accountId">Required parameter: Bandwidth Account ID with Messaging service enabled.</param>
/// <param name="body">Required parameter: Example: .</param>
Expand All @@ -151,7 +151,7 @@ internal MFAController(IConfiguration config, IHttpClient httpClient, IDictionar
}

/// <summary>
/// Allows a user to send a MFA code through a text message (SMS).
/// Multi-Factor authentication with Bandwidth Messaging services. Allows a user to send an MFA code via a text message (SMS).
/// </summary>
/// <param name="accountId">Required parameter: Bandwidth Account ID with Messaging service enabled.</param>
/// <param name="body">Required parameter: Example: .</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal APIController(IConfiguration config, IHttpClient httpClient, IDictionar
/// <summary>
/// Create a TN Lookup Order.
/// </summary>
/// <param name="accountId">Required parameter: The ID of the Bandwidth account that the user belongs to..</param>
/// <param name="accountId">Required parameter: The ID of the Bandwidth account that the user belongs to.</param>
/// <param name="body">Required parameter: Example: .</param>
/// <returns>Returns the ApiResponse of Models.OrderResponse response from the API call.</returns>
public ApiResponse<Models.OrderResponse> CreateLookupRequest(
Expand All @@ -57,7 +57,7 @@ internal APIController(IConfiguration config, IHttpClient httpClient, IDictionar
/// <summary>
/// Create a TN Lookup Order.
/// </summary>
/// <param name="accountId">Required parameter: The ID of the Bandwidth account that the user belongs to..</param>
/// <param name="accountId">Required parameter: The ID of the Bandwidth account that the user belongs to.</param>
/// <param name="body">Required parameter: Example: .</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the ApiResponse of Models.OrderResponse response from the API call.</returns>
Expand Down Expand Up @@ -639,7 +639,7 @@ internal APIController(IConfiguration config, IHttpClient httpClient, IDictionar
/// <summary>
/// Query an existing TN Lookup Order.
/// </summary>
/// <param name="accountId">Required parameter: The ID of the Bandwidth account that the user belongs to..</param>
/// <param name="accountId">Required parameter: The ID of the Bandwidth account that the user belongs to.</param>
/// <param name="requestId">Required parameter: Example: .</param>
/// <returns>Returns the ApiResponse of Models.OrderStatus response from the API call.</returns>
public ApiResponse<Models.OrderStatus> GetLookupRequestStatus(
Expand All @@ -654,7 +654,7 @@ internal APIController(IConfiguration config, IHttpClient httpClient, IDictionar
/// <summary>
/// Query an existing TN Lookup Order.
/// </summary>
/// <param name="accountId">Required parameter: The ID of the Bandwidth account that the user belongs to..</param>
/// <param name="accountId">Required parameter: The ID of the Bandwidth account that the user belongs to.</param>
/// <param name="requestId">Required parameter: Example: .</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the ApiResponse of Models.OrderStatus response from the API call.</returns>
Expand Down
Loading

0 comments on commit 1ec39c9

Please sign in to comment.