get method

Future<Client> get(
  1. String accountId,
  2. String clientAccountId, {
  3. String? $fields,
})

Gets a client buyer with a given client account ID.

Request parameters:

accountId - Numerical account ID of the client's sponsor buyer. (required)

clientAccountId - Numerical account ID of the client buyer to retrieve. (required)

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

Completes with a Client.

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<Client> get(
  core.String accountId,
  core.String clientAccountId, {
  core.String? $fields,
}) async {
  final _queryParams = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'v2beta1/accounts/' +
      commons.escapeVariable('$accountId') +
      '/clients/' +
      commons.escapeVariable('$clientAccountId');

  final _response = await _requester.request(
    _url,
    'GET',
    queryParams: _queryParams,
  );
  return Client.fromJson(_response as core.Map<core.String, core.dynamic>);
}