list method
Lists all deals in a proposal.
To retrieve only the finalized revision deals regardless if a deal is being renegotiated, see the FinalizedDeals resource.
Request parameters:
parent
- Required. The name of the proposal containing the deals to
retrieve. Format: buyers/{accountId}/proposals/{proposalId}
Value must have pattern ^buyers/\[^/\]+/proposals/\[^/\]+$
.
pageSize
- Requested page size. The server may return fewer results than
requested. If requested more than 500, the server will return 500 results
per page. If unspecified, the server will pick a default page size of 100.
pageToken
- The page token as returned from ListDealsResponse.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListDealsResponse.
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<ListDealsResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/deals';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListDealsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}