list method

Future<GoogleCloudApigeeV1ListRatePlansResponse> list(
  1. String parent, {
  2. int? count,
  3. bool? expand,
  4. String? orderBy,
  5. String? startKey,
  6. String? state,
  7. String? $fields,
})

Lists all the rate plans for an API product.

Request parameters:

parent - Required. Name of the API product. Use the following structure in your request: organizations/{org}/apiproducts/{apiproduct} Use organizations/{org}/apiproducts/- to return rate plans for all API products within the organization. Value must have pattern ^organizations/\[^/\]+/apiproducts/\[^/\]+$.

count - Number of rate plans to return in the API call. Use with the startKey parameter to provide more targeted filtering. The maximum limit is 1000. Defaults to 100.

expand - Flag that specifies whether to expand the results. Set to true to get expanded details about each API. Defaults to false.

orderBy - Name of the attribute used for sorting. Valid values include:

  • name: Name of the rate plan. * state: State of the rate plan (DRAFT, PUBLISHED). * startTime: Time when the rate plan becomes active. * endTime: Time when the rate plan expires. Note: Not supported by Apigee at this time.

startKey - Name of the rate plan from which to start displaying the list of rate plans. If omitted, the list starts from the first item. For example, to view the rate plans from 51-150, set the value of startKey to the name of the 51st rate plan and set the value of count to 100.

state - State of the rate plans (DRAFT, PUBLISHED) that you want to display. Possible string values are:

  • "STATE_UNSPECIFIED" : State of the rate plan is not specified.
  • "DRAFT" : Rate plan is in draft mode and only visible to API providers.
  • "PUBLISHED" : Rate plan is published and will become visible to developers for the configured duration (between startTime and endTime).

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleCloudApigeeV1ListRatePlansResponse.

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<GoogleCloudApigeeV1ListRatePlansResponse> list(
  core.String parent, {
  core.int? count,
  core.bool? expand,
  core.String? orderBy,
  core.String? startKey,
  core.String? state,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (count != null) 'count': ['${count}'],
    if (expand != null) 'expand': ['${expand}'],
    if (orderBy != null) 'orderBy': [orderBy],
    if (startKey != null) 'startKey': [startKey],
    if (state != null) 'state': [state],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/rateplans';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return GoogleCloudApigeeV1ListRatePlansResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}