readSubscription static method
Reads the subscription the project is billed under, or null if the project has no subscription.
Implementation
static Future<SubscriptionInfo?> readSubscription(
Client cloudApiClient, {
required String projectId,
}) async {
try {
return await cloudApiClient.plans.getSubscriptionInfoOfProject(
cloudProjectId: projectId,
);
} on NotFoundException {
return null;
} on Exception catch (e, s) {
throw FailureException.nested(
e,
s,
"Request to fetch the project's plan failed",
);
}
}