getProductGroupRankingsByRankingId method

Future<List<ProductGroupRanking>> getProductGroupRankingsByRankingId(
  1. String id
)

Gets all the product group ranking information of the ranking that matches an id.

Implementation

Future<List<ProductGroupRanking>> getProductGroupRankingsByRankingId(
    String id) async {
  final response = await _context.client.get(
    Uri.https(authority, '$path/rankings/$id/productgrouprankings'),
  );

  ClientException.checkIsSuccessStatusCode(response);

  return (json.decode(response.body) as List)
      .map((e) => ProductGroupRanking.fromJson(e))
      .toList();
}