listdisbursements method
Retrieves a report for disbursements from your Merchant Center account.
Request parameters:
merchantId
- The ID of the account that manages the order. This cannot
be a multi-client account.
disbursementEndDate
- The last date which disbursements occurred. In ISO
8601 format. Default: current date.
disbursementStartDate
- The first date which disbursements occurred. In
ISO 8601 format.
maxResults
- The maximum number of disbursements to return in the
response, used for paging.
pageToken
- The token returned by the previous request.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a OrderreportsListDisbursementsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<OrderreportsListDisbursementsResponse> listdisbursements(
core.String merchantId, {
core.String? disbursementEndDate,
core.String? disbursementStartDate,
core.int? maxResults,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (disbursementEndDate != null)
'disbursementEndDate': [disbursementEndDate],
if (disbursementStartDate != null)
'disbursementStartDate': [disbursementStartDate],
if (maxResults != null) 'maxResults': ['${maxResults}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ =
commons.escapeVariable('$merchantId') + '/orderreports/disbursements';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return OrderreportsListDisbursementsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}