/*
* Selling Partner API for Finances
*
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
*
* OpenAPI spec version: v0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
using FikaAmazonAPI.AmazonSpApiSDK.Models.Finances;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.Finances
{
///
/// Represents a collection of functions to interact with the API endpoints
///
public interface IDefaultApi : IApiAccessor
{
#region Synchronous Operations
///
///
///
///
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)
/// A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)
/// A string token returned in the response of your previous request. (optional)
/// ListFinancialEventGroupsResponse
ListFinancialEventGroupsResponse ListFinancialEventGroups(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null);
///
///
///
///
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)
/// A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)
/// A string token returned in the response of your previous request. (optional)
/// ApiResponse of ListFinancialEventGroupsResponse
ApiResponse ListFinancialEventGroupsWithHttpInfo(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null);
///
///
///
///
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)
/// A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)
/// A string token returned in the response of your previous request. (optional)
/// ListFinancialEventsResponse
ListFinancialEventsResponse ListFinancialEvents(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null);
///
///
///
///
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)
/// A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)
/// A string token returned in the response of your previous request. (optional)
/// ApiResponse of ListFinancialEventsResponse
ApiResponse ListFinancialEventsWithHttpInfo(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null);
///
///
///
///
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The identifier of the financial event group to which the events belong.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// ListFinancialEventsResponse
ListFinancialEventsResponse ListFinancialEventsByGroupId(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null);
///
///
///
///
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The identifier of the financial event group to which the events belong.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// ApiResponse of ListFinancialEventsResponse
ApiResponse ListFinancialEventsByGroupIdWithHttpInfo(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null);
///
///
///
///
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// An Amazon-defined order identifier, in 3-7-7 format.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// ListFinancialEventsResponse
ListFinancialEventsResponse ListFinancialEventsByOrderId(string orderId, int? maxResultsPerPage = null, string nextToken = null);
///
///
///
///
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// An Amazon-defined order identifier, in 3-7-7 format.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// ApiResponse of ListFinancialEventsResponse
ApiResponse ListFinancialEventsByOrderIdWithHttpInfo(string orderId, int? maxResultsPerPage = null, string nextToken = null);
#endregion Synchronous Operations
#region Asynchronous Operations
///
///
///
///
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)
/// A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)
/// A string token returned in the response of your previous request. (optional)
/// Task of ListFinancialEventGroupsResponse
System.Threading.Tasks.Task ListFinancialEventGroupsAsync(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null);
///
///
///
///
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)
/// A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)
/// A string token returned in the response of your previous request. (optional)
/// Task of ApiResponse (ListFinancialEventGroupsResponse)
System.Threading.Tasks.Task> ListFinancialEventGroupsAsyncWithHttpInfo(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null);
///
///
///
///
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)
/// A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)
/// A string token returned in the response of your previous request. (optional)
/// Task of ListFinancialEventsResponse
System.Threading.Tasks.Task ListFinancialEventsAsync(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null);
///
///
///
///
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)
/// A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)
/// A string token returned in the response of your previous request. (optional)
/// Task of ApiResponse (ListFinancialEventsResponse)
System.Threading.Tasks.Task> ListFinancialEventsAsyncWithHttpInfo(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null);
///
///
///
///
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The identifier of the financial event group to which the events belong.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// Task of ListFinancialEventsResponse
System.Threading.Tasks.Task ListFinancialEventsByGroupIdAsync(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null);
///
///
///
///
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The identifier of the financial event group to which the events belong.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// Task of ApiResponse (ListFinancialEventsResponse)
System.Threading.Tasks.Task> ListFinancialEventsByGroupIdAsyncWithHttpInfo(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null);
///
///
///
///
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// An Amazon-defined order identifier, in 3-7-7 format.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// Task of ListFinancialEventsResponse
System.Threading.Tasks.Task ListFinancialEventsByOrderIdAsync(string orderId, int? maxResultsPerPage = null, string nextToken = null);
///
///
///
///
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// An Amazon-defined order identifier, in 3-7-7 format.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// Task of ApiResponse (ListFinancialEventsResponse)
System.Threading.Tasks.Task> ListFinancialEventsByOrderIdAsyncWithHttpInfo(string orderId, int? maxResultsPerPage = null, string nextToken = null);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class DefaultApi : IDefaultApi
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class.
///
///
public DefaultApi(string basePath)
{
Configuration = new Configuration { BasePath = basePath };
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Initializes a new instance of the class
/// using Configuration object
///
/// An instance of Configuration
///
public DefaultApi(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
Configuration = Configuration.Default;
else
Configuration = configuration;
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Gets the base path of the API client.
///
/// The base path
public string GetBasePath()
{
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
///
/// Sets the base path of the API client.
///
/// The base path
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(string basePath)
{
// do nothing
}
///
/// Gets or sets the configuration object
///
/// An instance of the Configuration
public Configuration Configuration { get; set; }
///
/// Provides a factory method hook for the creation of exceptions.
///
public ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set { _exceptionFactory = value; }
}
///
/// Gets the default header.
///
/// Dictionary of HTTP header
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary DefaultHeader()
{
return new ReadOnlyDictionary(Configuration.DefaultHeader);
}
///
/// Add default header.
///
/// Header field name.
/// Header field value.
///
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
Configuration.AddDefaultHeader(key, value);
}
///
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)
/// A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)
/// A string token returned in the response of your previous request. (optional)
/// ListFinancialEventGroupsResponse
public ListFinancialEventGroupsResponse ListFinancialEventGroups(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null)
{
ApiResponse localVarResponse = ListFinancialEventGroupsWithHttpInfo(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken);
return localVarResponse.Data;
}
///
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)
/// A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)
/// A string token returned in the response of your previous request. (optional)
/// ApiResponse of ListFinancialEventGroupsResponse
public ApiResponse ListFinancialEventGroupsWithHttpInfo(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null)
{
var localVarPath = "/finances/v0/financialEventGroups";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
if (financialEventGroupStartedBefore != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "FinancialEventGroupStartedBefore", financialEventGroupStartedBefore)); // query parameter
if (financialEventGroupStartedAfter != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "FinancialEventGroupStartedAfter", financialEventGroupStartedAfter)); // query parameter
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ListFinancialEventGroups", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ListFinancialEventGroupsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventGroupsResponse)));
}
///
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)
/// A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)
/// A string token returned in the response of your previous request. (optional)
/// Task of ListFinancialEventGroupsResponse
public async System.Threading.Tasks.Task ListFinancialEventGroupsAsync(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null)
{
ApiResponse localVarResponse = await ListFinancialEventGroupsAsyncWithHttpInfo(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken);
return localVarResponse.Data;
}
///
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)
/// A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)
/// A string token returned in the response of your previous request. (optional)
/// Task of ApiResponse (ListFinancialEventGroupsResponse)
public async System.Threading.Tasks.Task> ListFinancialEventGroupsAsyncWithHttpInfo(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null)
{
var localVarPath = "/finances/v0/financialEventGroups";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
if (financialEventGroupStartedBefore != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "FinancialEventGroupStartedBefore", financialEventGroupStartedBefore)); // query parameter
if (financialEventGroupStartedAfter != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "FinancialEventGroupStartedAfter", financialEventGroupStartedAfter)); // query parameter
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ListFinancialEventGroups", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ListFinancialEventGroupsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventGroupsResponse)));
}
///
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)
/// A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)
/// A string token returned in the response of your previous request. (optional)
/// ListFinancialEventsResponse
public ListFinancialEventsResponse ListFinancialEvents(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null)
{
ApiResponse localVarResponse = ListFinancialEventsWithHttpInfo(maxResultsPerPage, postedAfter, postedBefore, nextToken);
return localVarResponse.Data;
}
///
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)
/// A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)
/// A string token returned in the response of your previous request. (optional)
/// ApiResponse of ListFinancialEventsResponse
public ApiResponse ListFinancialEventsWithHttpInfo(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null)
{
var localVarPath = "/finances/v0/financialEvents";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
if (postedAfter != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "PostedAfter", postedAfter)); // query parameter
if (postedBefore != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "PostedBefore", postedBefore)); // query parameter
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ListFinancialEvents", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
}
///
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)
/// A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)
/// A string token returned in the response of your previous request. (optional)
/// Task of ListFinancialEventsResponse
public async System.Threading.Tasks.Task ListFinancialEventsAsync(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null)
{
ApiResponse localVarResponse = await ListFinancialEventsAsyncWithHttpInfo(maxResultsPerPage, postedAfter, postedBefore, nextToken);
return localVarResponse.Data;
}
///
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The maximum number of results to return per page. (optional, default to 100)
/// A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)
/// A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)
/// A string token returned in the response of your previous request. (optional)
/// Task of ApiResponse (ListFinancialEventsResponse)
public async System.Threading.Tasks.Task> ListFinancialEventsAsyncWithHttpInfo(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null)
{
var localVarPath = "/finances/v0/financialEvents";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
if (postedAfter != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "PostedAfter", postedAfter)); // query parameter
if (postedBefore != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "PostedBefore", postedBefore)); // query parameter
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ListFinancialEvents", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
}
///
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The identifier of the financial event group to which the events belong.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// ListFinancialEventsResponse
public ListFinancialEventsResponse ListFinancialEventsByGroupId(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null)
{
ApiResponse localVarResponse = ListFinancialEventsByGroupIdWithHttpInfo(eventGroupId, maxResultsPerPage, nextToken);
return localVarResponse.Data;
}
///
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The identifier of the financial event group to which the events belong.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// ApiResponse of ListFinancialEventsResponse
public ApiResponse ListFinancialEventsByGroupIdWithHttpInfo(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null)
{
// verify the required parameter 'eventGroupId' is set
if (eventGroupId == null)
throw new ApiException(400, "Missing required parameter 'eventGroupId' when calling DefaultApi->ListFinancialEventsByGroupId");
var localVarPath = "/finances/v0/financialEventGroups/{eventGroupId}/financialEvents";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (eventGroupId != null) localVarPathParams.Add("eventGroupId", Configuration.ApiClient.ParameterToString(eventGroupId)); // path parameter
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ListFinancialEventsByGroupId", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
}
///
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The identifier of the financial event group to which the events belong.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// Task of ListFinancialEventsResponse
public async System.Threading.Tasks.Task ListFinancialEventsByGroupIdAsync(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null)
{
ApiResponse localVarResponse = await ListFinancialEventsByGroupIdAsyncWithHttpInfo(eventGroupId, maxResultsPerPage, nextToken);
return localVarResponse.Data;
}
///
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The identifier of the financial event group to which the events belong.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// Task of ApiResponse (ListFinancialEventsResponse)
public async System.Threading.Tasks.Task> ListFinancialEventsByGroupIdAsyncWithHttpInfo(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null)
{
// verify the required parameter 'eventGroupId' is set
if (eventGroupId == null)
throw new ApiException(400, "Missing required parameter 'eventGroupId' when calling DefaultApi->ListFinancialEventsByGroupId");
var localVarPath = "/finances/v0/financialEventGroups/{eventGroupId}/financialEvents";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (eventGroupId != null) localVarPathParams.Add("eventGroupId", Configuration.ApiClient.ParameterToString(eventGroupId)); // path parameter
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ListFinancialEventsByGroupId", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
}
///
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// An Amazon-defined order identifier, in 3-7-7 format.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// ListFinancialEventsResponse
public ListFinancialEventsResponse ListFinancialEventsByOrderId(string orderId, int? maxResultsPerPage = null, string nextToken = null)
{
ApiResponse localVarResponse = ListFinancialEventsByOrderIdWithHttpInfo(orderId, maxResultsPerPage, nextToken);
return localVarResponse.Data;
}
///
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// An Amazon-defined order identifier, in 3-7-7 format.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// ApiResponse of ListFinancialEventsResponse
public ApiResponse ListFinancialEventsByOrderIdWithHttpInfo(string orderId, int? maxResultsPerPage = null, string nextToken = null)
{
// verify the required parameter 'orderId' is set
if (orderId == null)
throw new ApiException(400, "Missing required parameter 'orderId' when calling DefaultApi->ListFinancialEventsByOrderId");
var localVarPath = "/finances/v0/orders/{orderId}/financialEvents";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ListFinancialEventsByOrderId", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
}
///
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// An Amazon-defined order identifier, in 3-7-7 format.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// Task of ListFinancialEventsResponse
public async System.Threading.Tasks.Task ListFinancialEventsByOrderIdAsync(string orderId, int? maxResultsPerPage = null, string nextToken = null)
{
ApiResponse localVarResponse = await ListFinancialEventsByOrderIdAsyncWithHttpInfo(orderId, maxResultsPerPage, nextToken);
return localVarResponse.Data;
}
///
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// An Amazon-defined order identifier, in 3-7-7 format.
/// The maximum number of results to return per page. (optional, default to 100)
/// A string token returned in the response of your previous request. (optional)
/// Task of ApiResponse (ListFinancialEventsResponse)
public async System.Threading.Tasks.Task> ListFinancialEventsByOrderIdAsyncWithHttpInfo(string orderId, int? maxResultsPerPage = null, string nextToken = null)
{
// verify the required parameter 'orderId' is set
if (orderId == null)
throw new ApiException(400, "Missing required parameter 'orderId' when calling DefaultApi->ListFinancialEventsByOrderId");
var localVarPath = "/finances/v0/orders/{orderId}/financialEvents";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ListFinancialEventsByOrderId", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
}
}
}