getPstssForSubs method

Future<SubscriptionAccess?> getPstssForSubs()

Implementation

Future<SubscriptionAccess?> getPstssForSubs() async {
  var sessionIds = await CoreDb.instance().getSessionId();
  var uri = Uri.parse(
      '${APIMode.BASE_URL}api/v1/subscription/access?sessionId=$sessionIds&clientId=${ConscentInitializer.mClientId}');

  var response = await http.get(uri);
  if (response.statusCode == 200) {
    var subscription_Access =
        SubscriptionAccess.fromJson(jsonDecode(response.body));

    return subscription_Access;
  } else {
    onPluginError(response.body);
  }
}