Add an API endpoint to support queuing a downloadable advanced search for transactions, and also in the SDK.
For the scope of this Issue, it would be allowing a queuing of the downloadable advanced search. In a future Issue, it would include retrieving that downloadable advanced search via the SDK.
API
request:
POST api.braintreegateway.com/merchants/{id}/transactions/advanced_search/submit_for_download
response:
202 Accepted
{
Location: https://api.sandbox.braintreegateway.com/merchants/{id}/downloads/advanced_search/{download_id}
}
...
public virtual async Task<ResultImpl<AdvancedSearchDownload>> SubmitTransactionSearchForDownloadAsync(TransactionSearchRequest query)
{
NodeWrapper response = new NodeWrapper(await service.PostAsync(service.MerchantPath() + "/transactions/advanced_search/submit_for_download", query).ConfigureAwait(false));
return new ResultImpl<AdvancedSearchDownload>(new NodeWrapper(response), gateway);
}
Context:
Via the Control Panel in Braintree, we can use the merchants/{id}/transactions/advanced_search route to perform a search, and then use the merchants/{id}/transactions/download_advanced_search_results route to trigger a downloadable copy of the transaction advanced search results.
In the Control Panel view, the response to the requesting a download of the advanced search transactions is an HTTP 302 response, leading to the /merchants/{id}/downloads page.
Request:
POST merchants/{id}//transactions/download_advanced_search_results
These downloads can be found through the Control Panel UI at merchants/{id}/downloads (and more specifically, from https://sandbox.braintreegateway.com/merchants/{id}/categorized_downloads ) which would be superb to have available from the SDK. Any particular download can currently be found at the url GET https://sandbox.braintreegateway.com/merchants/{id}/downloads/{download_id}.
By allowing this to be accessed through the SDK we can more efficiently retrieve advanced searches without holding open a network call during the advanced search.
General information
Issue description
Add an API endpoint to support queuing a downloadable advanced search for transactions, and also in the SDK.
For the scope of this Issue, it would be allowing a queuing of the downloadable advanced search. In a future Issue, it would include retrieving that downloadable advanced search via the SDK.
API
SDK
ITransactionGateway.cs
TransactionGateway.cs
Context:
Via the Control Panel in Braintree, we can use the
merchants/{id}/transactions/advanced_search
route to perform a search, and then use themerchants/{id}/transactions/download_advanced_search_results
route to trigger a downloadable copy of the transaction advanced search results.In the Control Panel view, the response to the requesting a download of the advanced search transactions is an HTTP 302 response, leading to the
/merchants/{id}/downloads
page.Request:
Response:
These downloads can be found through the Control Panel UI at
merchants/{id}/downloads
(and more specifically, fromhttps://sandbox.braintreegateway.com/merchants/{id}/categorized_downloads
) which would be superb to have available from the SDK. Any particular download can currently be found at the urlGET https://sandbox.braintreegateway.com/merchants/{id}/downloads/{download_id}
.By allowing this to be accessed through the SDK we can more efficiently retrieve advanced searches without holding open a network call during the advanced search.