get method

Future<PaggedResponseMessage<SubscriptionModel>> get({
  1. String id = '',
  2. String partOfUrl = '',
  3. String apiUserToken = '',
})

Implementation

Future<PaggedResponseMessage<SubscriptionModel>> get({
  String id = '',
  String partOfUrl = '',
  String apiUserToken = '',
}) async {
  var result = await apiResource.getById(
    id: id,
    partOfUrl: partOfUrl,
    apiUserToken: apiUserToken,
  );
  return PaggedResponseMessage<SubscriptionModel>(
    totalItems: result["totalItems"],
    items: (result["items"] as List).map((e) => SubscriptionModel.fromMap(e)).toList(),
  );
}